JP3483426B2 - Image reduction method and storage medium storing program - Google Patents

Image reduction method and storage medium storing program

Info

Publication number
JP3483426B2
JP3483426B2 JP11087497A JP11087497A JP3483426B2 JP 3483426 B2 JP3483426 B2 JP 3483426B2 JP 11087497 A JP11087497 A JP 11087497A JP 11087497 A JP11087497 A JP 11087497A JP 3483426 B2 JP3483426 B2 JP 3483426B2
Authority
JP
Japan
Prior art keywords
pixel
image
original image
pixels
reduction
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
JP11087497A
Other languages
Japanese (ja)
Other versions
JPH10304186A (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.)
Screen Holdings Co Ltd
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Screen Holdings Co Ltd
Dainippon Screen Manufacturing 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 Screen Holdings Co Ltd, Dainippon Screen Manufacturing Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP11087497A priority Critical patent/JP3483426B2/en
Publication of JPH10304186A publication Critical patent/JPH10304186A/en
Application granted granted Critical
Publication of JP3483426B2 publication Critical patent/JP3483426B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、デジタルの原画像
を縮小して縮小後の画像を得る画像縮小方法およびその
方法をコンピュータに実行させるためのプログラムを記
録した記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image reduction method for reducing a digital original image to obtain a reduced image and a storage medium recording a program for causing a computer to execute the method.

【0002】[0002]

【従来の技術】従来のこの種の画像縮小は、図17に示
すように、所望の縮小方向(図ではX方向)に並ぶ原画
像OGの1画素列(画素列1、画素列2、…、画素列
Z)ごとに、所望の縮小率n/m(n、mはn<mの正
の数)で縮小して、原画像OGを1次元の縮小方向に縮
小した縮小後の画像SGを得るようにしている。
2. Description of the Related Art In the conventional image reduction of this type, as shown in FIG. 17, one pixel row (pixel row 1, pixel row 2, ...) Of an original image OG arranged in a desired reduction direction (X direction in the drawing). , Each pixel row Z) is reduced at a desired reduction ratio n / m (n and m are positive numbers of n <m) and the original image OG is reduced in a one-dimensional reduction direction to obtain a reduced image SG. Trying to get.

【0003】この種の画像縮小では、通常、原画像OG
の縮小方向内に処理範囲SHを設定することができるよ
うになっている。これは、原画像OGの縮小方向の画素
列の端部に画像と無関係な不要部分(不要画素)がある
場合などに、その不要画素を縮小後の画像SGに反映さ
せないようにするためである。図17では点線で挟まれ
た範囲を処理範囲SHとした場合の画像縮小を示してい
るが、原画像OGに不要画素がなければ縮小方向の画素
列全体を処理範囲SHとして処理される。
In this type of image reduction, the original image OG is usually used.
The processing range SH can be set in the reduction direction of. This is to prevent the unnecessary pixels from being reflected in the reduced image SG when there is an unnecessary portion (unnecessary pixel) unrelated to the image at the end of the pixel row in the reduction direction of the original image OG. . Although FIG. 17 shows the image reduction in the case where the range sandwiched by the dotted lines is the processing range SH, if there is no unnecessary pixel in the original image OG, the entire pixel row in the reduction direction is processed as the processing range SH.

【0004】上記1画素例ごとの画像縮小は、従来、図
18に示すように、原画像の画素列内の画素の位置に応
じて割り振った荷重による隣接画素の荷重平均で行って
いる。なお、図18では縮小率n/mを2/7としてい
る。また、図中の各符号は以下の通りである。
Conventionally, the image reduction for each one pixel example is performed by a weighted average of adjacent pixels by a weight assigned according to the position of the pixel in the pixel row of the original image, as shown in FIG. In FIG. 18, the reduction ratio n / m is set to 2/7. Moreover, each code | symbol in a figure is as follows.

【0005】sは、原画像OGの処理対象の1画素列
(画素列1、画素列2、…、画素列Z)を構成する画素
の画素No(s=1、2、…、s(MAX) :s(MAX) は図示
を省略しているが原画像OGの処理対象の1画素列の画
素数)、P(s)は、原画像OGの処理対象の1画素列
を構成する各画素の濃度データ、tは、縮小後の画像S
Gの1画素列(画素列1、画素列2、…、画素列Z)を
構成する画素の画素No(t=1、2、…t(MAX) :t
(MAX) は図示を省略しているが縮小後の画像SGの1画
素列の画素数)、Q(t)は、縮小後の画像SGの1画
素列を構成する各画素の濃度データ、s(t)は、原画
像OGの処理対象の1画素列を構成する画素のうち、前
記Q(t)を算出するのに参照する原画像OGの画素の
画素No、s(1)は、原画像OGの処理対象の1画素列
内の処理範囲SHの先頭の画素の画素No、ahは、P
(s(1))の荷重補正量(ah=0、1、…、(n−
1))、R(t)は、前記Q(t)を算出するのに用い
る原画像OGの算出対象領域であって、前記Q(t)を
求める荷重計算に用いる原画像OGの各画素内の区分の
範囲を示す領域、G(t)は、前記Q(t)を算出する
のに用いる原画像OGの算出対象画素区画であって、前
記Q(t)を求める荷重計算に用いる原画像OGの複数
個の隣接画素の範囲を示す区画、である。
S is a pixel number (s = 1, 2, ..., S (MAX ) of pixels forming one pixel row (pixel row 1, pixel row 2, ..., Pixel row Z) to be processed in the original image OG. ) : S (MAX) is not shown in the figure, but the number of pixels in the one pixel column to be processed in the original image OG), P (s) is each pixel constituting one pixel column to be processed in the original image OG Density data, t is the image S after reduction
The pixel number (t = 1, 2, ... t (MAX) : t of the pixels forming one pixel row of G (pixel row 1, pixel row 2, ..., Pixel row Z)
(MAX) is not shown, but the number of pixels in one pixel column of the reduced image SG), Q (t) is density data of each pixel forming one pixel column of the reduced image SG, s (T) is the pixel number of the pixel of the original image OG that is referred to when calculating Q (t) among the pixels that form one pixel column of the processing target of the original image OG, and s (1) is the original The pixel No and ah of the first pixel of the processing range SH in the one pixel column of the processing target of the image OG are P
Load correction amount of (s (1)) (ah = 0, 1, ..., (n−
1)) and R (t) are calculation target regions of the original image OG used for calculating the Q (t), and are within each pixel of the original image OG used for the load calculation for obtaining the Q (t). , G (t) is a calculation target pixel section of the original image OG used to calculate the Q (t), and is an original image used in the load calculation for obtaining the Q (t). A section showing a range of a plurality of adjacent pixels of OG.

【0006】また、従来の方法を演算式で表すと、以下
のようになる。 Q(t)=((n−a(t))/m)×P(s(t)) +Σ{(n/m)×P(i)} 〔i=s(t)+1〜s(t+1)−1〕 +(a(t+1)/m)×P(s(t+1)) … (1) ただし、 s(t)=s(1)+int〔(ah+(m×(t−
1)))/n〕 a(t)=(ah+(m×(t−1))) mod n
The conventional method can be expressed by the following equation. Q (t) = ((n−a (t)) / m) × P (s (t)) + Σ {(n / m) × P (i)} [i = s (t) +1 to s (t + 1) ) −1] + (a (t + 1) / m) × P (s (t + 1)) (1) However, s (t) = s (1) + int [(ah + (m × (t−
1))) / n] a (t) = (ah + (mx (t-1))) mod n

【0007】なお、上記演算式において、int〔A/
B〕は、整数化関数でAをBで除した結果の整数部、A
mod Bは AをBで除したときの余りを求める関
数、である。
In the above equation, int [A /
B] is the integer part of the result of dividing A by B in the integerizing function, A
mod B is a function for obtaining a remainder when A is divided by B.

【0008】処理は、t=1、2、3、…とtを順次カ
ウントアップして、Q(1)、Q(2)、Q(3)、…
の順に縮小後の画像SGの1画素列を構成する各画素の
濃度データを求めていき1画素列分の縮小を行う。この
ような処理を縮小方向に直交する方向(図17ではY方
向)に並列される各画素列(画素列1、画素列2、…、
画素列Z)ごとに行って原画像OGを縮小方向に縮小率
n/mで縮小する。
In the processing, t = 1, 2, 3, ... And t are sequentially counted up, and Q (1), Q (2), Q (3) ,.
The density data of each pixel forming one pixel column of the reduced image SG is obtained in this order, and the pixel data is reduced by one pixel column. Each pixel column (pixel column 1, pixel column 2, ...) Arranged in parallel in the direction orthogonal to the reduction direction (Y direction in FIG. 17).
This is performed for each pixel row Z) to reduce the original image OG in the reduction direction at the reduction rate n / m.

【0009】図18や上記演算式より明らかなように、
この従来方法では、原画像OGの処理対象の1画素列を
構成する各画素を便宜的にn個に区分し、各区分に1/
mの荷重を割り付けて、原画像OGの1画素の最大荷重
をn/mとし、s(1)番目の画素の(ah+1)番目
の区分から始めて、荷重の合計がm/m(100%)に
なるようにR(t)を決め、原画像OGの処理対象の1
画素列内の複数個の隣接画素(G(t)を構成する各画
素)にR(t)の区分数に応じた荷重を割り振り、その
荷重による荷重平均結果を縮小後の1画素の濃度データ
としている。そして、各Q(t)に対する各R(t)を
連続して決めていき、縮小後の画像SGの1画素列の各
画素の濃度データを順次求めていくものである。
As is clear from FIG. 18 and the above equation,
In this conventional method, each pixel forming one pixel column to be processed of the original image OG is conveniently divided into n pieces, and 1 /
The load of m is assigned, the maximum load of one pixel of the original image OG is set to n / m, and the total load is m / m (100%) starting from the (ah + 1) th section of the s (1) th pixel. R (t) is determined so that
Density data of one pixel after assigning a load according to the number of divisions of R (t) to a plurality of adjacent pixels (each pixel forming G (t)) in the pixel row and reducing the weighted average result by the load I am trying. Then, each R (t) for each Q (t) is continuously determined, and the density data of each pixel in one pixel column of the reduced image SG is sequentially obtained.

【0010】この従来方法によれば、s(t)を決める
演算式からも明らかなように、例えば、縮小後の画像S
Gの処理対象の画素列内のk番目の画素の濃度データ
〔Q(k)〕の算出で参照する原画像OGの処理対象の
画素列内の画素〔s(k)〕は、s(1)から数えて略
〔(m/n)×k〕番目の画素となる。従って、縮小後
の画像SGの各画素に対する原画像OG内の参照画素
は、縮小率に応じた適切な位置の画素が選ばれる。そし
て、縮小後の画像SGの各画素の濃度データを、各参照
画素の近辺の隣接画素の荷重平均で求めているので、縮
小方向について原画像OGの処理範囲SH全体をn/m
倍に略均等に縮小することができる。
According to this conventional method, as is clear from the arithmetic expression for determining s (t), for example, the reduced image S
The pixel [s (k)] in the processing target pixel row of the original image OG referred to in calculating the density data [Q (k)] of the k-th pixel in the G processing target pixel row is s (1 ), The pixel becomes an approximately [(m / n) × k] -th pixel. Therefore, as the reference pixel in the original image OG for each pixel of the reduced image SG, a pixel at an appropriate position is selected according to the reduction ratio. Then, since the density data of each pixel of the reduced image SG is obtained by the weighted average of the adjacent pixels in the vicinity of each reference pixel, the entire processing range SH of the original image OG in the reduction direction is n / m.
It is possible to reduce the size approximately twice.

【0011】また、2次元のデジタルの原画像を2次元
方向(X方向およびY方向)それぞれに縮小する場合
は、図19に示すように、原画像OGに対して上記方法
でX方向に縮小し、その縮小演算後の画像SG1に対し
て上記方法でY方向に縮小することで、原画像OGを2
次元方向に縮小した画像SG2を得ている。
Further, when reducing a two-dimensional digital original image in each of the two-dimensional directions (X direction and Y direction), as shown in FIG. 19, the original image OG is reduced in the X direction by the above method. Then, the original image OG is reduced to 2 by reducing the image SG1 after the reduction operation in the Y direction by the above method.
An image SG2 reduced in the dimension is obtained.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の画像縮小方法には次のような問題がある。図
20を参照する。図20(a)は、白黒(斜線で示す画
素が黒)に2値化(ここでは、黒の画素の濃度データを
「0.00」、白の画素の濃度データを「1.00」と
する)された原画像OGを示し、図20(b)は、図2
0(a)の原画像OGを、従来方法でXY両方向にそれ
ぞれ縮小率を2/7、s(1)=1、ah=0として縮
小した縮小後の画像SGの各画素の濃度データを示す。
However, such a conventional image reduction method has the following problems. Referring to FIG. In FIG. 20A, binarization is performed in black and white (pixels indicated by diagonal lines are black) (here, the density data of black pixels is “0.00”, and the density data of white pixels is “1.00”). FIG. 20B shows the original image OG that has been processed.
The original image OG of 0 (a) is reduced by 2/7 in the XY direction by the conventional method, the density ratio of each pixel of the reduced image SG is reduced to s (1) = 1 and ah = 0. .

【0013】2次元の原画像OGの各画素の濃度データ
をP(sX ,sY )、縮小後の2次元の画像の各画素の
濃度データをQ(tX ,tY )とすると、例えば、Q
(1,3)は、図20(a)のX方向の算出対象画素区
画GX (1)と、Y方向の算出対象画素区画GY (3)
とで囲まれる2次元の算出対象画素区画に含まれる各画
素に対して、X方向の算出対象領域RX (1)と、Y方
向の算出対象領域RY (3)とで囲まれる2次元の算出
対象領域に応じて割り振った荷重による荷重平均であ
り、以下のような演算で求められることになる。
Letting P (s X , s Y ) be the density data of each pixel of the two-dimensional original image OG and Q (t X , t Y ) be the density data of each pixel of the reduced two-dimensional image. For example, Q
(1, 3) is the calculation target pixel section G X (1) in the X direction and the calculation target pixel section G Y (3) in the Y direction in FIG.
For each pixel included in a two-dimensional calculation target pixel section surrounded by and, a two-dimensional area surrounded by a calculation target area R X (1) in the X direction and a calculation target area R Y (3) in the Y direction It is a weighted average of the loads assigned according to the calculation target region, and is calculated by the following calculation.

【0014】 Q(1,3)=2/7×(2/7×P( 1, 8)+2/7×P( 2, 8)+2/7×P( 3, 8)+1/7×P( 4, 8)) +2/7×(2/7×P( 1, 9)+2/7×P( 2, 9)+2/7×P( 3, 9)+1/7×P( 4, 9)) +2/7×(2/7×P( 1,10)+2/7×P( 2,10)+2/7×P( 3,10)+1/7×P( 4,10)) +1/7×(2/7×P( 1,11)+2/7×P( 2,11)+2/7×P( 3,11)+1/7×P( 4,11)) =2/7×(2/7×1.00+2/7×1.00+2/7×0.00+1/7×0.00) +2/7×(2/7×1.00+2/7×1.00+2/7×0.00+1/7×0.00) +2/7×(2/7×1.00+2/7×0.00+2/7×0.00+1/7×0.00) +1/7×(2/7×1.00+2/7×0.00+2/7×0.00+1/7×0.00) =22/49≒0.45[0014]   Q (1, 3) = 2/7 × (2/7 × P (1,  8) + 2/7 × P (2,  8) + 2/7 × P (3,  8) + 1/7 × P (4,  8))         + 2/7 × (2/7 × P (1,  9) + 2/7 × P (2,  9) + 2/7 × P (3,  9) + 1/7 × P (4,  9))         + 2/7 × (2/7 × P (1, 10) + 2/7 × P (2, 10) + 2/7 × P (3, 10) + 1/7 × P (4, Ten))         +1/7 × (2/7 × P (1, 11) + 2/7 × P (2, 11) + 2/7 × P (3, 11) + 1/7 × P (4, 11))         = 2/7 x (2/7 x 1. 00 + 2/7 × 1. 00 + 2/7 × 0. 00 + 1/7 × 0. 00)         +2/7 x (2/7 x 1. 00 + 2/7 × 1. 00 + 2/7 × 0. 00 + 1/7 × 0. 00)         +2/7 x (2/7 x 1. 00 + 2/7 × 0. 00 + 2/7 × 0. 00 + 1/7 × 0. 00)         +1/7 × (2/7 × 1. 00 + 2/7 × 0. 00 + 2/7 × 0. 00 + 1/7 × 0. 00)         = 22/49 ≒ 0. 45

【0015】縮小後の画像SGの他の画素の濃度データ
も同様に算出される。図20より明らかなように、従来
方法のように、原画像OG内における画素の位置に応じ
て割り振った荷重による荷重平均で縮小後の画像SGの
画素の濃度データを求めると、例えば、Q(1,3)、
Q(2,1)、Q(2,3)、Q(2,4)のように、
これら画素の濃度データを算出するための原画像OGの
2次元の算出対象領域内を略2分するように原画像OG
の白黒のエッジが通る場合には、縮小後の画像SGの画
素の濃度データは中間値(グレー)となる。また、Q
(1,4)、Q(2,2)などにように濃度データが低
下する(濃いグレーになる)場合もある。一方で、Q
(3,1)、Q(4,1)のように、これら画素の濃度
データの算出に用いる原画像OGの2次元の算出対象領
域内に原画像OGの白黒のエッジが通らなければ濃度デ
ータが低下しないこともある。このように、原画像OG
の白黒のエッジの通過状態に応じて、画像がボケたりボ
ケなかったりして、縮小後の画像SGの画質が低下する
という問題があった。
The density data of the other pixels of the reduced image SG are calculated in the same manner. As is clear from FIG. 20, when the density data of the pixel of the reduced image SG is obtained by the weighted average by the load assigned according to the position of the pixel in the original image OG as in the conventional method, for example, Q ( 1, 3),
Like Q (2,1), Q (2,3), Q (2,4),
The original image OG is calculated so that the inside of the two-dimensional calculation target area of the original image OG for calculating the density data of these pixels is roughly divided into two.
When the black-and-white edge passes, the density data of the pixel of the reduced image SG has an intermediate value (gray). Also, Q
There are also cases where the density data decreases (becomes a dark gray) such as (1,4) and Q (2,2). On the other hand, Q
If the black and white edges of the original image OG do not pass within the two-dimensional calculation target area of the original image OG used for calculating the density data of these pixels, such as (3,1) and Q (4,1), the density data May not decrease. In this way, the original image OG
There is a problem that the image quality of the reduced image SG deteriorates because the image is blurred or not blurred according to the passing state of the black and white edge.

【0016】また、従来方法の別の問題を図21を参照
して説明する。図21は、縮小率n/mを、例えば9/
10のように「1.0」に近い場合について、上記従来
方法で画像縮小を行った結果を模式的に示した図であ
る。
Another problem of the conventional method will be described with reference to FIG. In FIG. 21, the reduction ratio n / m is, for example, 9 /
FIG. 10 is a diagram schematically showing a result of image reduction performed by the above-described conventional method when the value is close to “1.0” as in 10.

【0017】図より明らかなように、各Q(t)に対す
るP(s)の隣接画素の荷重平均の割合は、9:1、
8:2、…、5:5、…、2:8、1:9の変化をサイ
クリックに繰り返すことになる。
As is clear from the figure, the weighted average ratio of the adjacent pixels of P (s) to each Q (t) is 9: 1,
The change of 8: 2, ..., 5: 5, ..., 2: 8, 1: 9 will be cyclically repeated.

【0018】この場合、縮小率が「1.0」に近いにも
かかわらず、例えば、図21のQ(5)のように原画像
OGの隣接する2画素を5:5(=1:1)の等割合で
平均する部分が発生することになる。原画像OG内にエ
ッジがあると、例えば図21のQ(1)のように原画像
OGの1画素の濃度データと略等しい画素部分ではエッ
ジは縮小後も保存され画像は鮮明であるが、上述した隣
接する2画素を1:1の等割合で平均する画素部分では
2画素の等平均値であるのでエッジが軽減されて画像が
ボケることになる。
In this case, although the reduction ratio is close to "1.0", for example, two adjacent pixels of the original image OG are 5: 5 (= 1: 1) as shown in Q (5) of FIG. ) Will be averaged at the same rate. If there is an edge in the original image OG, for example, as shown in Q (1) of FIG. 21, in the pixel portion that is substantially equal to the density data of one pixel of the original image OG, the edge is saved even after reduction and the image is clear, In the pixel portion that averages two adjacent pixels at an equal ratio of 1: 1 as described above, the edge is reduced and the image is blurred because it is an equal average value of two pixels.

【0019】各画素列ごとの縮小処理は、従来、s
(1)、ahを同じ値にして処理しているので、上記画
像のボケは縮小方向の各画素列ごとに同じパターンで現
れ、図22(a)の点線で示すように、縮小方向に直交
する方向に沿って直線状のムラGmとなって縮小後の画
像SGに現れ、縮小後の画像SGの品質を低下させてい
た。特に、縮小率が「1.0」に近いと、縮小後の画像
SGに周期的に現れる直線状のムラGmの出現周期mT
が広くなり、目視によってもこの直線状のムラGmが目
立つほどになり問題となっていた。
Conventionally, the reduction processing for each pixel column is performed by s
(1) Since ah is processed with the same value, the blur of the image appears in the same pattern for each pixel column in the reduction direction, and is orthogonal to the reduction direction as shown by the dotted line in FIG. The linear unevenness Gm appears in the reduced image SG after the reduction, and the quality of the reduced image SG is deteriorated. Particularly, when the reduction ratio is close to “1.0”, the appearance period mT of the linear unevenness Gm that periodically appears in the reduced image SG.
Becomes wider, and this linear unevenness Gm becomes noticeable even by visual observation, which is a problem.

【0020】また、従来方法で2次元のデジタル画像を
X、Y両方向に縮小した場合には、同様の理由で図22
(b)に示すように格子状のムラが現れることになる。
Further, when the two-dimensional digital image is reduced in both the X and Y directions by the conventional method, for the same reason as shown in FIG.
As shown in (b), grid-like unevenness appears.

【0021】本発明は、このような事情に鑑みてなされ
たものであって、画質の低下を招かずに画像を縮小する
ことができる画像縮小方法及びその方法をコンピュータ
に実行させるためのプログラムを記録した記憶媒体を提
供することを目的とする。
The present invention has been made in view of the above circumstances, and provides an image reduction method capable of reducing an image without degrading the image quality and a program for causing a computer to execute the method. It is an object to provide a recorded storage medium.

【0022】[0022]

【課題を解決するための手段】本発明は、このような目
的を達成するために、次のような構成をとる。すなわ
ち、請求項1に記載の発明は、デジタルの原画像を縮小
して縮小後の画像を得る画像縮小方法において、(1)
縮小後の画像の算出対象の画素の濃度データを算出する
のに用いる原画像の算出対象画素区画を画像の縮小率に
応じて決める工程と、(2)前記(1)の工程で決めた
原画像の算出対象画素区画内の各画素の濃度データの大
小順に応じて、前記原画像の算出対象画素区画内の各画
素に荷重を割り振る工程と、(3)前記(2)の工程で
割り振った荷重によって、前記(1)の工程で決めた原
画像の算出対象画素区画内の各画素を荷重平均した結果
を、前記縮小後の画像の算出対象の画素の濃度データと
する工程と、からなる工程で縮小後の画像の各画素の濃
度データを求めることで原画像を縮小した縮小後の画像
を得て、かつ、前記(2)の工程では、前記(1)の工
程で決めた原画像の算出対象画素区画内の各画素を濃度
データの大小順に並べたときに両端側に並ぶ所定個数の
画素の荷重を「0%」とし、それ以外の複数個の画素に
荷重を割り振ることを特徴とするものである。
The present invention has the following constitution in order to achieve such an object. That is, the invention according to claim 1 provides an image reduction method for reducing an original digital image to obtain an image after reduction, (1)
A step of determining the calculation target pixel section of the original image used for calculating the density data of the calculation target pixel of the reduced image according to the reduction ratio of the image; and (2) the original determination in the step (1). The weight is assigned to each pixel in the calculation target pixel section of the original image according to the density data of each pixel in the calculation target pixel section of the image, and (3) the load is allocated in the step (2). The weighted average of each pixel in the calculation target pixel section of the original image determined in the step (1) by the weight is used as the density data of the calculation target pixel of the reduced image. In the step (2), the reduced image obtained by reducing the original image is obtained by obtaining the density data of each pixel of the image after the reduction , and in the step (2), the process of (1) is performed.
The density of each pixel in the calculation target pixel section of the original image
When arranging in order of magnitude of data, the specified number of
Pixel weight is set to "0%", and other multiple pixels are set.
It is characterized by allocating weights .

【0023】[0023]

【0024】[0024]

【0025】 請求項に記載の発明は、上記請求項
記載の画像縮小方法により、2次元のデジタルの原画
像の2次元方向の画像の縮小を同時に行うことを特徴と
するものである。
The invention described in claim 2 is the above-mentioned claim 1.
According to the image reduction method described in (1), the two-dimensional digital original image is simultaneously reduced in the two-dimensional direction.

【0026】 請求項に記載の発明は、1次元の縮小
方向に画素が並ぶ前記原画像の画素列ごとに、上記請求
1に記載の画像縮小方法で画像縮小処理を行い、前記
原画像を前記縮小方向に縮小することを特徴とするもの
である。
According to a third aspect of the present invention, the image reduction processing is performed by the image reduction method according to the first aspect for each pixel row of the original image in which pixels are arranged in a one-dimensional reduction direction, and the original image is obtained. Is reduced in the reduction direction.

【0027】 請求項に記載の発明は、デジタルの原
画像を縮小して縮小後の画像を得る処理をコンピュータ
に実行させるためのプログラムを記録した記憶媒体であ
って、(1)縮小後の画像の算出対象の画素の濃度デー
タを算出するのに用いる原画像の算出対象画素区画を画
像の縮小率に応じて決める工程と、(2)前記(1)の
工程で決めた原画像の算出対象画素区画内の各画素の濃
度データの大小順に応じて、前記原画像の算出対象画素
区画内の各画素に荷重を割り振る工程と、(3)前記
(2)の工程で割り振った荷重によって、前記(1)の
工程で決めた原画像の算出対象画素区画内の各画素を荷
重平均した結果を、前記縮小後の画像の算出対象の画素
の濃度データとする工程と、からなる工程で縮小後の画
像の各画素の濃度データを求めることで原画像を縮小し
た縮小後の画像を得て、かつ、前記(2)の工程では、
前記(1)の工程で決めた原画像の算出対象画素区画内
の各画素を濃度データの大小順に並べたときに両端側に
並ぶ所定個数の画素の荷重を「0%」とし、それ以外の
複数個の画素に荷重を割り振る処理をコンピュータに実
行させるためのプログラムを記憶媒体に記録したもので
ある。
According to a fourth aspect of the invention, there is provided a storage medium recording a program for causing a computer to execute a process of reducing a digital original image to obtain a reduced image. A step of determining a calculation target pixel section of the original image used for calculating the density data of the pixel of the image calculation target according to the reduction ratio of the image, and (2) calculation of the original image determined in the step (1). According to the magnitude order of the density data of each pixel in the target pixel section, a step of assigning a load to each pixel in the calculation target pixel section of the original image, and (3) the load assigned in the step (2), Reducing the result of weighted averaging of each pixel in the calculation target pixel section of the original image determined in the step (1) as density data of the calculation target pixel of the reduced image. Density data for each pixel in the later image The original image is reduced to obtain an image after reduction , and in the step (2),
Within the calculation target pixel section of the original image determined in step (1)
When each pixel of is arranged in order of magnitude of density data,
The weight of a predetermined number of pixels lined up is set to "0%", and
A program for causing a computer to execute a process of assigning a load to a plurality of pixels is recorded in a storage medium.

【0028】[0028]

【作用】請求項1に記載の発明の作用は次のとおりであ
る。縮小後の画像の各画素の濃度データを以下の(1)
〜(3)の工程で順次求める。
The operation of the invention described in claim 1 is as follows. The density data of each pixel of the reduced image is shown in (1) below.
It is sequentially determined in steps (3) to (3).

【0029】 (1)の工程では、縮小後の画像の算出
対象の画素の濃度データを算出するのに用いる原画像の
算出対象画素区画を画像の縮小率に応じて決める。この
原画像の算出対象画素区画の決め方は、例えば、従来と
同様の演算によって決めることができる。例えば、請求
に記載の発明のように1次元の縮小方向への画像縮
小をその縮小方向に画素が並ぶ原画像の画素列ごとに行
うような場合には、従来方法の式(1)に基づき算出対
象画素区画を決めることができる。また、請求項に記
載の発明のように2次元方向に同時に画像縮小する場合
には、従来方法の式(1)に基づき決まる各方向の算出
対象画素区画で囲まれる2次元の区画をこの(1)の工
程で決める原画像の算出対象画素区画とすればよい。
In the step (1), the calculation target pixel section of the original image used for calculating the density data of the calculation target pixel of the reduced image is determined according to the reduction ratio of the image. The method of determining the calculation target pixel section of the original image can be determined, for example, by the same calculation as in the conventional art. For example, when the image reduction in the one-dimensional reduction direction is performed for each pixel row of the original image in which pixels are arranged in the reduction direction as in the invention described in claim 3 , the formula (1) of the conventional method is used. The calculation target pixel section can be determined based on Further, when the image is reduced in the two-dimensional direction at the same time as in the invention described in claim 2 , the two-dimensional section surrounded by the calculation target pixel section in each direction determined based on the formula (1) of the conventional method is The calculation target pixel section of the original image determined in the step (1) may be used.

【0030】(2)の工程では、上記(1)の工程で決
めた原画像の算出対象画素区画内の各画素の濃度データ
の大小順に応じて、原画像の算出対象画素区画内の各画
素に荷重を割り振り、(3)の工程では、上記(2)の
工程で割り振った荷重によって、上記(1)の工程で決
めた原画像の算出対象画素区画内の各画素を荷重平均し
た結果を、縮小後の画像の算出対象の画素の濃度データ
とする。
In the step (2), each pixel in the calculation target pixel section of the original image is determined according to the density data of each pixel in the calculation target pixel section of the original image determined in the above step (1). In step (3), the weight is averaged for each pixel in the calculation target pixel section of the original image determined in step (1) above according to the load assigned in step (2) above. , The density data of the pixel to be calculated in the reduced image.

【0031】すなわち、従来方法のように原画像の算出
対象画素区画内の各画素の原画像内の位置に応じて割り
振った荷重による荷重平均で縮小後の画像の算出対象の
画素の濃度データを求めるのではなく、原画像の算出対
象画素区画内の各画素の濃度データの大小順に応じて割
り振った荷重による荷重平均で縮小後の画像の算出対象
の画素の濃度データを求めるようにしている。
That is, as in the conventional method, the density data of the pixel to be calculated in the image after being reduced by the weighted average by the weight assigned according to the position in the original image of each pixel in the pixel to be calculated in the original image is calculated. Instead of obtaining the density data, the density data of the pixel to be calculated in the image after reduction is obtained by the weighted average by the weights assigned according to the magnitude data of the density data of each pixel in the calculation target pixel section of the original image.

【0032】このように画像縮小することで、原画像の
算出対象画素区画内の各画素の位置と無関係に、原画像
の算出対象画素区画内の濃度データの分布状態に応じた
荷重平均により縮小後の画像の各画素の濃度データを求
めることができ、縮小後の画像に原画像の算出対象画素
区画内の各画素の濃度データの分布状態を反映させるこ
とができ、画像縮小による画質の低下を防ぐことができ
る。
By thus reducing the image, regardless of the position of each pixel in the calculation target pixel section of the original image, the image is reduced by the weighted average according to the distribution state of the density data in the calculation target pixel section of the original image. The density data of each pixel of the subsequent image can be obtained, and the distribution state of the density data of each pixel in the calculation target pixel section of the original image can be reflected in the reduced image, resulting in deterioration of image quality due to image reduction. Can be prevented.

【0033】原画像の算出対象画素区画内の各画素の濃
度データの大小順に応じた荷重の割り振り方としては、
例えば、請求項2、3に記載の発明のように、原画像の
算出対象画素区画内の各画素を濃度データの大小順に並
べたときに中央(付近)にくる1または複数個の画素の
荷重を大きくするように割り振るのが好ましい。
As a method of allocating the load according to the magnitude order of the density data of each pixel in the calculation target pixel section of the original image,
For example, as in the invention described in claims 2 and 3, when each pixel in the calculation target pixel section of the original image is arranged in order of magnitude of density data, the load of one or a plurality of pixels that come to the center (nearby) It is preferable to allocate so as to increase.

【0034】[0034]

【0035】 また、請求項に記載の発明では、上記
(1)の工程で決めた原画像の算出対象画素区画内の各
画素を濃度データの大小順に並べたときに両端側(濃度
データが大きい側および小さい側)に並ぶ所定個数の画
素の荷重を「0%」として荷重平均から除外し、それ以
外の複数個の画素、すなわち、前記各画素を濃度データ
の大小順に並べたときに中央付近にくる複数個の画素
(中央値付近画素群)に荷重を割り振って、この中央値
付近画素群の荷重平均によって縮小後の画像の各画素の
濃度データを求める。このようにすれば、前記中央値付
近画素群での荷重平均であるので、縮小後の画像の画素
の濃度データがボケたり低下することが軽減され、一方
で、上記中央値画素にノイズ成分が含まれていた場合に
もそのノイズ成分を軽減することができる。さらに、前
記各画素を濃度データの大小順に並べたときに両端側に
並ぶ所定個数の画素を除外して荷重平均しているので、
濃度データが大きい、または、小さい画素に含まれるノ
イズ成分の影響を除去して画像縮小することもできる。
According to the first aspect of the invention, when the pixels in the calculation target pixel section of the original image determined in the step (1) are arranged in the descending order of the density data (the density data is The weight of a predetermined number of pixels arranged on the large side and the small side is set as “0%” and excluded from the weighted average, and a plurality of other pixels, that is, the pixels when the pixels are arranged in descending order of density data A weight is assigned to a plurality of pixels (pixel groups near the median value) in the vicinity, and the density data of each pixel of the reduced image is obtained by the weighted average of the pixel groups near the median value. By doing so, since the weighted average is obtained in the pixel group near the median value, it is possible to prevent the density data of the pixels of the image after reduction from being blurred or lowered, and on the other hand, the noise component may be present in the median pixel. Even if it is included, the noise component can be reduced. Furthermore, when the pixels are arranged in order of magnitude of density data, a predetermined number of pixels arranged on both ends are excluded to perform weighted averaging.
It is also possible to reduce the image by removing the influence of the noise component contained in the pixels having large or small density data.

【0036】 請求項に記載の発明では、2次元のデ
ジタルの原画像の2次元方向の画像縮小を同時に、か
つ、好適に行うことができる。
According to the second aspect of the invention, the image reduction in the two-dimensional direction of the two-dimensional digital original image can be performed simultaneously and suitably.

【0037】 また、請求項に記載の発明では、従来
方法と同様に1次元の縮小方向に画素が並ぶ原画像の画
素列ごとに画像縮小処理を行い、原画像を縮小方向に縮
小する処理を好適に行うことができる。
According to the third aspect of the invention, similar to the conventional method, image reduction processing is performed for each pixel row of the original image in which pixels are arranged in the one-dimensional reduction direction, and the original image is reduced in the reduction direction. Can be suitably performed.

【0038】 請求項に記載の発明によれば、記憶媒
体に記録されたプログラムをコンピュータに読み込ませ
ることにより、そのコンピュータが請求項1に記載の発
明に係る画像縮小処理を実行する。
According to the invention described in claim 4 , by causing the computer to read the program recorded in the storage medium, the computer executes the image reduction processing according to the invention described in claim 1.

【0039】[0039]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態を説明する。図1は本発明に係る画像縮小方法
を実施するハードウエア構成の一例を示すブロック図で
ある。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an example of a hardware configuration for implementing an image reduction method according to the present invention.

【0040】図1はコンピュータシステムで構成されて
いる。デジタルの原画像を縮小して縮小後の画像を得る
画像縮小処理を実行するCPU10が、バスライン20
を介してRAMなどで構成される内部メモリ30に接続
されている。この内部メモリ30には、画像縮小処理を
実行する際にプログラムが移植されるプログラムメモリ
31、原画像を記憶する原画像メモリ32、縮小後の画
像を記憶する縮小後画像メモリ33などの各領域がそれ
ぞれ設定されている。また、CPU10は入出力インタ
ーフェイス40を介して、外部記憶装置用のドライバ4
1、原画像入力器42、出力器43、設定器44などと
接続されている。
FIG. 1 is composed of a computer system. The CPU 10 that executes the image reduction process for reducing the digital original image to obtain the reduced image is the bus line 20.
Is connected to an internal memory 30 configured by a RAM or the like. In this internal memory 30, areas such as a program memory 31 into which a program is ported when executing image reduction processing, an original image memory 32 for storing an original image, and a reduced image memory 33 for storing a reduced image are included. Are set respectively. The CPU 10 also controls the driver 4 for the external storage device via the input / output interface 40.
1, an original image input device 42, an output device 43, a setting device 44, etc.

【0041】ドライバ41には外部記憶装置45が装填
される。この外部記憶装置45には予め作成された画像
縮小処理プログラムが保存されている。外部記憶装置4
5は、光磁気ディスク、CD−ROM、フロッピーディ
スク、ハードディスク、磁気テープその他の記憶媒体で
構成される。装置の電源がONされ、本実施例に係る画
像縮小処理が起動されると、外部記憶装置45から画像
縮小処理プログラムが読み込まれてプログラムメモリ3
1に記憶され、CPU10がその画像縮小処理プログラ
ムに従って後述する画像縮小処理を実行する。この画像
縮小処理プログラムが記憶された外部記憶装置45は、
本発明におけるプログラムを記録した記憶媒体に相当す
る。
An external storage device 45 is loaded in the driver 41. An image reduction processing program created in advance is stored in the external storage device 45. External storage device 4
Reference numeral 5 comprises a magneto-optical disk, a CD-ROM, a floppy disk, a hard disk, a magnetic tape and other storage media. When the power of the apparatus is turned on and the image reduction processing according to the present embodiment is activated, the image reduction processing program is read from the external storage device 45 and the program memory 3 is read.
1 and the CPU 10 executes the image reduction processing described later according to the image reduction processing program. The external storage device 45 in which this image reduction processing program is stored is
It corresponds to the storage medium recording the program in the present invention.

【0042】原画像入力器42は、原画像を入力する機
器で、例えば、デジタルカメラや入力スキャナ、特開平
3−16367号公報などに開示されたCCDなどのラ
インセンサを用いた画像取り込み装置などで構成され
る。この原画像入力器42で入力された原画像が原画像
メモリ32に記憶され、その原画像に対して後述する画
像縮小処理が施され、縮小後の画像が縮小後メモリ33
に記憶される。なお、予め入力された原画像を外部記憶
装置に記憶しておき、その外部記憶装置から原画像を読
み込んで原画像メモリ32に記憶して、その原画像に対
して画像縮小処理を施すように構成してもよい。
The original image input device 42 is a device for inputting an original image, and is, for example, a digital camera, an input scanner, an image capturing device using a line sensor such as a CCD disclosed in Japanese Patent Laid-Open No. 16367/1990. Composed of. The original image input by the original image input device 42 is stored in the original image memory 32, and the original image is subjected to image reduction processing described later, and the reduced image is the reduced memory 33.
Memorized in. It should be noted that the previously input original image is stored in an external storage device, the original image is read from the external storage device, stored in the original image memory 32, and the image reduction processing is performed on the original image. You may comprise.

【0043】原画像メモリ32は、図2に示すように、
2次元のデジタルの原画像を記憶できるように構成され
ており、縮小後画像メモリ33は、図3に示すように、
2次元のデジタルの縮小後の画像を記憶できるように構
成されている。
The original image memory 32, as shown in FIG.
The reduced-size image memory 33 is configured to store a two-dimensional digital original image, as shown in FIG.
It is configured to store a two-dimensional digital reduced image.

【0044】出力器43は、縮小後画像メモリ33に生
成された縮小後の画像を出力するためのもので、例え
ば、表示器や記録用スキャナ、プリンタなどで構成され
る。なお、縮小後の画像を外部記憶装置に保存するよう
に構成してもよい。
The output device 43 is for outputting the reduced image generated in the reduced image memory 33, and is composed of, for example, a display device, a recording scanner, a printer and the like. The reduced image may be stored in an external storage device.

【0045】設定器44は、各種の設定や指定、指示な
どを行うためのもので、キーボードやマウス、スイッ
チ、設定用モニタなどで構成されている。
The setting device 44 is for making various settings, designations and instructions, and is composed of a keyboard, a mouse, a switch, a setting monitor and the like.

【0046】以下、上記構成による第1の画像縮小処理
を図4に示すフローチャートを参照して説明する。な
お、図4は2次元のデジタルの原画像の2次元方向の画
像縮小を同時に行う場合のフローチャートである。ま
た、処理が開始される時点で原画像は原画像メモリ32
に記憶されているものとする。
The first image reduction processing with the above configuration will be described below with reference to the flowchart shown in FIG. Note that FIG. 4 is a flow chart in the case of simultaneously performing image reduction in a two-dimensional direction of a two-dimensional digital original image. Also, the original image is stored in the original image memory 32 when the processing is started.
Be stored in.

【0047】以下の説明において、s、P(s)、t、
Q(t)、s(t)、s(1)、ah、R(t)、G
(t)は基本的に従来方法と同じ意味であり、特に、X
方向、Y方向を区別する必要がある場合には各符号に方
向を示す添え字を付し(X方向〔sX 、tX 、sX (t
X )、sX (1)、ahX 、RX (tX )、G
X (tX)〕、Y方向〔sY 、tY 、sY (tY )、s
Y (1)、ahY 、RY (tY )、GY (tY )〕)、
原画像の各画素を2次元で示す場合には2次元座標(s
X,sY )で、原画像の各画素の濃度データを2次元で
示す場合には2次元表記(P(sX ,sY ))で表し、
同様に、縮小後の画像についても各画素を2次元で示す
場合には2次元座標(tX ,tY )で、濃度データを2
次元で示す場合には2次元表記(Q(tX ,tY ))で
表す。また、図5に示すように、RX (tX)とR
Y (tY )とで囲まれる2次元の算出対象領域をR
XY(tX ,tY )で表し、GX (tX )とGY (tY
とで囲まれる2次元の算出対象画素区画をGXY(tX
Y )で表す。
In the following description, s, P (s), t,
Q (t), s (t), s (1), ah, R (t), G
(T) basically has the same meaning as in the conventional method, in particular, X
When it is necessary to distinguish the direction and the Y direction, each code is attached with a subscript indicating the direction (X direction [s X , t X , s X (t
X ), s X (1), ah X , R X (t X ), G
X (t X )], Y direction [s Y , t Y , s Y (t Y ), s
Y (1), ah Y , R Y (t Y ), G Y (t Y )]),
When each pixel of the original image is shown in two dimensions, two-dimensional coordinates (s
X , s Y ), when the density data of each pixel of the original image is shown in two dimensions, it is expressed by two-dimensional notation (P (s X , s Y )),
Similarly, in the reduced image, when each pixel is shown in two dimensions, two-dimensional coordinates (t X , t Y ) are used and the density data is set to two.
When it is indicated by dimension, it is expressed by two-dimensional notation (Q (t X , t Y )). Further, as shown in FIG. 5, R X (t X ) and R X
Let R be the two-dimensional calculation target area surrounded by Y (t Y ).
Represented by XY (t X , t Y ), G X (t X ) and G Y (t Y )
A two-dimensional calculation target pixel section surrounded by and is G XY (t X ,
t Y ).

【0048】図4のステップS1(本発明の(1)の工
程に相当):縮小後の画像の算出対象の画素の濃度デー
タ(Q(tX ,tY ))を算出するのに用いる原画像の
(2次元の)算出対象画素区画(GXY(tX ,tY ))
を画像の縮小率(n/m)に応じて決める。
Step S1 of FIG. 4 (corresponding to the step (1) of the present invention): an original used to calculate the density data (Q (t X , t Y )) of the pixel to be calculated in the reduced image. Calculation target pixel section of image (two-dimensional) (G XY (t X , t Y ))
Is determined according to the reduction ratio (n / m) of the image.

【0049】この算出対象画素区画GXY(tX ,tY
は、例えば、従来の(1)式に基づき決めることができ
る。すなわち、X方向の算出対象画素区画G
X (tX )、Y方向の算出対象画素区画GY (tY )を
それぞれ(1)式に基づき決めて、これらGX (tX
とGY (tY )とで囲まれる2次元の算出対象画素区画
を、GXY(tX ,tY )とする。X方向の算出対象画素
区画GX (tX )は、原画像のX方向についてsX (t
X )番目の画素からsX (tX +1)番目の画素までの
画素を含む区画となる。ただし、n−aX (tX )=0
の場合((1)式の右辺第1項の係数が「0」となる場
合)には原画像のX方向について(sX (tX )+1)
番目の画素からsX (tX +1)番目の画素までの画素
を含む区画となる。同様に、Y方向の算出対象画素区画
Y (tY )は、原画像のY方向についてs Y (tY
番目の画素からsY (tY +1)番目の画素までの画素
を含む区画(ただし、n−aY (tY )=0の場合には
原画像のY方向について(sY (tY)+1)番目の画
素からsY (tY +1)番目の画素までの画素を含む区
画)となる。
This calculation target pixel section GXY(TX, TY)
Can be determined based on the conventional equation (1), for example.
It That is, the calculation target pixel section G in the X direction
X(TX), Calculation target pixel section G in the Y directionY(TY)
Each of these G is decided based on the equation (1).X(TX)
And GY(TY) Two-dimensional calculation target pixel area surrounded by and
To GXY(TX, TY). Calculation target pixel in X direction
Section GX(TX) Is s in the X direction of the original imageX(T
X) Th pixel to sX(TXUp to the +1) th pixel
It becomes a section including pixels. However, naX(TX) = 0
In the case of (when the coefficient of the first term on the right side of equation (1) is “0”)
In the X direction of the original image (s)X(TX) +1)
S from the th pixelX(TXPixels up to +1) th pixel
It will be a section containing. Similarly, the calculation target pixel section in the Y direction
GY(TY) Is s in the Y direction of the original image Y(TY)
S from the th pixelY(TYPixels up to +1) th pixel
(Including n-aY(TY) = 0
About the Y direction of the original image (sY(TY) +1) th image
From sY(TYSection including pixels up to +1) th pixel
Image).

【0050】なお、aX (tX )=(ahX +(m×
(tX −1))) mod nであり、aY (tY )=
(ahY +(m×(tY −1))) mod nであ
る。
Note that a X (t X ) = (ah X + (m ×
(T X −1))) mod n, and a Y (t Y ) =
(Ah Y + (m × (t Y −1))) mod n.

【0051】また、ahX 、ahY を一義的に「0」と
して(aX (tX )=(m×(tX−1)) mod
n、aY (tY )=(m×(tY −1)) mod
n)でGX (tX )、GY (tY )を決めてG
XY(tX ,tY )を決めてもよい。
Further, ah X and ah Y are uniquely set to “0” (a X (t X ) = (m × (t X −1)) mod.
n, a Y (t Y ) = (m × (t Y −1)) mod
n) determines G X (t X ) and G Y (t Y ) and G
XY (t X , t Y ) may be determined.

【0052】例えば、図20(a)の場合では、G
XY(1,1)は原画像の(1〜4,1〜4)、すなわ
ち、(1,1)、(2,1)、(3,1)、(4,
1)、(1,2)、(2,2)、(3,2)、(4,
2)、(1,3)、(2,3)、(3,3)、(4,
3)、(1,4)、(2,4)、(3,4)、(4,
4)の16個の画素からなる区画、GXY(2,1)は原
画像の(4〜7,1〜4)の16個の画素からなる区
画、GXY(3,1)は原画像の(8〜11,1〜4)の
16個の画素からなる区画、…、GXY(1,2)は原画
像の(1〜4,4〜7)の16個の画素からなる区画、
…である。
For example, in the case of FIG.
XY (1,1) is (1 to 4,1 to 4) of the original image, that is, (1,1), (2,1), (3,1), (4,
1), (1, 2), (2, 2), (3, 2), (4
2), (1,3), (2,3), (3,3), (4
3), (1,4), (2,4), (3,4), (4
4) 16 pixels section, G XY (2,1) is the original image section of (4 to 7,1 to 4) 16 pixels, G XY (3,1) is the original image , (8 to 11, 1 to 4) consisting of 16 pixels, ..., G XY (1,2) is a section of (1 to 4, 4 to 7) consisting of 16 pixels of the original image,
Is ...

【0053】このように算出対象画素区画GXY(tX
Y )を決めて、このGXY(tX ,tY )内の画素を使
って縮小後の画像の算出対象の画素の濃度データQ(t
X ,tY )を求めることで、図6に示すように、原画像
OGのX、Y方向それぞれの処理範囲SHで囲まれる2
次元の処理範囲(点線で囲まれる範囲)全体をn/m倍
に略均等に縮小した縮小後の画像SGを得ることができ
る。原画像OGのX方向または/およびY方向に不要画
素がなければ不要画素がない方向については原画像OG
のその方向全体を処理範囲SHとして処理する。X方向
(Y方向)の処理範囲SHはsX (1)、ahX (sY
(1)、ahY )などで設定できるが、X方向(Y方
向)の処理範囲SHの後尾の画素の画素No(s
X(LIM)(sY(LIM)))を設定するように構成してもよ
い。
In this way, the calculation target pixel section G XY (t X ,
t Y ), and the density data Q (t) of the pixel to be calculated in the reduced image is calculated by using the pixels in G XY (t X , t Y ).
X , t Y ), the original image OG is surrounded by the processing ranges SH in the X and Y directions, respectively, as shown in FIG.
It is possible to obtain the reduced image SG in which the entire dimensional processing range (the range surrounded by the dotted line) is reduced substantially evenly by n / m times. If there are no unnecessary pixels in the X direction and / or Y direction of the original image OG, the original image OG
The entire processing range SH is processed as the processing range SH. The processing range SH in the X direction (Y direction) is s X (1), ah X (s Y
(1), ah Y ), etc., but the pixel number (s) of the last pixel of the processing range SH in the X direction (Y direction)
It may be configured to set X (LIM) (s Y (LIM) ).

【0054】なお、縮小率(n/m)やsX (1)、a
X 、sY (1)、ahY (sX(LI M)、sY(LIM))など
の必要なデータは、ステップS1の処理に先立ち、設定
器44などから設定される。
The reduction ratio (n / m), s X (1), a
Necessary data such as h X , s Y (1), a h Y (s X (LI M) , s Y (LIM) ) are set by the setter 44 or the like prior to the process of step S1.

【0055】図4のステップS2(本発明の(2)の工
程に相当):上記ステップS1で決めた原画像の算出対
象画素区画GXY(tX ,tY )内の各画素の濃度データ
の大小順に応じて、前記原画像の算出対象画素区画GXY
(tX ,tY )内の各画素に荷重を割り振る。
Step S2 in FIG. 4 (corresponding to the step (2) of the present invention): density data of each pixel in the calculation target pixel section G XY (t X , t Y ) of the original image determined in the above step S1 Of the original image calculation target pixel section G XY
A weight is assigned to each pixel in (t X , t Y ).

【0056】この荷重の割り振り方の一例を図7に示
す。図では算出対象画素区画GXY(t X ,tY )の各画
素を濃度データの大小順に並べた状態を示し、sC は前
記GXY(tX ,tY )の各画素を濃度データの大小順に
並べたときに中央にくる1画素(中央値画素)であり、
MAX 、sMIN は前記GXY(tX ,tY )内の画素のう
ち、濃度データが最大値、最小値の画素を示す。すなわ
ち、sMAX ≧…≧sC ≧…≧sMIN である。なお、濃度
データの大小順に応じた並べ替えは通常のソートプログ
ラムで行える。また、例えば、図20(a)のQ(1,
3)を算出するための原画像の算出対象画素区画G
XY(1,3)(GX (1)、GY (3)で囲まれる2次
元の算出対象画素区画)を濃度データの大小順に並べる
と、図8に示すようになる。
An example of how to allocate the load is shown in FIG.
You In the figure, the calculation target pixel section GXY(T X, TY) Each picture
It shows a state in which elements are arranged in order of magnitude of concentration data, and sCIs before
Note GXY(TX, TY) Each pixel in descending order of density data
It is one pixel (median value pixel) that comes to the center when arranged,
sMAX, SMINIs the above GXY(TX, TY) Inside the pixel
Then, the density data indicates pixels having maximum and minimum values. Sanawa
SMAX≧ ... ≧ sC≧ ... ≧ sMINIs. The concentration
Normal sort program is used to sort data in order of magnitude.
You can do it with rum. In addition, for example, Q (1,
Calculation target pixel section G of the original image for calculating 3)
XY(1,3) (GX(1), GYSecondary surrounded by (3)
Original calculation target pixel section) is arranged in order of magnitude of density data
Then, it becomes as shown in FIG.

【0057】図7(a)は、中央値画素sC の荷重を
「100%」とし、中央値画素sC 以外の画素の荷重を
全て「0%」としたものである。
In FIG. 7A, the weight of the median pixel s C is set to “100%”, and the weight of all the pixels other than the median pixel s C is set to “0%”.

【0058】図7(b)、(c)は、前記GXY(tX
Y )内の各画素を濃度データの大小順に並べたときに
両端側(濃度データが大きい側および小さい側)に並ぶ
所定個数の画素の荷重を「0%」とした場合であって、
図7(b)では、残りの複数個の画素(中央値付近画素
群)に荷重を均等に割り振ったものであり、図7(c)
では、中央値付近画素群の各画素に荷重を山型に、すな
わち、中央の画素の荷重を最も大きく、濃度データが最
大、最小に近づくに従って荷重を小さく割り振ったもの
である。
FIGS. 7B and 7C show the above G XY (t X ,
t Y ) when the pixels are arranged in descending order of density data, the load of a predetermined number of pixels arranged on both ends (the side where the density data is large and the side where the density data is small) is “0%”.
In FIG. 7B, the weight is evenly distributed to the remaining plurality of pixels (pixel group near the median value), and FIG.
Then, the weight is assigned to each pixel of the pixel group around the median value in a mountain shape, that is, the weight of the pixel in the center is the largest, and the weight is assigned smaller as the density data approaches the maximum and the minimum.

【0059】上記以外の形態で荷重を割り振ってもよい
が、前記各画素を濃度データの大小順に並べたときに中
央付近にくる画素の荷重を大きくし、両端側に近づくに
従って荷重を小さくするように荷重を割り振るのが好ま
しい。このように荷重を割り振ることにより、濃度デー
タが大きい、または、小さい画素に含まれるノイズ成分
の影響を除去して画像縮小することができる。
The load may be assigned in a form other than the above, but when the pixels are arranged in order of magnitude of density data, the load of the pixel near the center is increased, and the load is decreased toward both ends. It is preferable to allocate the load to. By allocating the weight in this way, it is possible to reduce the image by removing the influence of the noise component contained in the pixel having large or small density data.

【0060】なお、前記GXY(tX ,tY )内の画素数
が偶数個の場合には、中央値画素s C が決まらないが、
この場合には、例えば以下の、の方法によって前記
XY(tX ,tY )内の1画素を除外して前記GXY(t
X ,tY )内の処理対象の画素数を奇数個にする。
The above GXY(TX, TYNumber of pixels in
Is an even number, the median pixel s CIs not decided,
In this case, for example, by the following method,
GXY(TX, TY), Except for one pixel inXY(T
X, TYThe number of pixels to be processed in () is an odd number.

【0061】 前記GXY(tX ,tY )内の予め決め
られた位置の1画素(例えば、左上隅の1画素や右下隅
の1画素など)を除外する。なお、後述する第2の画像
縮小処理において、X方向に縮小する場合は、例えばG
X (tX )内の両端部の画素のうち、sX (1)側の1
画素かsX(MAX)側の1画素のいずれか一方の1画素を除
去し、Y方向に縮小する場合は、例えばGY (tY )内
の両端部の画素のうち、sY (1)側の1画素かs
Y(MAX)側の1画素のいずれか一方の1画素を除去する。
One pixel at a predetermined position in G XY (t X , t Y ) (for example, one pixel in the upper left corner or one pixel in the lower right corner) is excluded. In the second image reduction processing described later, when reducing in the X direction, for example, G
Of the pixels at both ends in X (t X ), 1 on the s X (1) side
In the case of removing one pixel of either the pixel or the one pixel on the s X (MAX) side and reducing in the Y direction, for example, among pixels at both ends in G Y (t Y ), s Y (1 ) Side pixel or s
One of the pixels on the Y (MAX) side is removed.

【0062】 (1)式のP(s(t))またはP
(s(t)+1)の荷重値((n−a(t))/m)ま
たはn/mと、P(s(t+1))の荷重値(a(t+
1)/m)とに基づき決める。まず、除外する1画素の
X座標を以下のように決める。GX (tX )がsX (t
X )の画素からsX (tX +1)の画素までである場合
には、((n−aX (tX ))/m)と(aX (tX
1)/m)との大小を比較し、((n−aX (tX ))
/m)<(aX (tX +1)/m)のときは除外する1
画素のX座標をsX (tX )とし、((n−a
X (tX ))/m)>(a X (tX +1)/m)のとき
は除外する1画素のX座標をsX (tX +1)とする。
((n−aX (tX ))/m)=(aX (tX +1)/
m)のときは、除外する1画素のX座標をsX (tX
にするかsX (tX +1)にするかを予め決めておく。
X (tX )が(sX (tX )+1)の画素からs
X (tX +1)の画素までである場合には、n/m≧
(aX (tX +1)/m)であるので、除外する1画素
のX座標をsX (tX +1)とする。除外する1画素の
Y座標も上記X座標と同様にして決める。これにより決
まったX、Y座標値の原画像の1画素を除外する。例え
ば、図20(a)のGXY(1,1)は原画像の(4,
4)の画素を除外し、GXY(3,1)は原画像の(1
1,4)の画素を除外することになる。なお、これは算
出対象画素区画GXY(tX ,tY )に算出対象領域RXY
(t X ,tY )を重ね合わせたときに前記RXY(tX
Y )を有する面積が最も小さい前記GXY(tX
Y )内の画素を選ぶことに相当する。また、後述する
第2の画像縮小処理において、X方向に縮小する場合は
上記の除去画素のX座標の決め方によりGX (tX )内
の除去画素を決め、Y方向に縮小する場合は上記の除去
画素のY座標の決め方によりGY (tY )内の除去画素
を決める。
P (s (t)) or P in equation (1)
(S (t) +1) load value ((n−a (t)) / m)
Or n / m and the load value of P (s (t + 1)) (a (t +
1) / m). First of all,
The X coordinate is determined as follows. GX(TX) Is sX(T
X) Pixel to sX(TXUp to +1) pixels
Includes ((na)X(TX)) / M) and (aX(TX+
1) / m) and the size of ((n−a)X(TX))
/ M) <(aX(TXExclude when +1) / m) 1
The X coordinate of the pixel is sX(TX), And ((na)
X(TX)) / M)> (a X(TXWhen +1) / m)
Is the X coordinate of one pixel to excludeX(TX+1).
((NaX(TX)) / M) = (aX(TX+1) /
In the case of m), the X coordinate of one pixel to be excluded is sX(TX)
Do you sX(TXIt is decided in advance whether it will be +1).
GX(TX) Is (sX(TX) +1) pixel to s
X(TXN / m ≧ when the number of pixels is up to +1)
(AX(TX+1) / m), so one pixel to exclude
X coordinate of sX(TX+1). 1 pixel to exclude
The Y coordinate is also determined in the same manner as the X coordinate. By this
Exclude one pixel of the original image with the set X and Y coordinate values. example
For example, G in FIG.XY(1,1) is (4,4 of the original image
Excluding the pixel of 4), GXY(3,1) is the (1
The pixels 1 and 4) will be excluded. Note that this is
Output target pixel section GXY(TX, TY) Calculation target area RXY
(T X, TY), The above RXY(TX
tY) With the smallest area havingXY(TX
tY) Is equivalent to selecting the pixel in. Also described later
In the second image reduction processing, when reducing in the X direction,
G depending on the above-mentioned method of determining the X coordinate of the removed pixelX(TX)
If you decide the pixel to be removed and reduce it in the Y direction,
G depending on how the Y coordinate of the pixel is determinedY(TYPixels in)
Decide.

【0063】図7(b)、(c)の荷重の割り振りにお
いて、両端側の荷重を「0%」とする画素の個数は、例
えば、前記GXY(tX ,tY )内の全画素数に占める割
合で決める。例えば、前記GXY(tX ,tY )内の全画
素が15画素であり、荷重を「0%」とする画素の割合
を各端部それぞれで全体の1/3とすると、濃度データ
が大きい側から5画素、小さい側から5画素除外し、残
り5画素に荷重を割り振る。割合は%などで決めてよ
い。また、前記割合の計算に小数が出る場合には切り上
げ計算する。例えば、GXY(tX ,tY )内の全画素が
15画素であり、荷重を「0%」とする画素の割合を各
端側それぞれで全体の「30%」とすると、15/(3
0/100)で4.5となるので切り上げて濃度データ
が大きい側から5画素、小さい側から5画素除外する。
なお、図7(b)、(c)の場合も、前記GXY(tX
Y )内の画素数が偶数個のとき上記やにより1画
素除外して前記GXY(tX ,tY )内の画素数を奇数個
にしてから荷重を割り振ってもよい。
In the load allocation shown in FIGS. 7B and 7C, the number of pixels for which the load on both ends is "0%" is, for example, all the pixels in G XY (t X , t Y ). Determined by the ratio to the number. For example, if all the pixels in G XY (t X , t Y ) are 15 pixels and the ratio of the pixels for which the load is “0%” is 1/3 of the total at each end, the density data is 5 pixels from the larger side and 5 pixels from the smaller side are excluded, and the weight is allocated to the remaining 5 pixels. The percentage may be determined by% or the like. In addition, when a decimal number appears in the calculation of the ratio, it is rounded up. For example, if all the pixels in G XY (t X , t Y ) are 15 pixels and the ratio of the pixels for which the load is “0%” is “30%” of each end side, the total is 15 / ( Three
Since 0/100) is 4.5, it is rounded up and 5 pixels are excluded from the side having the larger density data and 5 pixels are excluded from the side having the smaller density data.
In the case of FIGS. 7B and 7C, the above G XY (t X ,
When the number of pixels in t Y ) is an even number, one pixel may be excluded by the above and the number of pixels in G XY (t X , t Y ) may be made an odd number, and then the load may be allocated.

【0064】複数個の画素に荷重を割り振る場合には、
荷重の合計が「100%」になるように各画素の荷重を
決める。
When a weight is assigned to a plurality of pixels,
The weight of each pixel is determined so that the total weight is “100%”.

【0065】荷重の割り振りの形態は、予め決めておい
てもよいし、原画像ごとに設定器44などから指定する
ようにしてもよい。
The form of load allocation may be determined in advance, or may be specified for each original image from the setter 44 or the like.

【0066】図4のステップS3(本発明の(3)の工
程に相当):上記ステップS2で割り振った荷重によっ
て、ステップS1で決めた原画像の算出対象画素区画G
XY(tX ,tY )内の各画素を荷重平均した結果を、縮
小後の画像の算出対象の画素の濃度データQ(tX ,t
Y )とする。
Step S3 of FIG. 4 (corresponding to the step (3) of the present invention): The calculation target pixel section G of the original image determined in step S1 by the load allocated in step S2.
The result of weighted averaging of each pixel in XY (t X , t Y ) is the density data Q (t X , t of the pixel to be calculated in the reduced image.
Y ).

【0067】例えば、図7(a)に示すように荷重を割
り振った場合は、中央値画素sC の濃度データがそのま
ま縮小後の画像の算出対象の画素の濃度データQ
(tX ,t Y )となる。このようにして縮小後の画像の
算出対象の画素の濃度データQ(t X ,tY )を求める
ことで、複数画素の荷重平均を行わないので、縮小後の
画像の画素の濃度データがボケたり低下するようなこと
がない。また、図20(a)のように白黒に2値化され
た原画像を縮小する場合に、原画像の算出対象画素区画
内に占める白の画素数の方が黒の画素数よりも多い場合
には縮小後の画像の算出対象の画素の濃度データを白の
濃度データにし、黒の画素数の方が白の画素数よりも多
い場合には縮小後の画像の算出対象の画素の濃度データ
を黒の濃度データにして選択するというように、縮小後
の画像の算出対象の画素の濃度データとして原画像の算
出対象画素区画内に占める白、黒の画素数の多い方の濃
度データを選択することもできる。さらに、濃度データ
が大きい、または、小さい画素に含まれるノイズ成分の
影響を除去して画像縮小することもできる。また、図2
0(a)の原画像のGXY(3,1)のように算出対象画
素区画内の全画素の濃度データが同じであるべきとき
に、一部の画素にノイズが含まれると、従来方法ではそ
のノイズ成分の影響を受けることになるが、図7(a)
〜(c)のように荷重を割り振ると、上記ノイズ成分の
影響を除去して画像を縮小できる。
For example, the load is divided as shown in FIG.
When shaken, the median pixel sCThe concentration data of
The density data Q of the pixel to be calculated in the image after reduction
(TX, T Y). In this way, the image after reduction
The density data Q (t X, TY) Ask
By doing so, weighted averaging of multiple pixels is not performed.
The density data of pixels in the image may be blurred or deteriorated.
There is no. Further, as shown in FIG. 20 (a), it is binarized into black and white.
If the original image is to be reduced, the calculation target pixel section of the original image
If the number of white pixels in the image is greater than the number of black pixels
Is the density data of the pixel to be calculated in the reduced image.
Use density data, and the number of black pixels is greater than the number of white pixels.
If not, the density data of the pixel to be calculated in the reduced image
After reduction, such as selecting as black density data
Calculation of the original image as the density data of the target pixel
The darker one with the larger number of white and black pixels in the output target pixel section
You can also select frequency data. In addition, concentration data
Of the noise component included in the pixel with large or small
The image can be reduced by removing the influence. Also, FIG.
G of the original image of 0 (a)XYCalculation target image such as (3, 1)
When the density data of all pixels in the elementary section should be the same
If some pixels contain noise, the conventional method will
Will be affected by the noise component of
When the weights are allocated as shown in (c), the noise component
The image can be reduced by removing the influence.

【0068】図7(a)に示すように荷重を割り振っ
て、図20(a)の原画像を縮小した結果を図9に示
す。図9(a)と図20(b)とを見比べても明らかな
ように、図9(a)では縮小後の画像SGの各画素の濃
度データがボケたり低下するのが防止され、好適に画像
縮小されている。
FIG. 9 shows the result of reducing the original image of FIG. 20 (a) by allocating the load as shown in FIG. 7 (a). As is clear from a comparison between FIG. 9A and FIG. 20B, in FIG. 9A, it is possible to prevent the density data of each pixel of the image SG after reduction from being blurred or lowered, which is preferable. The image has been reduced.

【0069】また、sX (1)=sY (1)=1、ah
X =ahY =0としてX、Y方向それぞれに9/10に
画像縮小する処理を従来方法で行うと、図10に示すよ
うに、Q(5,5)は、P(5,5)、P(6,5)、
P(6,5)、P(6,6)の4画素の等平均となって
Q(5,5)はボケるが、図7(a)に示すように荷重
を割り振れば、前記4画素のうちの1画素を選択するこ
とになるのでQ(5,5)はボケず、縮小後の画像に格
子状のムラが発生するのを防止できる。
Also, s X (1) = s Y (1) = 1, ah
When X = ah Y = 0 and the image reduction processing is performed by 9/10 in each of the X and Y directions by the conventional method, as shown in FIG. 10, Q (5,5) is P (5,5), P (6,5),
P (6,5) and P (6,6) have an equal average of four pixels, and Q (5,5) is blurred. However, if a load is allocated as shown in FIG. Since one of the pixels is selected, Q (5,5) is not blurred, and it is possible to prevent grid-like unevenness from occurring in the reduced image.

【0070】なお、後述する第2の画像縮小処理におい
ても、図21のQ(5)を算出する際に図7(a)に示
すように荷重を割り振れば、2画素のうちの1画素を選
択することになるのでQ(5)はボケず、縮小後の画像
に直線状のムラが発生するのを防止できる。
Even in the second image reduction processing to be described later, if a load is allocated as shown in FIG. 7A when calculating Q (5) in FIG. Since Q (5) is not blurred, it is possible to prevent linear unevenness from occurring in the reduced image.

【0071】図7(b)、(c)に示すように荷重を割
り振った場合は、中央値付近画素群の各画素の濃度デー
タに各々に割り振られた荷重を掛け合わせた結果の合計
を、縮小後の画像の算出対象の画素の濃度データQ(t
X ,tY )とする。このようにして縮小後の画像の算出
対象の画素の濃度データQ(tX ,tY )を求めた場
合、複数画素の荷重平均であるが、この場合の複数画素
の荷重平均は、濃度データの大小順の中央付近の画素を
対象としているので、従来方法に比べて縮小後の画像の
画素の濃度データがボケたり低下するのを軽減できる。
一方で、中央値画素にノイズ成分が含まれていてもその
ノイズ成分を軽減することができる。さらに、各画素を
濃度データの大小順に並べたときに両端側に並ぶ所定個
数の画素を荷重平均から除外しているので、濃度データ
が大きい、または、小さい画素に含まれるノイズ成分の
影響を除去して画像縮小することもできる。
When weights are allocated as shown in FIGS. 7B and 7C, the total of the results obtained by multiplying the density data of each pixel in the pixel group around the median by the weight allocated to each pixel, The density data Q (t
X , t Y ). In this way, when the density data Q (t X , t Y ) of the pixel to be calculated in the reduced image is obtained, it is a weighted average of a plurality of pixels. In this case, the weighted average of a plurality of pixels is the density data. Since the pixels near the center in the order of magnitude are targeted, it is possible to reduce blurring and deterioration of the density data of the pixels of the image after reduction as compared with the conventional method.
On the other hand, even if the median pixel includes a noise component, the noise component can be reduced. Further, when the pixels are arranged in order of magnitude of density data, a predetermined number of pixels arranged on both ends are excluded from the weighted average, so the influence of noise components included in pixels with large or small density data is removed. You can also reduce the image.

【0072】図7(b)、図7(c)に従って荷重を割
り振って、図20(a)の原画像を縮小した結果の一例
を図11、図12に示す。なお、図11は荷重を「0
%」にする画素を両端側それぞれ3画素ずつとして残り
の10画素を荷重平均した場合であって、同図(a)は
残りの10画素に荷重1/10(10%)を均等に割り
振ったときの縮小結果、同図(b)は残りの10画素に
図示のように山型に荷重を割り振ったときの縮小結果を
示す。また、図12は荷重を「0%」にする画素を両端
側それぞれ5画素ずつとして残りの6画素を荷重平均し
た場合であって、同図(a)は残りの6画素に荷重1/
6(100/6%)を均等に割り振ったときの縮小結
果、同図(b)は残りの6画素に図示のように山型に荷
重を割り振ったときの縮小結果を示す。図11、図12
の各図と、図20(b)とを見比べても明らかなよう
に、従来方法に比べて縮小後の画像の各画素の濃度デー
タがボケたり低下するのが軽減されている。
11 and 12 show an example of the result of reducing the original image of FIG. 20A by allocating the load according to FIGS. 7B and 7C. In addition, in FIG. 11, the load is "0.
In the case of weight-averaging the remaining 10 pixels with 3 pixels on each side, the weight 1/10 (10%) is evenly allocated to the remaining 10 pixels. As a result of reduction, FIG. 7B shows the result of reduction when the remaining 10 pixels are assigned a mountain-shaped load as shown in the figure. Further, FIG. 12 shows a case where the pixels for which the load is set to “0%” are set to 5 pixels on both end sides and the remaining 6 pixels are weight-averaged.
6 (100/6%) is a reduction result when the weights are evenly allocated, and FIG. 6B shows a reduction result when the remaining 6 pixels are weight-allocated as shown in the figure. 11 and 12
As is apparent from a comparison between the above drawings and FIG. 20 (b), the density data of each pixel of the image after the reduction is less likely to be blurred or reduced as compared with the conventional method.

【0073】図4に戻って、上記ステップS1〜S3の
処理を以下の終了判定を満たすまで繰り返して各Q(t
X ,tY )を順次求めていき、原画像を縮小した縮小後
の画像を生成し、終了判定を満たすと処理を終了する
(ステップS4)。
Returning to FIG. 4, the above steps S1 to S3 are repeated until the following end determination is satisfied, and each Q (t
X , t Y ) are sequentially obtained, a reduced image obtained by reducing the original image is generated, and the process ends when the end determination is satisfied (step S4).

【0074】なお、Q(tX ,tY )は、図13(a)
に示すように、X方向優先、すなわち、Q(1,1)、
Q(2,1)、…、Q(tX(MAX),1)、Q(1,
2)、Q(2,2)、…、Q(tX(MAX),2)、…、Q
(1,tY(MAX))、Q(2,tY( MAX))、…、Q(t
X(MAX),tY(MAX))の順に求めてもよいし、図13
(b)に示すように、Y方向優先、すなわち、Q(1,
1)、Q(1,2)、…、Q(1,tY(MAX))、Q
(2,1)、Q(2,2)、…、Q(2,tY(MAX))、
…、Q(tX(MAX),1)、Q(tX(MAX),2)、…、Q
(tX(MAX),tY(MAX))の順に求めてもよい。
Note that Q (t X , t Y ) is as shown in FIG.
, The X direction is preferential, that is, Q (1,1),
Q (2,1), ..., Q (t X (MAX) , 1), Q (1,
2), Q (2, 2), ..., Q (t X (MAX) , 2), ..., Q
(1, t Y (MAX) ), Q (2, t Y ( MAX) ), ..., Q (t
X (MAX) , t Y (MAX) ) may be obtained in this order, or FIG.
As shown in (b), the Y direction has priority, that is, Q (1,
1), Q (1, 2), ..., Q (1, t Y (MAX) ), Q
(2,1), Q (2,2), ..., Q (2, t Y (MAX) ),
..., Q (t X (MAX) , 1), Q (t X (MAX) , 2), ..., Q
You may obtain | require in order of (tX (MAX) , tY (MAX) ).

【0075】縮小後の画像のX方向、Y方向の画素数
(tX(MAX)個、tY(MAX)個)が予め決まっている場合に
は、Q(tX ,tY )のtX が1〜tX(MAX)の範囲で、
かつ、tY が1〜tY(MAX)の範囲で各Q(tX ,tY
を求めてQ(tX(MAX),tY(MA X))が求まった時点で処
理を終了する。
When the number of pixels in the X and Y directions (t X (MAX) , t Y (MAX) ) of the reduced image is predetermined, t of Q (t X , t Y ) X is in the range of 1 to t X (MAX) ,
Also, each Q (t X , t Y ) in the range of t Y of 1 to t Y (MAX )
Then, the processing is terminated when Q (t X (MAX) , t Y (MA X) ) is obtained.

【0076】また、X方向、Y方向について、原画像の
X (1)番目の画素から最後の画素(sX(MAX)番目の
画素)までをX方向の処理範囲SH、sY (1)番目の
画素から最後の画素(sY(MAX)番目の画素)までをY方
向の処理範囲SHとして処理する場合には、X方向につ
いては、Q(tX ,tY )の算出に用いる原画像のX方
向に並ぶ画素がsX(MAX)番目の画素に達するまでの範囲
で処理を行い、Y方向については、Q(tX ,tY )の
算出に用いる原画像のY方向に並ぶ画素がsY( MAX)番目
の画素に達するまでの範囲で処理を行い、X方向、Y方
向共にQ(tX,tY )の算出に用いる原画像の画素が
X(MAX)番目、sY(MAX)番目の画素に達すると処理を終
了する。
In the X and Y directions, the processing range SH, s Y (1 ) from the s X (1) th pixel to the last pixel (s X (MAX) th pixel) of the original image is processed in the X direction. ) th from the pixel to the last pixel (s Y (MAX) th pixel) in the case of processing a Y direction processing range SH, for the X-direction, is used for the calculation of Q (t X, t Y) The processing is performed in a range until the pixels lined up in the X direction of the original image reach the s X (MAX) th pixel, and the Y direction is set to the Y direction of the original image used for calculating Q (t X , t Y ). Processing is performed within the range until the lined pixels reach the s Y ( MAX) th pixel, and the pixel of the original image used for calculating Q (t X , t Y ) in the X direction and the Y direction is the s X (MAX) th pixel. , S Y (MAX) th pixel is reached, the process ends.

【0077】さらに、X方向、Y方向に処理範囲SHの
後尾の画素の画素No(sX(LIM)、s Y(LIM))を決めてい
る場合には、X方向については、Q(tX ,tY )の算
出に用いる原画像のX方向に並ぶ画素がsX(LIM)番目の
画素に達するまでの範囲で処理を行い、Y方向について
は、Q(tX ,tY )の算出に用いる原画像のY方向に
並ぶ画素がsY(LIM)番目の画素に達するまでの範囲で処
理を行い、X方向、Y方向共にQ(tX ,tY )の算出
に用いる原画像の画素がsX(LIM)番目、sY(LI M)番目の
画素に達すると処理を終了する。
Furthermore, the processing range SH of the X and Y directions is
Pixel No (s) of the rear pixelX (LIM), S Y (LIM)) Has been decided
In the case of the X direction, Q (tX, TY)
The pixels lined up in the X direction of the original image used for output are sX (LIM)Th
Perform processing in the range until reaching the pixel, and in the Y direction
Is Q (tX, TY) In the Y direction of the original image used to calculate
The pixels lined up are sY (LIM)Within the range until the second pixel is reached
And Q (tX, TY) Calculation
The pixels of the original image used forX (LIM)Th, sY (LI M)Th
When the number of pixels is reached, the process ends.

【0078】なお、原画像のX方向の全ての画素を処理
対象SHとする場合には、sX (1)=1(処理範囲S
Hの後尾の画素の画素No(sX(LIM))を決める場合に
は、s X(LIM)=sX(MAX))とし、また、原画像のX方向
の端部の所定個数の画素を切り捨てる場合には、s
X (1)=〔先頭側の切り捨て画素数+1〕(処理範囲
SHの後尾の画素の画素No(sX(LIM))を決める場合に
は、sX(LIM)=〔sX(MAX)−後尾側の切り捨て画素数−
1〕)とすればよい。Y方向の処理範囲SHも上記X方
向の処理範囲SHと同様に決めることができる。
All pixels in the X direction of the original image are processed.
In the case of target SH, sX(1) = 1 (processing range S
The pixel number of the pixel at the end of H (sX (LIM)) When deciding
Is s X (LIM)= SX (MAX)) And the X direction of the original image
If a predetermined number of pixels at the end of the
X(1) = [number of truncated pixels on the head side + 1] (processing range
The pixel number (s) of the pixel at the tail of SHX (LIM)) When deciding
Is sX (LIM)= [SX (MAX)-Number of truncated pixels on the tail side-
1]). The processing range SH in the Y direction is also the above X direction
The processing range SH can be determined in the same manner as the processing range SH.

【0079】X方向、Y方向の縮小率は同じあってもよ
いし、X方向の縮小率とY方向の縮小率とを違えて画像
縮小してもよい。この場合は、原画像の算出対象画素区
画G XY(tX ,tY )を決める際に、X方向の算出対象
画素区画GX (tX )はX方向の縮小率に応じて決め、
Y方向の算出対象画素区画GY (tY )はY方向の縮小
率に応じて決めればよい。
The reduction ratios in the X and Y directions may be the same.
Image with different reduction ratio in X and Y directions
You may reduce it. In this case, the calculation target pixel area of the original image
Picture G XY(TX, TY) To be calculated in the X direction
Pixel section GX(TX) Is determined according to the reduction ratio in the X direction,
Calculation target pixel section G in the Y directionY(TY) Is reduction in Y direction
You may decide according to the rate.

【0080】次に、本発明の第2の画像縮小処理を図1
4、図15に示すフローチャートを参照して説明する。
なお、図14、図15は1次元の縮小方向に画素が並ぶ
原画像の画素列ごとに、画像縮小処理を行って原画像を
縮小方向に縮小する場合のフローチャートである。ま
た、処理が開始される時点で原画像は原画像メモリ32
に記憶されているものとする。
Next, the second image reduction processing of the present invention will be described with reference to FIG.
4, with reference to the flowchart shown in FIG.
Note that FIG. 14 and FIG. 15 are flowcharts in the case where the image reduction processing is performed for each pixel row of the original image in which pixels are arranged in the one-dimensional reduction direction to reduce the original image in the reduction direction. Also, the original image is stored in the original image memory 32 when the processing is started.
Be stored in.

【0081】この画像縮小処理では、図14のステップ
T2〜T7で処理対象の1画素列分の画像縮小を行い、
この処理を縮小方向に直交する方向に並列される各画素
列ごとに順次実行して2次元の原画像全体を1次元の縮
小方向に縮小する。なお、図14、図15のフローチャ
ートでは、縮小方向に直交する方向の処理範囲SH(端
部側の画素列を除去して画像縮小する場合)を考慮し
て、原画像メモリ32に記憶されている原画像の縮小方
向に直交する方向のi番目の画素列(X方向への縮小時
にはi=sY (1)、sY (1)+1、sY (1)+
2、…であり、Y方向への縮小時にはi=sX (1)、
X (1)+1、sX (1)+2、…)の縮小結果を、
縮小後画像メモリ33の縮小方向に直交する方向のj番
目の画素列(j=1、2、3、…)として記憶するよう
に処理しているが、原画像メモリ32に記憶されている
原画像の縮小方向に直交する方向の全画素列を処理対象
とする場合には、i=j(1、2、3、…)として処理
すればよい。
In this image reduction processing, the image reduction for one pixel column to be processed is performed in steps T2 to T7 of FIG.
This process is sequentially executed for each pixel column arranged in parallel in the direction orthogonal to the reduction direction to reduce the entire two-dimensional original image in the one-dimensional reduction direction. In the flowcharts of FIGS. 14 and 15, the processing range SH in the direction orthogonal to the reduction direction (when the pixel row on the end side is removed to reduce the image) is stored in the original image memory 32. The i-th pixel column in the direction orthogonal to the reduction direction of the original image (i = s Y (1), s Y (1) +1, s Y (1) + when reducing in the X direction.
2, ..., and i = s X (1) when reducing in the Y direction,
The reduction result of s X (1) +1, s X (1) +2, ...
Although it is processed so as to be stored as the j-th pixel column (j = 1, 2, 3, ...) In the direction orthogonal to the reduction direction of the reduced image memory 33, the original image stored in the original image memory 32 is processed. When all the pixel columns in the direction orthogonal to the reduction direction of the image are to be processed, the process may be performed with i = j (1, 2, 3, ...).

【0082】例えば、図2のX方向を縮小方向とした画
像縮小の場合、Y方向に並列された各画素列を順次処理
対象の1画素列として処理していく。この場合、原画像
の処理対象の1画素列(i番目の画素列)内のQ
(tX ,j)算出用の算出対象画素区画GX (tX )に
含まれる画素のうち、荷重平均に用いる画素の濃度デー
タ(P(sX ,i))を原画像メモリ32から読み出し
て画像縮小し、その結果を縮小後画像メモリ33の(t
X ,j)の座標値の画素の濃度データQ(tX ,j)と
して縮小後画像メモリ33に記憶していく。一方、図2
のY方向を縮小方向とした画像縮小の場合、X方向に並
列された各画素列を順次処理対象の1画素列として処理
していく。この場合、原画像の処理対象の1画素列(i
番目の画素列)内のQ(j,tY )算出用の算出対象画
素区画GY (tY )に含まれる画素のうち、荷重平均に
用いる画素の濃度データ(P(i,sY ))を原画像メ
モリ32から読み出して画像縮小し、その結果を縮小後
画像メモリ33の(j,tY )の座標値の画素の濃度デ
ータQ(j,tY )として縮小後画像メモリ33に記憶
していく。
For example, in the case of image reduction in which the X direction in FIG. 2 is the reduction direction, each pixel column arranged in parallel in the Y direction is sequentially processed as one pixel column to be processed. In this case, Q in one pixel column (i-th pixel column) to be processed in the original image
Of the pixels included in the calculation target pixel section G x (t x ) for calculating (t x , j), the density data (P (s x , i)) of the pixel used for weighted averaging is read from the original image memory 32. To reduce the image, and the result is reduced to (t
X, the density data Q (t X pixel coordinate values of j), j) will be stored in the reduced after image memory 33 as. On the other hand, FIG.
In the case of image reduction in which the Y direction is the reduction direction, each pixel column arranged in parallel in the X direction is sequentially processed as one pixel column to be processed. In this case, one pixel column (i
Of the pixels included in the calculation target pixel section G Y (t Y ) for calculating Q (j, t Y ) in the (th pixel row), the density data (P (i, s Y )) of the pixel used for weighted averaging ) to read from the original image memory 32 and image reduction, the result of reduced post-image memory 33 (j, t Y) density data Q (j pixel coordinate values of the reduced after image memory 33 as t Y) I will remember.

【0083】図14のステップT1:初期設定を行う。
jに「1」をセットし、X方向への縮小の場合はiにs
Y (1)をセットし、Y方向への縮小の場合はiにsX
(1)をセットする。なお、sY (1)、sX (1)、
縮小率(n/m)、ahX (X方向への縮小の場合)、
ahY (Y方向への縮小の場合)などの必要なデータ
は、ステップT1の処理に先立ち、設定器44などから
設定される。
Step T1 in FIG. 14: Initialization is performed.
Set "1" to j and set s to i for reduction in the X direction.
Set Y (1) and s X to i for reduction in the Y direction
Set (1). Note that s Y (1), s X (1),
Reduction ratio (n / m), ah X (for reduction in the X direction),
Necessary data such as ah Y (in the case of reduction in the Y direction) is set by the setter 44 or the like prior to the processing of step T1.

【0084】図14のステップT2:1画素列分の画像
縮小処理の初期設定を行う。X方向への縮小の場合はt
X に「1」をセットし、Y方向への縮小の場合はtY
「1」をセットする。
Step T2 in FIG. 14: Initial setting of image reduction processing for one pixel column is performed. T for reduction in the X direction
Set "1" to X and "1" to t Y for reduction in the Y direction.

【0085】図14のステップT3(本発明の(1)の
工程に相当):縮小後の画像の算出対象の画素(縮小後
の画像の処理対象の画素列内の算出対象の画素)の濃度
データを算出するのに用いる原画像(原画像の処理対象
の画素列内)の算出対象画素区画を画像の縮小率(n/
m)に応じて決める。
Step T3 of FIG. 14 (corresponding to the step (1) of the present invention): density of the pixel to be calculated in the reduced image (pixel to be calculated in the pixel row to be processed in the reduced image) The calculation target pixel section of the original image (in the pixel column of the processing target of the original image) used for calculating the data is reduced by the image reduction ratio (n /
m).

【0086】この算出対象画素区画は、例えば、従来の
(1)式に基づき決めることができる。すなわち、X方
向への縮小の場合は、原画像のY方向に並列される画素
列のうちのi番目の画素列内のsX (tX )番目の画素
からsX (tX +1)番目の画素までの区画(ただし、
n−aX (tX )=0の場合には、(sX (tX )+
1)番目の画素からsX (tX +1)番目の画素までの
区画)を算出対象画素区画GX (tX )とする。また、
Y方向への縮小の場合には、原画像のX方向に並列され
る画素列のうちのi番目の画素列内のsY (tY )番目
の画素からsY (tY +1)番目の画素までの区画(た
だし、n−aY (tY )=0の場合には、(s
Y (tY )+1)番目の画素からsY (tY +1)番目
の画素までの区画)を算出対象画素区画GY (tY )と
する。
This calculation target pixel section can be determined based on the conventional equation (1), for example. That is, in the case of reduction in the X direction, the s X (t X ) th pixel to the s X (t X ) th pixel in the i-th pixel column of the pixel columns arranged in the Y direction of the original image are reduced. Partition up to the pixel of
When n−a X (t X ) = 0, (s X (t X ) +
The section from the 1) th pixel to the s X (t X +1) th pixel) is set as a calculation target pixel section G X (t X ). Also,
In the case of reduction in the Y direction, the s Y (t Y ) th pixel to the s Y (t Y +1) th pixel in the i-th pixel column of the pixel columns arranged in the X direction of the original image are reduced. Partition to pixel (however, if n−a Y (t Y ) = 0, then (s
The section from the Y (t Y ) +1) th pixel to the s Y (t Y +1) th pixel) is defined as the calculation target pixel section G Y (t Y ).

【0087】図20(a)の場合では、GX (1)は
(1〜4,i)の4個の画素からなる区画、GX (2)
は(4〜7,i)の4個の画素からなる区画、G
X (3)は(8〜11,i)の4個の画素からなる区
画、…であり、GY (1)は(i,1〜4)の4個の画
素からなる区画、GY (2)は(i,4〜7)の4個の
画素からなる区画、GY (3)は(i,8〜11)の4
個の画素からなる区画、…である。
In the case of FIG. 20A, G X (1) is a section made up of four pixels (1 to 4, i), G X (2)
Is a section composed of four pixels of (4 to 7, i), G
X (3) is a section composed of four pixels (8 to 11, i), ..., And G Y (1) is a section composed of four pixels of (i, 1 to 4), G Y ( 2) is a section composed of four pixels of (i, 4 to 7), and G Y (3) is 4 of (i, 8 to 11).
A section composed of individual pixels, ....

【0088】また、この処理においても、X方向への縮
小の場合、ahX を一義的に「0」としてGX (t)を
決め、Y方向への縮小の場合、ahY を一義的に「0」
としてGY (t)を決めてもよい。
Also in this processing, in the case of reduction in the X direction, ah X is uniquely set to "0" to determine G X (t), and in the case of reduction in the Y direction, ah Y is uniquely determined. "0"
G Y (t) may be determined as

【0089】このように算出対象画素区画を決めて、こ
の算出対象画素区画内の画素を使って縮小後の画像の算
出対象の画素の濃度データを求めることで、原画像の縮
小方向の処理範囲SH全体をn/m倍に略均等に縮小す
ることができる。
By thus determining the calculation target pixel section and using the pixels in the calculation target pixel section to obtain the density data of the calculation target pixel of the reduced image, the processing range in the reduction direction of the original image is obtained. The entire SH can be reduced approximately n / m times evenly.

【0090】図14のステップT4(本発明の(2)の
工程に相当)、ステップT5(本発明の(3)の工程に
相当)は、上記第1の画像縮小処理のステップS2、S
3と同様の処理である。すなわち、この第2の画像縮小
処理では、上記ステップT3で、原画像の処理対象の1
画素列に対して算出対象画素区画を決め、その算出対象
画素区画内の各画素の濃度データの大小順に応じて、例
えば、図7に示すように、前記原画像の算出対象画素区
画内の各画素に荷重を割り振り、その割り振った荷重に
よる荷重平均によって縮小後の画像の算出対象の画素の
濃度データを求めるものである。これにより、1次元方
向の縮小方向への画像縮小において、上記第1の画像縮
小処理と同様の効果を得ることができる。
Step T4 (corresponding to the step (2) of the present invention) and step T5 (corresponding to the step (3) of the present invention) of FIG. 14 are steps S2 and S of the first image reduction processing.
The process is the same as 3. That is, in the second image reduction processing, in step T3, the processing target 1 of the original image is processed.
A calculation target pixel section is determined for the pixel row, and, for example, as shown in FIG. 7, each of the calculation target pixel sections of the original image is determined according to the magnitude order of the density data of each pixel in the calculation target pixel section. The weight is assigned to the pixels, and the density data of the pixels to be calculated in the reduced image is obtained by the weighted average of the assigned weights. Thereby, in the image reduction in the one-dimensional reduction direction, the same effect as that of the first image reduction process can be obtained.

【0091】図14のステップT6では、現在の処理対
象の1画素列に対する画像縮小処理が終了したか否かを
判定し、終了していなければ、X方向への縮小時はtX
をカウントアップし、Y方向への縮小時はtY をカウン
トアップして(ステップT7)、ステップT3に戻って
縮小後の画像の現在の処理対象の画素列内の次の画素の
濃度データを求める。以後、現在の処理対象の1画素列
に対する画像縮小処理が終了するまでステップT3〜T
7の処理を繰り返して、X方向への縮小の場合は、tX
=1、2、3、…と順次カウントアップして、Q(1,
j)、Q(2,j)、Q(3,j)、…の順に縮小後の
画像のY方向のj番目の画素列を構成する各画素の濃度
データを原画像のY方向のi番目の画素列から求めてい
き、Y方向への縮小の場合は、tY =1、2、3、…と
順次カウントアップして、Q(j,1)、Q(j,
2)、Q(j,3)、…の順に縮小後の画像のX方向の
j番目の画素列を構成する各画素の濃度データを原画像
のX方向のi番目の画素列から求めていく。現在の処理
対象の1画素列に対する画像縮小処理が終了すると、図
15のステップT8で処理対象の全ての画素列に対する
画像縮小処理が終了したか否かを判定し、終了していな
ければi、jをそれぞれカウントアップして(ステップ
T9)、図15のステップT2に戻り次の画素列に対す
る縮小処理を行い、処理対象の全ての画素列に対する画
像縮小処理が終了すると処理を終了する。
In step T6 of FIG. 14, it is determined whether or not the image reduction processing for the current one pixel column to be processed is completed. If not completed, t X is set at the time of reduction in the X direction.
Is counted up, and at the time of reduction in the Y direction, t Y is counted up (step T7), the process returns to step T3, and the density data of the next pixel in the pixel row of the current processing target of the reduced image is obtained. Ask. Thereafter, steps T3 to T are performed until the image reduction process for the current one pixel column to be processed is completed.
In the case of reduction in the X direction by repeating the process of 7, t X
= 1, 2, 3, ...
j), Q (2, j), Q (3, j), ... In order, the density data of each pixel forming the j-th pixel column in the Y direction of the reduced image is converted to the i-th image in the Y direction of the original image. In the case of reduction in the Y direction, the count is sequentially incremented to t Y = 1, 2, 3, ..., And Q (j, 1), Q (j,
2), Q (j, 3), ... In order, the density data of each pixel forming the j-th pixel column in the X direction of the reduced image is obtained from the i-th pixel column in the X direction of the original image. . When the image reduction processing for the current one pixel column to be processed is completed, it is determined in step T8 in FIG. 15 whether or not the image reduction processing has been completed for all pixel rows to be processed. If not, i, Each j is counted up (step T9), the process returns to step T2 in FIG. 15, the reduction process is performed on the next pixel column, and the process is terminated when the image reduction process on all the pixel columns to be processed is completed.

【0092】X方向への縮小(Y方向への縮小)の場合
のステップT6の終了判定は以下のように行う。縮小後
の画像のX方向(Y方向)の画素数(tX(MAX)個(t
Y(MAX)個))が予め決まっている場合には、Q(t
X(MAX),j)(Q(j,tY(MAX)))が求まった時点で
処理対象の1画素列の画像縮小処理を終了する。
In the case of reduction in the X direction (reduction in the Y direction), the end determination of step T6 is performed as follows. The number of pixels in the X direction (Y direction) of the reduced image (t X (MAX) (t
Y (MAX) ) is predetermined, Q (t
When X (MAX) , j) (Q (j, t Y (MAX) )) is obtained, the image reduction processing of the one pixel column to be processed is terminated.

【0093】また、X方向(Y方向)について、原画像
のsX (1)(sY (1))番目の画素から最後の画素
(sX(MAX)番目の画素(sY(MAX)番目の画素))までを
X方向(Y方向)の処理範囲SHとして処理する場合に
は、Q(tX ,j)(Q(j,tY ))の算出に用いる
原画像の処理対象の1画素列内の画素がsX(MAX)番目の
画素(sY(MAX)番目の画素)に達するまでの範囲で処理
対象の1画素列の画像縮小処理を行い、Q(tX ,j)
(Q(i,tY ))の算出に用いる原画像の処理対象の
1画素列内の画素がsX(MAX)番目の画素(sY(MAX)番目
の画素)に達すると処理対象の1画素列の画像縮小処理
を終了する。
Further, in the X direction (Y direction), from the s X (1) (s Y (1)) th pixel of the original image to the last pixel (s X (MAX) th pixel (s Y (MAX)). When processing up to the (th pixel)) as the processing range SH in the X direction (Y direction), the processing target of the original image used for calculation of Q (t X , j) (Q (j, t Y )) is processed. Image reduction processing of the one pixel row to be processed is performed within the range until the pixels in the one pixel row reach the s X (MAX) th pixel (s Y (MAX) th pixel), and Q (t X , j )
When the pixel in the one pixel column of the processing target of the original image used for the calculation of (Q (i, t Y )) reaches the s X (MAX) th pixel (s Y (MAX) th pixel), The image reduction processing for one pixel column is completed.

【0094】さらに、X方向(Y方向)の処理範囲SH
に後尾の画素の画素No(sX(LIM)(sY(LIM)))を決め
ている場合には、Q(tX ,j)(Q(i,tY ))の
算出に用いる原画像の処理対象の1画素列内の画素がs
X(LIM)番目の画素(sY(LIM)番目の画素)に達するまで
の範囲で処理対象の1画素列の画像縮小処理を行い、Q
(tX ,j)(Q(i,tY ))の算出に用いる原画像
の処理対象の1画素列内の画素がsX(LIM)番目の画素
(sY(LIM)番目の画素)に達すると処理対象の1画素列
の画像縮小処理を終了する。
Further, the processing range SH in the X direction (Y direction)
Hara used to calculate the pixels of the tail of the pixels No (s X (LIM) ( s Y (LIM))) if they decide is, Q (t X, j) (Q (i, t Y)) to The pixel in the one pixel column of the image processing target is s
Image reduction processing is performed on the 1-pixel row to be processed in the range up to the X (LIM) th pixel (s Y (LIM) th pixel), and Q
The pixel in the one pixel column of the processing target of the original image used for the calculation of (t X , j) (Q (i, t Y )) is the s X (LIM) th pixel (s Y (LIM) th pixel) Is reached, the image reduction processing of the one pixel column to be processed ends.

【0095】X方向への縮小(Y方向への縮小)の場合
のステップT8の終了判定は以下のように行う。縮小後
の画像のY方向(X方向)の画素列の数(tY(MAX)
(tX(MAX)個))が予め決まっている場合には、j=t
Y(MAX)(j=tX(MAX))の画素列の縮小処理を終えた時
点で処理を終了する。
In the case of reduction in the X direction (reduction in the Y direction), the end determination of step T8 is performed as follows. If the number of pixel columns (t Y (MAX) (t X (MAX) ) in the Y direction (X direction) of the reduced image is predetermined, j = t
When the reduction processing of the pixel row of Y (MAX) (j = t X (MAX) ) is finished, the processing is finished.

【0096】また、Y方向(X方向)について、原画像
のsY (1)(sX (1))番目の画素から最後の画素
(sY(MAX)番目の画素(sX(MAX)番目の画素))までを
Y方向(X方向)の処理範囲SHとして処理する場合に
は、i=sY(MAX)(i=sX( MAX))の画素列の縮小処理
を終えた時点で処理を終了する。
Further, in the Y direction (X direction), from the s Y (1) (s X (1)) th pixel of the original image to the last pixel (s Y (MAX) th pixel (s X (MAX)) Up to the (th pixel)) as the processing range SH in the Y direction (X direction), when the reduction processing of the pixel row of i = s Y (MAX) (i = s X ( MAX) ) is finished. Ends the process.

【0097】さらに、Y方向(X方向)の処理範囲SH
に後尾の画素の画素No(sY(LIM)(sX(LIM)))を決め
ている場合には、i=sY(LIM)(i=sX(LIM))の画素
列の縮小処理を終えた時点で処理を終了する。
Further, the processing range SH in the Y direction (X direction)
If the pixel number (s Y (LIM) (s X (LIM) ) of the tail pixel is determined in, the pixel row of i = s Y (LIM) (i = s X (LIM) ) is reduced. The process ends when the process is completed.

【0098】なお、X方向、Y方向の処理範囲SHは、
上記第1の画像縮小処理で説明したようにsX (1)
(sX(LIM))、sY (1)、(sY(LIM))を決めればよ
い。
The processing range SH in the X and Y directions is
As described in the first image reduction processing, s X (1)
(S X (LIM) ), s Y (1), and (s Y (LIM) ) may be determined.

【0099】また、例えば、ラインセンサを用いた画像
取り込み装置で各主走査方向の画素列が取り込まれると
すぐにその画素列を画像縮小する場合には、原画像メモ
リ32を図16にように、主走査方向1画素列分のデー
タを記憶できるように構成し、画像取り込み装置で主走
査方向1画素列分のデータが取り込まれるたびにそのデ
ータを図16の原画像メモリ32に記憶して上記図1
4、図15の処理で順次画像縮小して縮小後画像メモリ
33に記憶していくように構成してもよい。
Further, for example, when an image capturing apparatus using a line sensor captures a pixel column in each main scanning direction and immediately reduces the image of the pixel column, the original image memory 32 is set as shown in FIG. , The data for one pixel column in the main scanning direction can be stored, and each time the image capturing device captures data for one pixel column in the main scanning direction, the data is stored in the original image memory 32 in FIG. Figure 1
4, the image may be successively reduced by the processing of FIG. 15 and stored in the reduced image memory 33.

【0100】[0100]

【発明の効果】以上の説明から明らかなように、請求項
1に記載の発明によれば、原画像の算出対象画素区画の
各画素の濃度データの大小順に応じて割り振った荷重に
よる荷重平均で縮小後の画像の算出対象の画素の濃度デ
ータを求めているので、原画像の算出対象画素区画の各
画素の位置と無関係に、濃度データの分布状態に応じた
荷重平均により縮小後の画像の算出対象の画素の濃度デ
ータを求めることができ、縮小後の画像に原画像の算出
対象画素区画の各画素の濃度データの分布状態を反映さ
せることができ、画像縮小による画質の低下を防ぐこと
ができる。
As is apparent from the above description, according to the first aspect of the present invention, the weighted average by the weights assigned according to the magnitude order of the density data of each pixel of the calculation target pixel section of the original image is used. Since the density data of the calculation target pixel of the reduced image is obtained, the weighted average of the density data of the original image is used to calculate the density of the image after the reduction regardless of the position of each pixel in the calculation target pixel section. The density data of the pixel to be calculated can be calculated, and the distribution state of the density data of each pixel of the pixel block to be calculated of the original image can be reflected in the reduced image, preventing the deterioration of the image quality due to the image reduction. You can

【0101】[0101]

【0102】 また、請求項1に記載の発明によれば、
原画像の算出対象画素区画の各画素を濃度データの大小
順に並べたときに両端側に並ぶ所定個数の画素の荷重を
「0%」として荷重平均から除去し、前記各画素を濃度
データの大小順に並べたときに中央付近にくる複数個の
画素(中央値付近画素群)での荷重平均によって縮小後
の画像の算出対象の画素の濃度データを求めるようにし
ているので、縮小後の画像の画素の濃度データがボケた
り低下するのを軽減できる一方で、中央値画素にノイズ
成分が含まれていてもそのノイズ成分を軽減することが
できる。さらに、前記各画素を濃度データの大小順に並
べたときに両端側に並ぶ所定個数の画素を荷重平均から
除去しているので、濃度データが大きい、または、小さ
い画素に含まれるノイズ成分の影響を除去して画像縮小
することもできる。
According to the invention described in claim 1 ,
When the pixels of the calculation target pixel section of the original image are arranged in order of magnitude of the density data, the weight of a predetermined number of pixels arranged at both ends is set to "0%" and the weighted average is removed, and each pixel is compared with the density data. When the pixels are arranged in order, the density data of the pixel to be calculated in the reduced image is calculated by the weighted average of a plurality of pixels (pixel group near the median value) near the center. density data of pixels while can be reduced to decrease or blurring, it can be contained noise components to the medium median pixel to reduce the noise component. Further, when the pixels are arranged in order of magnitude of density data, a predetermined number of pixels arranged on both ends are removed from the weighted average, so that the influence of noise components contained in pixels with large or small density data is eliminated. The image can be reduced by removing it.

【0103】 請求項に記載の発明によれば、原画像
の2次元方向の画像縮小を同時に、かつ、好適に行うこ
とができる。
According to the second aspect of the invention, the image reduction in the two-dimensional direction of the original image can be performed simultaneously and suitably.

【0104】 請求項に記載の発明によれば、1次元
の縮小方向に画素が並ぶ原画像の画素列ごとに画像縮小
処理を行い、原画像を縮小方向に縮小する処理を好適に
行うことができる。
According to the third aspect of the present invention, the image reduction process is preferably performed for each pixel row of the original image in which pixels are arranged in the one-dimensional reduction direction, and the original image is preferably reduced in the reduction direction. You can

【0105】 請求項に記載の発明によれば、請求項
1に記載の発明の方法による画像縮小処理をコンピュー
タに実行させることができる。
According to the invention described in claim 4 , it is possible to cause a computer to execute the image reduction processing by the method of the invention described in claim 1.

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

【図1】本発明に係る画像縮小方法を実施するハードウ
エア構成の一例を示すブロック図である。
FIG. 1 is a block diagram showing an example of a hardware configuration for implementing an image reduction method according to the present invention.

【図2】原画像メモリの構成を示す図である。FIG. 2 is a diagram showing a configuration of an original image memory.

【図3】縮小後画像メモリの構成を示す図である。FIG. 3 is a diagram showing a configuration of a reduced image memory.

【図4】2次元のデジタルの原画像の2次元方向の画像
縮小を同時に行う、本発明に係る第1の画像縮小処理の
手順を示すフローチャートである。
FIG. 4 is a flowchart showing a procedure of a first image reduction process according to the present invention, which simultaneously performs image reduction in a two-dimensional direction of a two-dimensional digital original image.

【図5】2次元の算出対象領域と2次元の算出対象画素
区画を示す図である。
FIG. 5 is a diagram showing a two-dimensional calculation target area and a two-dimensional calculation target pixel section.

【図6】原画像と縮小後の画像の関係を示す図である。FIG. 6 is a diagram showing a relationship between an original image and a reduced image.

【図7】算出対象画素区画内の各画素の濃度データの大
小順に応じた荷重の割り振り方の一例を示す図である。
FIG. 7 is a diagram showing an example of a method of allocating weights according to the magnitude data of the density data of each pixel in the calculation target pixel section.

【図8】白黒の2値化された原画像の算出対象画素区画
内の各画素を濃度データの大小順に並べた状態を示す図
である。
FIG. 8 is a diagram showing a state in which each pixel in a calculation target pixel section of a black-and-white binarized original image is arranged in descending order of density data.

【図9】図7(a)の荷重の割り振りで図20(a)の
原画像を縮小した結果を示す図である。
FIG. 9 is a diagram showing a result of reducing the original image of FIG. 20 (a) by the load allocation of FIG. 7 (a).

【図10】縮小率が「1.0」に近い場合の画像縮小に
おいて従来方法と本発明に係る方法とを比較して説明す
るための図である。
FIG. 10 is a diagram for comparing and explaining a conventional method and a method according to the present invention in image reduction when the reduction rate is close to “1.0”.

【図11】図7(b)(c)の荷重の割り振りで図20
(a)の原画像を縮小した結果の一例を示す図である。
FIG. 11 shows the distribution of the loads shown in FIGS.
It is a figure which shows an example of the result of having reduced the original image of (a).

【図12】図7(b)(b)の荷重の割り振りで図20
(a)の原画像を縮小した結果の別の例を示す図であ
る。
FIG. 12 shows the distribution of the load shown in FIGS.
It is a figure which shows another example of the result of having reduced the original image of (a).

【図13】処理手順をX方向優先にする場合とY方向優
先にする場合を示す図である。
FIG. 13 is a diagram showing a case where the processing procedure is prioritized in the X direction and a case where it is prioritized in the Y direction.

【図14】1次元の縮小方向に画素が並ぶ原画像の画素
列ごとに、画像縮小処理を行って原画像を縮小方向に縮
小する、本発明に係る第2の画像縮小処理の手順を示す
フローチャートである。
FIG. 14 shows a procedure of a second image reduction process according to the present invention, in which an image reduction process is performed for each pixel column of an original image in which pixels are arranged in a one-dimensional reduction direction to reduce the original image in the reduction direction. It is a flowchart.

【図15】同じく本発明に係る第2の画像縮小処理の手
順を示すフローチャートである。
FIG. 15 is a flowchart showing a procedure of second image reduction processing according to the present invention.

【図16】原画像メモリの変形例の構成を示す図であ
る。
FIG. 16 is a diagram showing a configuration of a modified example of the original image memory.

【図17】従来の画像縮小方法を説明するための図であ
る。
FIG. 17 is a diagram for explaining a conventional image reduction method.

【図18】従来の1画素列ごとの画像縮小方法を示す図
である。
FIG. 18 is a diagram showing a conventional image reduction method for each pixel column.

【図19】従来方法で2次元の原画像を2次元方向に画
像縮小する手順を示す図である。
FIG. 19 is a diagram showing a procedure for reducing a two-dimensional original image in a two-dimensional direction by a conventional method.

【図20】従来方法の問題点を説明するための図であ
る。
FIG. 20 is a diagram for explaining a problem of the conventional method.

【図21】従来方法の別の問題点を説明するための図で
ある。
FIG. 21 is a diagram for explaining another problem of the conventional method.

【図22】従来方法の別の問題点を示す図である。FIG. 22 is a diagram showing another problem of the conventional method.

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

10:CPU 31:プログラムメモリ 32:原画像メモリ 33:縮小後画像メモリ 45:外部記憶装置 P(sX ,sY ):原画像の画素の濃度データ Q(tX ,tY ):縮小後の画像の画素の濃度データ GXY(tX ,tY )、GX (tX )、GY (tY ):算
出対象画素区画 sC :中央値画素
10: CPU 31: Program memory 32: Original image memory 33: Reduced image memory 45: External storage device P (s X , s Y ): Original image pixel density data Q (t X , t Y ): Reduced Data of pixels of the image G XY (t X , t Y ), G X (t X ), G Y (t Y ): Calculation target pixel section s C : Median pixel

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/38 - 1/393 G06T 3/40 Front page continuation (58) Fields surveyed (Int.Cl. 7 , DB name) H04N 1/38-1/393 G06T 3/40

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 デジタルの原画像を縮小して縮小後の画
像を得る画像縮小方法において、 (1)縮小後の画像の算出対象の画素の濃度データを算
出するのに用いる原画像の算出対象画素区画を画像の縮
小率に応じて決める工程と、 (2)前記(1)の工程で決めた原画像の算出対象画素
区画内の各画素の濃度データの大小順に応じて、前記原
画像の算出対象画素区画内の各画素に荷重を割り振る工
程と、 (3)前記(2)の工程で割り振った荷重によって、前
記(1)の工程で決めた原画像の算出対象画素区画内の
各画素を荷重平均した結果を、前記縮小後の画像の算出
対象の画素の濃度データとする工程と、 からなる工程で縮小後の画像の各画素の濃度データを求
めることで原画像を縮小した縮小後の画像を得て、 かつ、前記(2)の工程では、前記(1)の工程で決め
た原画像の算出対象画素区画内の各画素を濃度データの
大小順に並べたときに両端側に並ぶ所定個数の画素の荷
重を「0%」とし、それ以外の複数個の画素に荷重を割
り振る ことを特徴とする画像縮小方法。
1. An image reduction method for reducing a digital original image to obtain a reduced image, comprising: (1) a calculation target of an original image used for calculating density data of pixels to be calculated in the reduced image. A step of determining the pixel section according to the reduction ratio of the image; and (2) a step of determining the density data of each pixel in the calculation target pixel section of the original image determined in the step (1) A step of assigning a weight to each pixel in the calculation target pixel section, and (3) Each pixel in the calculation target pixel section of the original image determined in the step (1) according to the load assigned in the step (2). The result of weighted averaging is used as the density data of the pixel to be calculated in the reduced image, and the density data of each pixel of the reduced image is obtained in the step consisting of to obtain an image, and Engineering of the (2) So determined in step (1)
Each pixel in the calculation target pixel section of the original image
When arranging in order of size, load of a specified number of pixels on both ends
The weight is set to "0%", and the load is divided to other pixels.
An image reduction method characterized by shaking .
【請求項2】 請求項1に記載の画像縮小方法により、
2次元のデジタルの原画像の2次元方向の画像の縮小を
同時に行うことを特徴とする画像縮小方法。
2. The image reduction method according to claim 1 ,
An image reduction method characterized by simultaneously reducing a two-dimensional image of a two-dimensional digital original image.
【請求項3】 1次元の縮小方向に画素が並ぶ前記原画
像の画素列ごとに、請求項1に記載の画像縮小方法で画
像縮小処理を行い、前記原画像を前記縮小方向に縮小す
ることを特徴とする画像縮小方法。
3. An image reduction method according to claim 1 is performed for each pixel row of the original image in which pixels are arranged in a one-dimensional reduction direction to reduce the original image in the reduction direction. Image reduction method characterized by.
【請求項4】 デジタルの原画像を縮小して縮小後の画
像を得る処理をコンピュータに実行させるためのプログ
ラムを記録した記憶媒体であって、 (1)縮小後の画像の算出対象の画素の濃度データを算
出するのに用いる原画像の算出対象画素区画を画像の縮
小率に応じて決める工程と、 (2)前記(1)の工程で決めた原画像の算出対象画素
区画内の各画素の濃度データの大小順に応じて、前記原
画像の算出対象画素区画内の各画素に荷重を割り振る工
程と、 (3)前記(2)の工程で割り振った荷重によって、前
記(1)の工程で決めた原画像の算出対象画素区画内の
各画素を荷重平均した結果を、前記縮小後の画像の算出
対象の画素の濃度データとする工程と、 からなる工程で縮小後の画像の各画素の濃度データを求
めることで原画像を縮小した縮小後の画像を得て、 かつ、前記(2)の工程では、前記(1)の工程で決め
た原画像の算出対象画素区画内の各画素を濃度データの
大小順に並べたときに両端側に並ぶ所定個数の画素の荷
重を「0%」とし、それ以外の複数個の画素に荷重を割
り振る 処理をコンピュータに実行させるためのプログラ
ムを記録した記憶媒体。
4. A storage medium recording a program for causing a computer to execute a process of reducing a digital original image to obtain a reduced image, comprising: (1) a calculation target pixel of the reduced image. A step of determining a calculation target pixel section of the original image used for calculating the density data according to a reduction ratio of the image; and (2) each pixel in the calculation target pixel section of the original image determined in the step (1). According to the magnitude order of the density data of, the load is assigned to each pixel in the calculation target pixel section of the original image, and (3) the load assigned in the process of (2) The result of weighted averaging of each pixel in the determined calculation target pixel section of the original image is used as density data of the calculation target pixel of the reduced image, and a step of Original image by obtaining density data To obtain a reduced image obtained by reducing, and, in the step (2), determined in step (1)
Each pixel in the calculation target pixel section of the original image
When arranging in order of size, load of a specified number of pixels on both ends
The weight is set to "0%", and the load is divided to other pixels.
A storage medium that records a program that causes a computer to execute a swing process.
JP11087497A 1997-04-28 1997-04-28 Image reduction method and storage medium storing program Expired - Fee Related JP3483426B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11087497A JP3483426B2 (en) 1997-04-28 1997-04-28 Image reduction method and storage medium storing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11087497A JP3483426B2 (en) 1997-04-28 1997-04-28 Image reduction method and storage medium storing program

Publications (2)

Publication Number Publication Date
JPH10304186A JPH10304186A (en) 1998-11-13
JP3483426B2 true JP3483426B2 (en) 2004-01-06

Family

ID=14546899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11087497A Expired - Fee Related JP3483426B2 (en) 1997-04-28 1997-04-28 Image reduction method and storage medium storing program

Country Status (1)

Country Link
JP (1) JP3483426B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269850B2 (en) 2007-06-07 2012-09-18 Sony Corporation Signal processing method and signal processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269850B2 (en) 2007-06-07 2012-09-18 Sony Corporation Signal processing method and signal processing system

Also Published As

Publication number Publication date
JPH10304186A (en) 1998-11-13

Similar Documents

Publication Publication Date Title
US7373020B2 (en) Image processing apparatus and image processing program
JP3096054B2 (en) Inverse conversion method from halftone digital video to continuous tone digital video
EP0352016A2 (en) Method and system for enhancement of a digitized image
US20060119896A1 (en) Image processing apparatus, image processing program, electronic camera, and image processing method for smoothing image of mixedly arranged color components
JP3862621B2 (en) Image processing apparatus, image processing method, and program thereof
US4841377A (en) Continuous image estimation method
US6999630B1 (en) Method of processing, and corresponding filtering device
US7697775B2 (en) Image signal processing apparatus and method, and program and recording medium used therewith
JP3483426B2 (en) Image reduction method and storage medium storing program
JP4621944B2 (en) Image filter device, method and computer program
JP3741982B2 (en) Noise reduction circuit
JP5484015B2 (en) Imaging apparatus, imaging method, and program
CN114782266A (en) Digital image signal space domain denoising method, device, equipment and medium
JP3452460B2 (en) Image reduction method and apparatus, and storage medium storing program
US6233366B1 (en) Image processing method and apparatus
JP5933690B2 (en) Image processing apparatus and method, and image processing program
US20030053687A1 (en) Off-grid interpolation in image processing
JP3318248B2 (en) Image quality improvement device and recording medium
JP3480547B2 (en) Image correction method and apparatus, and storage medium storing program
JP3059287B2 (en) Binary image scaling device
JP2003102027A5 (en)
JPH10255033A (en) Image contracting method
JPH10302055A (en) Image reducing method and storage medium recording program
JPH08202871A (en) Picture information processor
JPH10271340A (en) Image-processing method and device therefor

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20071017

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081017

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees