JPH0779422B2 - Image scaling device - Google Patents

Image scaling device

Info

Publication number
JPH0779422B2
JPH0779422B2 JP62237836A JP23783687A JPH0779422B2 JP H0779422 B2 JPH0779422 B2 JP H0779422B2 JP 62237836 A JP62237836 A JP 62237836A JP 23783687 A JP23783687 A JP 23783687A JP H0779422 B2 JPH0779422 B2 JP H0779422B2
Authority
JP
Japan
Prior art keywords
interpolation
pixel
data
input
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.)
Expired - Fee Related
Application number
JP62237836A
Other languages
Japanese (ja)
Other versions
JPS6480168A (en
Inventor
義光 菅野
照夫 麓
宏曄 小寺
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 JP62237836A priority Critical patent/JPH0779422B2/en
Priority to US07/216,165 priority patent/US4903147A/en
Publication of JPS6480168A publication Critical patent/JPS6480168A/en
Publication of JPH0779422B2 publication Critical patent/JPH0779422B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related 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)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、スキャナー等によって読み込まれた白黒やカ
ラー写真などのような濃淡のある中間調画像に対して、
所望のサイズに正確に合わせ、かつ歪の少ない画像の拡
大縮小を行なわせるための画像拡大縮小装置に関するも
のである。
Description: TECHNICAL FIELD The present invention relates to a grayscale halftone image such as black and white or color photograph read by a scanner or the like.
The present invention relates to an image enlarging / reducing device for accurately adjusting a desired size and enlarging / reducing an image with less distortion.

従来の技術 従来、所望の出力サイズの画像を得る方法としては、ス
キャナーによって初めから出力サイズだけ読み取る方法
と、既に読み取られた画像のサイズを拡大縮小処理によ
り所望のサイズに調整する方法とがある。
2. Description of the Related Art Conventionally, as a method of obtaining an image of a desired output size, there are a method of reading only an output size from the beginning by a scanner and a method of adjusting the size of an already read image to a desired size by enlarging / reducing processing. .

前者による方法の場合は、予め出力サイズが確定してい
る場合に可能であり、確定していない場合や他の目的に
よって既に用意された画像を編集する場合には、後者に
よらなければならない。
The former method is possible when the output size is fixed in advance, and the latter method must be used when the output size is not fixed or when an image already prepared for another purpose is edited.

スキャナーにより所望の出力サイズの画像を読み取る方
法は、読み取りピッチが制限されるために、場合によっ
ては読み取り範囲をオーバーしたり、指定した読み取り
範囲に満たない場合も生じ、より細かな読み取りピッチ
にする様に設計する必要がある。一方、画像を編集して
サイズを合わせる処理の場合にも基本的には同様の欠点
を持っているが、部分的に前後の画像データを利用し
て、拡大縮小率に応じて画素と画素の間に新たな画素を
補ったり、間引いたりして所望の出力サイズに合わせる
ことが比較的容易である。
The method of reading an image of the desired output size with a scanner limits the reading pitch, so in some cases the reading range may be exceeded or the specified reading range may not be reached, resulting in a finer reading pitch. Need to be designed. On the other hand, the process of editing the image to adjust the size basically has the same drawback, but by partially using the image data before and after the image, the pixel and the pixel It is relatively easy to compensate for new pixels in the meantime or to thin out pixels to match the desired output size.

第10図は、従来技術の説明図である。第10図において、
(a)は処理対象画素データを並べた様子を示し、縦軸
は各画素の濃淡レベルを示している。同図(b)は同図
(a)のデータを5/3倍に拡大した場合の従来例を示
し、同図(c)は同図(a)のデータを3/5倍に縮小し
た場合の従来例を示している。この例からもわかる様
に、一見して拡大・縮小の結果は不連続なものとなって
おり、部分的な画像の歪を生じている。同図(b)では
拡大処理によって画素と画素の間に新たな舗間データが
生成されているが、前述の様に部分的に不連続な画像に
なっている。一方、同図(c)は、3/5倍の縮小処理に
よって2/5の割合で画素データが間引かれている様子を
示している。この場合には単に間引くのみであり周囲の
画素の影響を持たせてないが、精度良くするために周囲
の画素の影響を持たせた補正(拡大の場合と同様に補間
と呼ばれることもある)を行なっている例もある。
FIG. 10 is an explanatory diagram of a conventional technique. In FIG.
(A) shows a state in which the pixel data to be processed are arranged, and the vertical axis shows the gray level of each pixel. The figure (b) shows the conventional example when the data of the figure (a) is enlarged 5/3 times, and the figure (c) is the case where the data of the figure (a) is reduced 3/5 times. The conventional example of is shown. As can be seen from this example, at first glance, the result of the enlargement / reduction is discontinuous, and a partial image distortion occurs. In the same figure (b), new pavement data is generated between pixels by the enlargement processing, but as described above, it is a partially discontinuous image. On the other hand, FIG. 7C shows that pixel data is thinned out at a rate of 2/5 by the 3/5 reduction processing. In this case, only the thinning is performed and the influence of the surrounding pixels is not given, but the correction is given by the influence of the surrounding pixels for the sake of accuracy (sometimes called interpolation like the case of enlargement). There is also an example.

第11図は、5/3倍の拡大処理の場合に精度良く補間する
ために、加重平均をとった従来例の説明図である。同図
において、(a)は処理対象の画像データを並べた様子
を示し、(b)は5/3倍時の画素対応位置を示すタイミ
ング・パルスであり、(c)は拡大後の画像データの並
び方を示している。この従来例における加重平均は、例
えば同図(a)におけるg1およびg2の画素を例にとって
説明する。同図(b)のタイミング・パルス位置信号O
は、画像データg1およびg2から各々m1およびn1だけ離れ
た位置にあり、またタイミング・パルス位置番号1は、
画像データg1およびg2から各々m2およびn2だけ離れた位
置にある。これにより、各タイミング・パルス位置にお
ける補間データh0、h1は、 h0=(g1×n1+g2×m1)/(m1+n1) h1=(g1×n2+g2×m2)/(m2+n2) で求められる。同図(c)は、直線補間により、5/3倍
に拡大した結果を示している。この方法によれば精度良
く算出できるが、2回の掛け算と1回の割り算を行なう
必要があり、ハードウエア化する場合はコスト高になる
他に、回路が複雑化するなどの欠点をもっている。
FIG. 11 is an explanatory diagram of a conventional example in which a weighted average is taken in order to accurately interpolate in the case of 5/3 magnification processing. In the figure, (a) shows a state in which image data to be processed are arranged, (b) is a timing pulse showing a pixel corresponding position at 5/3 times magnification, and (c) is image data after enlargement. Shows how to arrange. The weighted average in this conventional example will be described by taking the pixels g 1 and g 2 in FIG. Timing pulse position signal O in FIG.
Are at positions separated from the image data g 1 and g 2 by m 1 and n 1, respectively, and the timing pulse position number 1 is
It is at a position separated from the image data g 1 and g 2 by m 2 and n 2 , respectively. As a result, the interpolation data h 0 and h 1 at each timing pulse position are h 0 = (g 1 × n 1 + g 2 × m 1 ) / (m 1 + n 1 ) h 1 = (g 1 × n 2 + g It is calculated by 2 × m 2 ) / (m 2 + n 2 ). FIG. 7C shows the result of linear interpolation, magnifying 5/3 times. According to this method, it is possible to calculate with high accuracy, but it is necessary to carry out multiplication twice and division once, and when using hardware, the cost is high and the circuit is complicated.

発明が解決しようとする問題点 以上、従来例で説明した通り、加重平均などの方法によ
って画素補間して画像拡大縮小する場合には、精度はよ
いものの、ハードウエア化のためにコスト高になり、ま
た回路が複雑化する等の欠点を有している。
Problems to be Solved by the Invention As described above with reference to the conventional example, when pixels are interpolated and scaled by a method such as a weighted average, the accuracy is good, but the cost is increased due to hardware implementation. Also, it has a drawback that the circuit becomes complicated.

補間方法については、前述の通り一般には直線補間がほ
とんどであり、例えば画素間を任意の関数で補間したい
場合にはそのハードウエア化はますます複雑化するため
安価な回路の実現がむずかしい。
As described above, most of the interpolation methods are generally linear interpolation. For example, when it is desired to interpolate between pixels with an arbitrary function, the hardware becomes more complicated, and it is difficult to realize an inexpensive circuit.

本発明では、これらの欠点を無くし、簡単な回路構成で
かつ任意の関数により画素補間が行なえる画像拡大縮小
装置を提供するものである。
The present invention eliminates these drawbacks and provides an image enlarging / reducing device which has a simple circuit structure and can perform pixel interpolation by an arbitrary function.

問題点を解決するための手段 本発明は、一定の走査ピッチで連続して入力された濃淡
画像のデータに対して、各入力画素gnと順次入力される
近傍画素gn+1とのそれぞれの画素を用い、一方の前記画
素から他方の前記画素を減算して差分Δgを求める減算
回路と、 前記入力画素gnと前記近傍画素gn+1との間を一定の整数
γにより分割した各位置(i)(但し、iは0〜(γ−
1)の整数値)での補間値を線形補間式(Δg)・(i/
γ)により計算される差分補間濃淡データを予め計算し
て記憶しておく第1の記憶手段と、 拡大率β/α倍(但し、α、βは整数)で決定される画
像の拡大・縮小により対応する画像位置を前記差分Δg
をγ分割したどの位置(j)(但し、j=0〜(γ−
1)の整数値)に最も近いかを j=INT{k・(α・γ)/β} MDD γ (但し、INTは整数値を出力する演算、MDDは割算の余り
を求める演算、kは拡大縮小画像の基準点からの画素位
置) により予め計算してそのアドレス値(j)を記憶してお
く第2の記憶手段と、 前記差分Δgと第2の記憶手段からの出力値(j)を前
記第1の記憶手段のアドレスとして、前記第1の記憶手
段から差分補間濃淡データを読み出し、前記入力画素
gn、前記近傍画素gn+1の一方に加算する加算手段とを設
けたものである。
Means for Solving the Problems The present invention relates to each of the input pixels g n and the sequentially input neighboring pixels g n + 1 with respect to the grayscale image data continuously input at a constant scanning pitch. A subtraction circuit that obtains a difference Δg by subtracting the other pixel from one of the pixels by using the pixel of, and divides the input pixel g n and the neighboring pixel g n + 1 by a constant integer γ. Each position (i) (where i is 0- (γ-
Interpolation value in (1) integer value) is calculated by linear interpolation formula (Δg) · (i /
First storage means for pre-calculating and storing difference interpolation grayscale data calculated by γ), and enlargement / reduction of an image determined by an enlargement ratio β / α times (where α and β are integers) The corresponding image position by the difference Δg
Which γ-divided position (j) (where j = 0 to (γ-
1) It is the closest to the integer value) j = INT {k · (α · γ) / β} MDD γ (where INT is an operation that outputs an integer value, MDD is an operation that calculates the remainder of division, k Is the pixel value from the reference point of the enlarged / reduced image) and stores the address value (j) in advance, and the difference Δg and the output value (j ) As an address of the first storage means, the differential interpolation grayscale data is read from the first storage means, and the input pixel
g n and an addition means for adding to one of the neighboring pixels g n + 1 .

作 用 本発明は、上記構成から明らかなように、まず入力デー
タの差分値でテーブル参照により補間演算を行い補間出
力に基準値を加算して最終補間値を得るように構成され
ている。このような構成によれば、入力画像データをそ
のまま補間値メモリのアドレスに利用すると、入力画像
データの2倍のビット幅(例えば入力ビットが8ビット
では16ビット)が必要であるのに対して、本発明では1
ビット増加(例えば8+1=9ビット)するのみであ
る。従って補間値メモリの大きさが著しく減少する効果
がある。また補間値アドレスメモリの内容を拡大縮小率
により書き換える事で任意倍率の拡大縮小を行う事が出
来る。更に、予め補間値を計算しテーブル化しておく事
でテーブル参照と加算器による簡単な回路構成で画像の
拡大縮小を高速に実現出来る。
Operation As is apparent from the above-described configuration, the present invention is configured to first perform the interpolation calculation by the table reference with the difference value of the input data and add the reference value to the interpolation output to obtain the final interpolation value. According to such a configuration, if the input image data is used as it is for the address of the interpolation value memory, a bit width twice as large as the input image data (for example, 16 bits when the input bits are 8 bits) is required. , In the present invention, 1
It only increases the bit (eg 8 + 1 = 9 bits). Therefore, the size of the interpolation value memory is significantly reduced. Further, by rewriting the contents of the interpolated value address memory according to the enlargement / reduction ratio, enlargement / reduction of arbitrary magnification can be performed. Further, by calculating the interpolation values in advance and forming a table, it is possible to realize the enlargement / reduction of the image at a high speed with a simple circuit configuration using a table reference and an adder.

実施例 以下、本発明の一実施例について図面を用いて説明す
る。第1図は本発明の一実施例における画像の拡大縮小
装置のブロック線図であり、第2図の具体的説明図であ
る。
Embodiment An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of an image enlarging / reducing device according to an embodiment of the present invention, and is a specific explanatory diagram of FIG.

初めに、第2図(a)は、入力された画像データ(ここ
ではg1=95、g2=5、g3=17、g4=68とする)、第2図
(b)は分割数γ=4の場合の各分割位置i=0〜3に
おける補間用増分データδ、また第2図(c)は拡大補
間された出力データを示している。
First, FIG. 2 (a) is input image data (here, g 1 = 95, g 2 = 5, g 3 = 17, g 4 = 68), and FIG. 2 (b) is divided. Incremental data δ for interpolation at each division position i = 0 to 3 in the case of the number γ = 4, and FIG. 2 (c) shows output data subjected to enlargement interpolation.

次に第1図において、一連の画像データが入力される場
合、先ず直線補間を例に取って説明する。同図の入力線
101に自分自身を示す画素g1→g2→g3を入力し、入力線1
02に近傍の画素g2→g3→g4を各々同期入力して、出力線
103に第(1)式で示される様な拡大補間された画素デ
ータhを出力する。
Next, referring to FIG. 1, when a series of image data is input, linear interpolation will be taken as an example for description. Input line in the figure
Enter the pixel g 1 → g 2 → g 3 that indicates yourself in 101 and input line 1
Pixels g 2 → g 3 → g 4 in the vicinity of 02 are synchronously input respectively, and the output line
The pixel data h subjected to the expansion interpolation as shown in the equation (1) is output to 103.

h=gn+δ ……(1) δ=INT{((gn+1−gn)/γ)×i} ……(2) (ここで、INT{}は四捨五入して得られる整数を示
す。) なお、画像の拡大縮小率β/αを5/3倍とし、画素間の
分割数γ(整数)を4とした場合に、補間データの読み
出しアドレスを示す整数iは、0≦i<γ、すなわちi
=0〜3の範囲にある値を示す。
h = g n + δ (1) δ = INT {((g n + 1 −g n ) / γ) × i} (2) (where INT {} is an integer obtained by rounding Note that when the image scaling ratio β / α is set to 5/3 and the number of divisions γ (integer) between pixels is 4, the integer i indicating the read address of the interpolation data is 0 ≦ i. <Γ, that is, i
= 0 indicates a value in the range of 0 to 3.

従って、g1〜g4においてi=0〜3に対応する補間用増
分データは、第(2)式により順々に求められる値
〔0、−23、−45、−68、0、3、6、9、0、13、2
6、38、0…〕である。
Therefore, the interpolation increment data corresponding to i = 0 to 3 in g 1 to g 4 are the values [0, -23, -45, -68, 0, 3, 6, 9, 0, 13, 2
6, 38, 0 ...].

まず予め、ランダム・アクセス・メモリ(RAM)104に、
マイクロコンピュータ等からデータ入力線105を介し
て、既述の補間データの読みだしアドレスjを設定して
おく。ここで、その読みとりアドレスは前述の様にj=
0〜3の範囲にあり、例えば次の第(3)式で定まる整
数とする。
First, in advance, in random access memory (RAM) 104,
The reading address j of the interpolation data described above is set from the microcomputer or the like via the data input line 105. Here, the read address is j =
It is in the range of 0 to 3, and is, for example, an integer determined by the following formula (3).

j=INT{k×(α×γ)/β} MDD γ ……(3) (但し、INT{}は四捨五入した整数を示し、INT{}MD
DγはINT{}/γの余りを示し、kは拡大縮小画像の画
像の基準点からの画素位置を示すものである。) この場合j=0、2、1、3、2の繰り返しになる。
j = INT {k × (α × γ) / β} MDD γ (3) (where INT {} indicates a rounded integer, INT {} MD
Dγ indicates the remainder of INT {} / γ, and k indicates the pixel position from the reference point of the enlarged / reduced image. ) In this case, j = 0, 2, 1, 3, 2 is repeated.

次に、入力線101および102に入力された画素データgn
gn+1は、減算器106に入りΔg=gn+1−gnの計算(−255
〜+255の範囲)行ない、出力線107に出力する。一方、
補間画素が出力されるタイミングに同期して数えるカウ
ンタ108の値に応じて、RAM104よりjの値(すなわちj
=0、2、1、3、2)を次々読みだし前述のΔgと連
結し、RAM109の読みだしアドレスとしてして入力する。
その結果、読み出された画素補間用データは、j=0、
2、1、3、2の各々に対応して、補間用増分データ
〔0、−45、3、6、13〕が次々に読み出されて、加算
器110に入力される。一方、この補間用増分データと同
期して、入力線101より入力されている自分自身の画素
データ(g1=95、g2=5、g3=17、g4=68)も加算器11
0に入力されて、加算演算を行なって出力線103に出力す
る。
Next, the pixel data g n input to the input lines 101 and 102,
g n + 1 enters the subtractor 106 and calculates Δg = g n + 1 −g n (−255
(Range of up to +255), and output to the output line 107. on the other hand,
According to the value of the counter 108 that counts in synchronization with the timing at which the interpolation pixel is output, the value of j from the RAM 104 (that is, j
= 0,2,1,3,2) are read out one after another, connected to the above-mentioned Δg, and inputted as the read-out address of the RAM 109.
As a result, the read pixel interpolation data is j = 0,
Incremental data for interpolation [0, -45, 3, 6, 13] are sequentially read out corresponding to each of 2, 1, 3, 2 and input to the adder 110. On the other hand, in synchronization with this interpolation increment data, the pixel data of itself (g 1 = 95, g 2 = 5, g 3 = 17, g 4 = 68) input from the input line 101 is also added by the adder 11
When it is input to 0, the addition operation is performed and the result is output to the output line 103.

従って、出力線103への拡大補間出力データは、第
(4)式の様になる。
Therefore, the expanded interpolation output data to the output line 103 is as shown in the equation (4).

〔95、95、5、5、17〕+〔0、−45、3、9、13〕 =〔95、50、8、14、30〕 ……(4) なお、入力線111は各回路のタイミング制御信号の入力
のための線である。
[95,95,5,5,17] + [0, -45,3,9,13] = [95,50,8,14,30] (4) The input line 111 is for each circuit. It is a line for inputting a timing control signal.

以上、5/3倍の直線補間による拡大において、画素間の
分割数γ=4の場合について具体的に説明したが、分割
数γが大きい程、精度が高くなることは言うまでもな
い。また、第1図のRAM104はROMで、またROM109はRAMで
も良い。
In the above, the case where the division number γ between pixels is 4 in the enlargement by linear interpolation of 5/3 has been specifically described, but it goes without saying that the larger the division number γ, the higher the accuracy. The RAM 104 in FIG. 1 may be a ROM, and the ROM 109 may be a RAM.

次に、直線補間でない他の実施例について説明する。Next, another embodiment which is not linear interpolation will be described.

第3図は任意の画素濃淡レベルによって一意的に定まる
様な濃淡分布関数f(g)を使用し、自分自身の画素お
よび近傍画素における2つの分布関数を合成した補間用
関数を用いた場合のものを示している。同図(a)は画
素濃淡レベル(g1、g2、g3)に応じて定まる濃淡分布関
数f(g1)、f(g2)、f(g3)…の各々を点線で示
し、また同図(b)はその合成した各々の濃淡分布関数
f(g1)+f(g2)、f(g2)+f(g3)…を点線で示
し、同図(c)において前述の直線補間で使用した同様
の条件で拡大補間されたデータを太い実線で示してい
る。この様に、任意の補間関数による補間増分データを
設定しておくことにより、任意関数による拡大補間(ま
たは縮小補間)が実現できる。
FIG. 3 shows a case in which a grayscale distribution function f (g) that is uniquely determined by an arbitrary pixel grayscale level is used, and an interpolation function that combines two distribution functions of its own pixel and neighboring pixels is used. Showing things. In the same figure (a), each of the density distribution functions f (g 1 ), f (g 2 ), f (g 3 ) ... Determining according to the pixel density level (g 1 , g 2 , g 3 ) is shown by a dotted line. Also, FIG. 6B shows the synthesized grayscale distribution functions f (g 1 ) + f (g 2 ), f (g 2 ) + f (g 3 ), ... The data that is enlarged and interpolated under the same condition used in the linear interpolation of is shown by a thick solid line. In this way, by setting the interpolation increment data by the arbitrary interpolation function, the expansion interpolation (or the reduction interpolation) by the arbitrary function can be realized.

次に、第4図を用いて縮小補間の場合の実施例について
説明する。第4図において、(a)は入力された画素デ
ータ列を示し、縦軸に各画素の濃淡レベルで示してい
る。同図(b)は3/5倍に縮小補間した場合の結果を示
している。縮小補間も既述の拡大補間と同様に行なうこ
とができるが、第4図(b)においても分かるように、
例えば入力画素データg2〜g3間等において一つも画素デ
ータが補間生成されない部分を生じる。これは縮小特有
のものであり、入力画素クロックと同じクロックで縮小
補間値を出力する場合を考えると、縮小補間に使用する
入力画素データのみ入力として選択する事でも達成でき
るし、または出力結果で補間データメモリからの不必要
な出力を放棄する事でも達成できる。例えば、第1図の
実施例において補間用データ読みだしアドレスのほかに
同じ位置に書き込んである選択用データ(0、1)を新
たに設けて入力または出力を選択すれば良い。第4図に
おいて、3/5倍の縮小を行なう過程について以下で説明
する。予め設定しておく補間用増分データは、拡大補間
の場合と同様に第(1)、(2)式によって求められ
る。また、第(3)式より、補間用データの読み出しア
ドレスiは、分割数γ=4の場合〔0、3、1〕とな
り、これを繰り返す。ただし、既述の通り、画素間に補
間されない部分もあり、自分自身の画素と次の近傍画素
との間に一つも新たな画素が補間生成されない場合には
“0"とし、補間する場合には“1"とする様な選択データ
を求める。従って、入力データg0、g1、g2、g3、g4…に
対応して、例えば選択用データεを1、1、0、1、0
…の様に定める。これにより、補間用データの読み出し
アドレスj、および入力データgn、選択用データεとの
対応は次の様になる。
Next, an embodiment in the case of reduction interpolation will be described with reference to FIG. In FIG. 4, (a) shows the input pixel data sequence, and the vertical axis shows the gray level of each pixel. FIG. 11B shows the result when reduction interpolation is performed by 3/5 times. The reduction interpolation can be performed in the same manner as the enlargement interpolation described above, but as can be seen from FIG. 4 (b),
For example, in the input pixel data g 2 to g 3, etc., a portion in which no pixel data is generated by interpolation is generated. This is peculiar to reduction, and considering the case where the reduced interpolation value is output at the same clock as the input pixel clock, it can be achieved by selecting only the input pixel data used for reduction interpolation as the input, or the output result. It can also be achieved by discarding unnecessary output from the interpolation data memory. For example, in the embodiment of FIG. 1, in addition to the interpolation data read address, selection data (0, 1) written at the same position is newly provided to select input or output. In FIG. 4, the process of performing 3/5 reduction will be described below. The interpolation incremental data set in advance is obtained by the equations (1) and (2) as in the case of the expanded interpolation. Further, from the equation (3), the read address i of the interpolation data becomes [0, 3, 1] when the division number γ = 4, and this is repeated. However, as already mentioned, there is a part that is not interpolated between pixels, and if there is no new pixel generated between the pixel of its own and the next neighboring pixel, it is set to “0”. Asks for selection data such as "1". Therefore, for example, the selection data ε is set to 1 , 1 , 0 , 1 , 0 corresponding to the input data g 0 , g 1 , g 2 , g 3 , g 4 ...
Set as follows. Accordingly, the correspondence between the read address j of the interpolation data, the input data g n , and the selection data ε is as follows.

入力データ gn:g0、g1、g2、g3、g4 選択用データ ε:1、1、0、1、0 補間値アドレスメモリ値j:0、3、×、1、× (なお、選択用データが0の場合は、その入力画素タイ
ミングで出力補間データが不要なため出力データが出力
されないか、または放棄する。また補間値アドレスメモ
リ値×で表示した様に意味が無くどの様な値であっても
動作結果に影響しない事を示す。) この様にして、画像の縮小補間が実現できる。
Input data g n : g 0 , g 1 , g 2 , g 3 , g 4 selection data ε: 1, 1, 0, 1, 0 interpolation value address memory value j: 0, 3, × 1, × ( If the selection data is 0, the output interpolation data is not required at the input pixel timing and therefore the output data is not output or is discarded. It is shown that even such values do not affect the operation result.) In this way, reduction interpolation of an image can be realized.

次に、画像の2次元の場合、本発明の他の実施例につい
て、第5図〜第9図を用いて説明する。
Next, in the case of a two-dimensional image, another embodiment of the present invention will be described with reference to FIGS.

第5図は、第1図の実施例を2つ組み合わせたものを示
している。同図において、2つの点線部(501および50
2)は第1図の実施例に相当しており、各々の拡大補間
(または縮小補間)部の前にデータの一時保持用のラッ
チ503、504505、506)を設けている。第5図において、
前段で2次元画像における副走査方向の拡大補間を、後
段で前段の結果を受けて主走査方向の拡大補間を行なっ
ている。同図において、入力線507に自分自身のライン
データを、入力線508に近傍のラインデータを各々入力
する。この2ラインのデータは、補間制御回路509から
のタイミング信号で同期を取りながらラッチ503および
ラッチ504に保持され、前段の拡大補間部501に次々に入
力される。前段の拡大補間部501からの出力データは、
1ライン分の拡大補間された一連の画像データとして後
段に送られる。この1ライン分の補間データは、先ずラ
ッチ505に保持され、次のタイミングでラッチ506に移さ
れる。これらのタイミング信号は補間制御回路509から
発生される。これらの2つのラッチ505およびラッチ506
からの出力は、後段の拡大補間部502に入力される。後
段の拡大補間部502においては、ラッチ506からgnを入力
し、ラッチ505からgn+1を入力して第(1)、(2)式
で示される拡大補間を行なう。
FIG. 5 shows a combination of the two embodiments of FIG. In the figure, two dotted lines (501 and 50)
2) corresponds to the embodiment of FIG. 1, and latches 503, 504505, 506) for temporarily holding data are provided in front of each of the enlargement interpolation (or reduction interpolation) units. In FIG.
Enlargement interpolation in the sub-scanning direction in the two-dimensional image is performed in the former stage, and enlargement interpolation in the main scanning direction is performed in the latter stage in response to the result of the former stage. In the figure, input line 507 is input with its own line data, and input line 508 is input with adjacent line data. The data of these two lines are held in the latches 503 and 504 while synchronizing with the timing signal from the interpolation control circuit 509, and are sequentially input to the expansion interpolator 501 at the preceding stage. The output data from the expansion interpolator 501 at the previous stage is
The image data is sent to the subsequent stage as a series of image data that has been enlarged and interpolated for one line. The interpolation data for one line is first held in the latch 505 and then transferred to the latch 506 at the next timing. These timing signals are generated from the interpolation control circuit 509. These two latches 505 and 506
Is input to the expansion interpolator 502 in the subsequent stage. In the expansion interpolator 502 in the subsequent stage, g n is input from the latch 506 and g n + 1 is input from the latch 505 to perform the expansion interpolation represented by the equations (1) and (2).

第6図は、第5図の実施例をさらに具体的に応用した例
である。入力線601に一連の画像データが次々に入力さ
れる場合、それらのラインデータは順番にラインバッフ
ァ602〜604へ書き込まれる。初め、2ライン分のデータ
がラインバッファ602および603に順次書き込まれ、その
後は次々処理が終了する度に、ラインバッファの内の残
りのラインバッファに書き込まれる。そしてそれらの内
2ライン分のラインバッファからデータを読み出して、
セレクタ605により自分自身のラインデータを選択し、
セレクタ606により近傍のラインデータを選択する。次
に、それらの選択されたラインデータは、副走査ライン
データ補間部607に入力され、続いて主走査画素データ
補間部608の各々において、拡大(縮小)補間され最終
の補間後のラインデータは、ラインバッファ610および6
11に交互に書き込まれる。
FIG. 6 is an example in which the embodiment of FIG. 5 is applied more specifically. When a series of image data is sequentially input to the input line 601, the line data is sequentially written in the line buffers 602 to 604. First, data for two lines is sequentially written in the line buffers 602 and 603, and thereafter, each time the processing is completed one after another, the data is written in the remaining line buffers. Then, read the data from the line buffer for two lines of them,
Select your own line data with the selector 605,
The line data in the vicinity is selected by the selector 606. Next, the selected line data is input to the sub-scanning line data interpolating unit 607, and subsequently, in each of the main scanning pixel data interpolating unit 608, the enlarged (reduced) interpolation is performed to obtain the final interpolated line data. , Line buffers 610 and 6
Alternately written to 11.

最後に、このラインバッファ610および611に書き込まれ
ているラインバッファとは反対のラインバッファから最
終の補間データが読み出され、セレクタ612を介して出
力線613に出力される。なお、入力ラインバッファ制御
回路614は、ラインバッファ602〜604およびセレクタ605
〜606の制御用信号を発生する。また、出力ラインバッ
ファ制御回路615はラインバッファ610〜611およびセレ
クタ612の制御用信号を発生する。そして、補間制御回
路616は、マイクロコンピュータ等から入力線616を介し
て補間用データを受取り、各補間部への設定および制御
を行なう。
Finally, the final interpolation data is read from the line buffer opposite to the line buffer written in the line buffers 610 and 611, and is output to the output line 613 via the selector 612. The input line buffer control circuit 614 includes line buffers 602 to 604 and a selector 605.
Generates 606 control signals. The output line buffer control circuit 615 also generates control signals for the line buffers 610 to 611 and the selector 612. Then, the interpolation control circuit 616 receives the interpolation data from the microcomputer or the like via the input line 616, and sets and controls each interpolation unit.

ところで、第6図の構成では副走査の補間を前段で、主
走査の補間を後段で行なっているが、第7図では逆に前
段において主走査を、そして後段において、副走査の補
間を各々実施する様に、その順序を替えた構成を示して
いる。従って、第7図の説明は、第6図の説明と同様で
あり省略する。
By the way, in the configuration of FIG. 6, sub-scanning interpolation is performed in the preceding stage and main-scanning interpolation is performed in the subsequent stage, but in FIG. 7, conversely, main-scanning is performed in the preceding stage and sub-scanning interpolation is performed in the succeeding stage. A configuration is shown in which the order is changed so as to be carried out. Therefore, the description of FIG. 7 is the same as the description of FIG. 6 and will be omitted.

次に、第8図は、第6図および第7図において、2次元
に並んだ画像データを拡大縮小補間する例について示し
ている。第8図において、(a)は2次元に画像データ
が並んだ様子を示し、同図(b)は同図(a)の丸で囲
んだ画素におけるデータを示している。同図(b)にお
けるカッコの数字はその画素の濃淡レベルを示してい
る。この第8図に示す部分のデータについて、主走査、
すなわちX方向には分割数が8で3/5倍の縮小補間を行
ない、副走査、すなわちY方向には分割数が4で5/3倍
の拡大補間を行なった場合の結果を第9図に示す。
Next, FIG. 8 shows an example in which the image data arranged two-dimensionally in FIGS. 6 and 7 is scaled up and down. In FIG. 8, (a) shows a state in which the image data are arranged two-dimensionally, and (b) shows the data in the pixels surrounded by circles in (a). The numbers in parentheses in FIG. 7B indicate the gray level of the pixel. For the data in the portion shown in FIG. 8, main scanning,
That is, FIG. 9 shows the result when the number of divisions is 8 in the X direction and 3/5 times reduction interpolation is performed, and the sub-scanning is performed, that is, the number of divisions is 4 and 5/3 times enlargement interpolation is performed in the Y direction. Shown in.

既に、これまで分割数が4の場合については5/3倍の拡
大補間および縮小補間の例で説明した。第8図および第
9図では、縦横の倍率と各々の分割数も独立に設定した
例を示している。その結果、第9図の様に縦(Y)に拡
大補間され、横(X)に縮小補間された画像が得られ
る。
The case where the number of divisions is 4 has already been described above with an example of 5/3 times expansion and contraction. 8 and 9 show an example in which the vertical and horizontal magnifications and the number of divisions are set independently. As a result, an image which is vertically (Y) enlarged and horizontally (X) reduced is obtained as shown in FIG.

発明の効果 以上の実施例で説明した様に本発明は、既存の画素間に
新たな画素を補間生成する場合に、複雑な計算をしない
で高速で精度がよく、かつ任意の補間用関数を設定でき
るという特徴の他に、回路が簡単になり、その結果安価
にハードウエア化が図れるという効果をもたらす。
EFFECTS OF THE INVENTION As described in the above embodiments, according to the present invention, when a new pixel is generated by interpolation between existing pixels, a high-speed and high-accuracy interpolation function can be performed without complicated calculation. In addition to the feature that it can be set, the circuit is simplified, and as a result, it is possible to inexpensively realize hardware.

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

第1図は本発明の一実施例における画像の拡大縮小装置
のブロック結線図、第2図は第1図の実施例における具
体的な直線補間の場合の概念図、第3図は本発明の他の
実施例における画素間を任意関数で補間する概念図、第
4図は同縮小補間の場合についての概念図、第5図は第
1図の実施例を2つ組み合わせた実施例を示すブロック
結線図、第6図および第7図は本発明の他の実施例にお
ける2次元に並んだ画像データの拡大(縮小)補間を行
なう同装置のブロック結線図、第8図は第6図または第
7図における具体的な概念図、第9図は第8図を入力し
て拡大縮小補間処理した結果を示す概念図、第10図、第
11図は従来の画像の拡大縮小方法を示す概念図である。 104……RAM、106……減算器、108……カウンタ、109…
…ROM、110……加算器。
FIG. 1 is a block connection diagram of an image enlarging / reducing apparatus according to an embodiment of the present invention, FIG. 2 is a conceptual diagram in the case of concrete linear interpolation in the embodiment of FIG. 1, and FIG. FIG. 4 is a conceptual diagram in which pixels are interpolated by an arbitrary function in another embodiment, FIG. 4 is a conceptual diagram in the case of the same reduced interpolation, and FIG. 5 is a block showing an embodiment in which two embodiments of FIG. 1 are combined. Wiring diagrams, FIGS. 6 and 7 are block wiring diagrams of the same device for performing enlargement (reduction) interpolation of two-dimensionally arranged image data in another embodiment of the present invention, and FIG. 8 is FIG. 6 or FIG. 7 is a concrete conceptual diagram in FIG. 7, FIG. 9 is a conceptual diagram showing the result of input / output of FIG. 8 and scaling processing, FIG. 10, FIG.
FIG. 11 is a conceptual diagram showing a conventional image scaling method. 104 ... RAM, 106 ... Subtractor, 108 ... Counter, 109 ...
… ROM, 110… Adder.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】一定の走査ピッチで連続して入力された濃
淡画像のデータに対して、各入力画素gnと順次入力され
る近傍画素gn+1とのそれぞれの画素を用い、一方の前記
画素から他方の前記画素を減算して差分Δgを求める減
算回路と、 前記入力画素gnと前記近傍画素gn+1との間を一定の整数
γにより分割した各位置(i)(但し、iは0〜(γ−
1)の整数値)での補間値を線形補間式(Δg)・(i/
γ)により計算される差分補間濃淡データを予め計算し
て記憶しておく第1の記憶手段と、 拡大率β/α倍(但し、α、βは整数)で決定される画
像の拡大・縮小により対応する画像位置を前記差分Δg
をγ分割したどの位置(j)(但し、j=0〜(γ−
1)の整数値)に最も近いかを j=INT{k・(α・γ)/β} MDD γ (但し、INTは整数値を出力する演算、MDDは割算の余り
を求める演算、kは拡大縮小画像の基準点からの画素位
置) により予め計算してそのアドレス値(j)を記憶してお
く第2の記憶手段と、 前記差分Δgと第2の記憶手段からの出力値(j)を前
記第1の記憶手段のアドレスとして、前記第1の記憶手
段から差分補間濃淡データを読み出し、前記入力画素
gn、前記近傍画素gn+1の一方に加算する加算手段とを具
備する画像拡大縮小装置。
1. For grayscale image data continuously input at a constant scanning pitch, each pixel of each input pixel g n and a neighboring pixel g n + 1 sequentially input is used, and one of A subtraction circuit that subtracts the other of the pixels from the pixel to obtain a difference Δg, and each position (i) (provided that the input pixel g n and the neighboring pixel g n + 1 are divided by a fixed integer γ. , I is 0- (γ-
Interpolation value in (1) integer value) is calculated by linear interpolation formula (Δg) · (i /
First storage means for pre-calculating and storing difference interpolation grayscale data calculated by γ), and enlargement / reduction of an image determined by an enlargement ratio β / α times (where α and β are integers) The corresponding image position by the difference Δg
Which γ-divided position (j) (where j = 0 to (γ-
1) It is the closest to the integer value) j = INT {k · (α · γ) / β} MDD γ (where INT is an operation that outputs an integer value, MDD is an operation that calculates the remainder of division, k Is the pixel value from the reference point of the enlarged / reduced image) and stores the address value (j) in advance, and the difference Δg and the output value (j ) As an address of the first storage means, the differential interpolation grayscale data is read from the first storage means, and the input pixel
An image enlarging / reducing device, comprising g n and an adding means for adding to one of the neighboring pixels g n + 1 .
JP62237836A 1987-07-08 1987-09-22 Image scaling device Expired - Fee Related JPH0779422B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP62237836A JPH0779422B2 (en) 1987-09-22 1987-09-22 Image scaling device
US07/216,165 US4903147A (en) 1987-07-08 1988-07-07 Method and apparatus for processing an image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62237836A JPH0779422B2 (en) 1987-09-22 1987-09-22 Image scaling device

Publications (2)

Publication Number Publication Date
JPS6480168A JPS6480168A (en) 1989-03-27
JPH0779422B2 true JPH0779422B2 (en) 1995-08-23

Family

ID=17021131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62237836A Expired - Fee Related JPH0779422B2 (en) 1987-07-08 1987-09-22 Image scaling device

Country Status (1)

Country Link
JP (1) JPH0779422B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2772651B2 (en) * 1988-12-27 1998-07-02 京セラ株式会社 Image enlargement processing device
JPH0322092A (en) * 1989-06-19 1991-01-30 Alps Electric Co Ltd Method and device for reproducing expanded/reduced picture
JPH0410783A (en) * 1990-04-27 1992-01-14 Hitachi Ltd Video camera device
JPH0439780A (en) * 1990-06-05 1992-02-10 Matsushita Electric Ind Co Ltd Image synthesizing device
JP2670559B2 (en) * 1993-02-10 1997-10-29 西本産業株式会社 Grayscale image processing method and grayscale image processing apparatus used therefor
JP2811409B2 (en) * 1994-02-08 1998-10-15 西本産業株式会社 Shading image processing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5679571A (en) * 1979-12-03 1981-06-30 Ricoh Co Ltd Picture size reducing and magnifying method and its device
JPS62169278A (en) * 1986-01-22 1987-07-25 Konishiroku Photo Ind Co Ltd Picture processor
JPS62252268A (en) * 1986-04-25 1987-11-04 Konika Corp Picture processor to expand reduce process original picture

Also Published As

Publication number Publication date
JPS6480168A (en) 1989-03-27

Similar Documents

Publication Publication Date Title
US5253064A (en) Video camera apparatus with electronic zoom control and method therefor
US5237432A (en) Image scaling apparatus
US4686580A (en) Method and apparatus for changing image size
EP0198269B1 (en) Method and apparatus for interpolating image signals
JPH0319753B2 (en)
US5202670A (en) Image processing apparatus
US4850028A (en) Image processing method and apparatus therefor
EP0198161A1 (en) Method for emphasizing sharpness in a picture signal reproducing machine
JPH11514810A (en) Method and apparatus for video source data interpolation
KR930022822A (en) Image magnification conversion method and apparatus
JPH1021387A (en) Image processor and processing method
US4607340A (en) Line smoothing circuit for graphic display units
JPH0779422B2 (en) Image scaling device
US6961479B1 (en) Image processing device, image processing method, image-processing program recorded medium
JPH0771189B2 (en) Image data scaling processor
EP0461996A2 (en) Picture processing apparatus
US5280365A (en) Image processor with reduction of enlarged image data to form image data enlarged with a desired magnification
JPH0158914B2 (en)
JPH04354068A (en) Method and device for interpolating picture data
JPS61193574A (en) Correction device for picture image distorsion
JPH0738805A (en) Image enlarging device
KR100374581B1 (en) Reducing method of digital image and device thereof
JP3032914B2 (en) Image reading processing device
JP2772651B2 (en) Image enlargement processing device
JP2807231B2 (en) Pixel density conversion method and device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees