Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3434720B2 - Binary image scaling conversion processing method and black pixel area detection method - Google Patents
[go: Go Back, main page]

JP3434720B2 - Binary image scaling conversion processing method and black pixel area detection method - Google Patents

Binary image scaling conversion processing method and black pixel area detection method

Info

Publication number
JP3434720B2
JP3434720B2 JP35315098A JP35315098A JP3434720B2 JP 3434720 B2 JP3434720 B2 JP 3434720B2 JP 35315098 A JP35315098 A JP 35315098A JP 35315098 A JP35315098 A JP 35315098A JP 3434720 B2 JP3434720 B2 JP 3434720B2
Authority
JP
Japan
Prior art keywords
image
pixels
black
conversion
horizontal
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
JP35315098A
Other languages
Japanese (ja)
Other versions
JP2000184188A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP35315098A priority Critical patent/JP3434720B2/en
Publication of JP2000184188A publication Critical patent/JP2000184188A/en
Application granted granted Critical
Publication of JP3434720B2 publication Critical patent/JP3434720B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、イメージデータで
形成された画像の拡大・縮小処理方式に関し、特にファ
クシミリやパーソナルコンピュータ等の装置によって取
り扱われる1又は0の2値データで形成された2値画像
を任意倍率での拡大・縮小変換を高速で行う処理方式に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for enlarging / reducing an image formed from image data, and particularly to a binary value formed by binary data of 1 or 0 handled by a device such as a facsimile or a personal computer. The present invention relates to a processing method for performing enlargement / reduction conversion of an image at an arbitrary magnification at high speed.

【0002】[0002]

【従来の技術】従来、イメージデータを拡大・縮小する
ためのアルゴリズムは、図13に示すように変換後画像
における各画素ごとに、変換前の原画像内で相当する画
素を算出し、その画素の濃度(0または1)を変換後の
画素の濃度として変換後画像に書き込んでいた。
2. Description of the Related Art Conventionally, as shown in FIG. 13, an algorithm for enlarging / reducing image data calculates a corresponding pixel in the original image before conversion for each pixel in the converted image, The density (0 or 1) was written as the density of the converted pixel in the converted image.

【0003】またこのような処理を高速で行なう方式と
して、変換後の水平ラインの濃度パターンを格納したテ
ーブル参照方式がある。これは、図14に示すように拡
大・縮小倍率がm/nの時に、原画素の水平ラインのn
個の画素濃度全ての組み合わせ(2n通り存在する)に
対する長さmの変換後の水平ラインをテーブルとしてあ
らかじめ保持するものであり、変換前画像を水平方向に
nビット単位に分割し、その全ての分割単位ごとにテー
ブルを参照して変換後のmビットの画素を書き込むとい
う方式である。図14においては、3/2倍の拡大処理
の例が示されており、ここでn=2、m=3であり、変
換テーブルは全部で4種類となる。
As a method for performing such processing at high speed, there is a table reference method in which density patterns of converted horizontal lines are stored. This is because when the enlargement / reduction ratio is m / n as shown in FIG.
A horizontal line after conversion having a length m for all combinations (there are 2 n patterns) of each pixel density is held in advance as a table, and the pre-conversion image is divided into n-bit units in the horizontal direction. In this method, the m-bit pixel after conversion is written by referring to the table for each division unit. FIG. 14 shows an example of 3/2 times enlargement processing, where n = 2 and m = 3, and there are four types of conversion tables in total.

【0004】[0004]

【発明が解決しようとする課題】しかし、前者の変換後
画像の画素ごとに対応する原画像の画素の濃度を算出す
る方法では、変換後画像が大きくなる場合は、画像を構
成する画素数が多くなるため、座標変換処理に多くの時
間を要することになり、処理速度が低下する。また後者
の濃度パターンを格納したテーブルを参照する方法で
は、あらかじめ決定した値についてのみ変換テーブルが
格納されており、任意の倍率で拡大・縮小処理をするこ
とができなかった。またn個の画素濃度全ての組み合わ
せは2n通りとなるため、例えば1.41=(141/
100)のように分数で表現した時に分母nが大きくな
るような場合は、テーブルサイズが天文学的に大きくな
ってしまい現実的には処理が不可能となってしまってい
た。
However, in the former method of calculating the density of the pixel of the original image corresponding to each pixel of the converted image, when the converted image becomes large, the number of pixels forming the image becomes large. Since the number of times increases, it takes a lot of time for the coordinate conversion process, and the processing speed decreases. Further, in the latter method of referring to the table storing the density patterns, the conversion table is stored only for the values determined in advance, and the enlargement / reduction processing cannot be performed at an arbitrary magnification. Since there are 2 n combinations of all n pixel densities, for example, 1.41 = (141 /
When the denominator n becomes large when expressed by a fraction like 100), the table size becomes astronomically large and processing cannot be performed in reality.

【0005】そこで本発明は上述した点を鑑みてなされ
たものであり水平・垂直方向ともに任意の倍率で拡大・
縮小処理を高速に行なうことを目的とする。
Therefore, the present invention has been made in view of the above-mentioned points, and enlarges / multiplies at any magnification in both horizontal and vertical directions.
The purpose is to perform reduction processing at high speed.

【0006】[0006]

【0007】[0007]

【課題を解決するための手段】本発明による2値イメー
ジデータで形成された白画素と黒画素とからなる2値画
像を拡大または縮小する変換処理方式は、変換後画像に
あらかじめ白画素を配置する白画素配置手段と、変換後
画像を形成する垂直座標に対応する原画像の垂直座標を
算出する算出手段と、この算出した垂直座標を有する原
画像の水平ライン内において黒画素が存在する領域を検
出する黒画素検出手段と、検出した黒画素の水平座標に
対応する変換処理後の水平座標を算出し、この水平座標
及び前記変換後画像を形成する垂直座標で規定された変
換後画像位置に黒画素を配置する黒画素配置手段と、を
有し、変換後画像の垂直座標ごとの画像変換処理を全て
の垂直座標について繰り返すことを特徴とする。
According to the conversion processing method for enlarging or reducing a binary image composed of white pixels and black pixels formed of binary image data according to the present invention, white pixels are arranged in advance in the converted image. White pixel arranging means, calculating means for calculating the vertical coordinates of the original image corresponding to the vertical coordinates forming the converted image, and an area where black pixels exist in the horizontal line of the original image having the calculated vertical coordinates. A black pixel detecting means for detecting a horizontal coordinate after conversion processing corresponding to the horizontal coordinate of the detected black pixel, and the converted image position defined by the horizontal coordinate and the vertical coordinate forming the converted image. And a black pixel arranging unit for arranging black pixels, and the image conversion process for each vertical coordinate of the converted image is repeated for all vertical coordinates.

【0008】また、本発明による2値イメージデータで
形成された白画素と黒画素とからなる2値画像を拡大ま
たは縮小する変換処理方式は、前記黒画素検出手段は、
原画像から連続して検出された黒画素については、連続
する黒画素の水平座標のうち、最小値及び最大値のみを
記憶し、前記黒画素配置手段は、前記記憶した最小及び
最大座標に対応する変換後の水平座標を算出し、変換後
の最小水平座標から最大水平座標まで連続して黒画素を
配置することを特徴とする。
According to the conversion processing method for enlarging or reducing a binary image composed of white pixels and black pixels formed of binary image data according to the present invention, the black pixel detecting means is
Regarding the black pixels continuously detected from the original image, only the minimum value and the maximum value of the horizontal coordinates of the continuous black pixels are stored, and the black pixel arrangement means corresponds to the stored minimum and maximum coordinates. The horizontal coordinate after conversion is calculated, and black pixels are continuously arranged from the minimum horizontal coordinate after conversion to the maximum horizontal coordinate after conversion.

【0009】また、本発明による2値画像の拡大縮小変
換処理方式は、原画像の水平座標を変換後画像の水平座
標に変換するための変換テーブルを有し、前記変換テー
ブルを用いて変換処理後の黒画素の水平座標を算出する
ことを特徴とする。
The binary image enlargement / reduction conversion processing method according to the present invention has a conversion table for converting the horizontal coordinates of the original image into the horizontal coordinates of the converted image, and the conversion processing is performed using the conversion table. It is characterized in that the horizontal coordinates of the subsequent black pixels are calculated.

【0010】[0010]

【0011】また、本発明による2値画像の拡大縮小変
換処理方式は、垂直方向への拡大処理における変換後画
像の垂直座標Yに対応する原画像の垂直座標の検出にお
いて、検出された原画像の垂直座標が、すでに変換処理
済みの変換後画像の垂直画像Y−1に対応する原画像の
垂直座標と一致する場合に、前記垂直座標Y−1を有す
る変換後画像の水平ラインを垂直座標Yの水平ラインに
複写する複写手段を有することを特徴とする。
The binary image enlargement / reduction conversion processing method according to the present invention detects the original image detected in the vertical coordinate detection of the original image corresponding to the vertical coordinate Y of the converted image in the vertical enlargement processing. Of the original image corresponding to the vertical image Y-1 of the converted image which has already been subjected to the conversion process, the horizontal line of the converted image having the vertical coordinate Y-1 is converted to the vertical coordinate of It is characterized by having a copying means for copying on the horizontal line of Y.

【0012】[0012]

【0013】また、本発明による2値画像の拡大縮小変
換処理方式における黒画素領域の検出方式は、原画像の
水平ライン中の黒画素の検出をワード単位で一括して行
う一括探知手段と、探知したワード値を、全ビットが1
であるワードと比較してワード中の白画素の有無を判断
する判断手段と、探知したワード中には白画素が含まれ
ないと判断した場合、次のワードまで水平座標をスキッ
プさせるスキップ手段と、を有することを特徴とする。
つまり、黒画素が何ドット連続するかを検出する際、ワ
ード単位(8,16,32ビットなど)をまとめて比較
し、ワードの値が$FF,$FFFF,$FFFFFFFFなど全ビットが
1である場合はワード内の全画素が黒であるとみなし、
引き続き次のワードの検索を行なうというものである。
The black pixel region detecting method in the binary image scaling conversion processing method according to the present invention is a collective detecting means for collectively detecting black pixels in a horizontal line of an original image in units of words. All bits are 1 in detected word value
And a skip means for skipping the horizontal coordinates until the next word when it is determined that the detected word does not include white pixels. , Are included.
In other words, when detecting how many consecutive black pixels, word units (8, 16, 32 bits, etc.) are compared together and the word value is $ FF, $ FFFF, $ FFFFFFFF, etc. In some cases all pixels in the word are considered black,
Then, the next word is searched for.

【0014】[0014]

【0015】[0015]

【作用】変換前画像の各画素の水平座標を、それに相当
する変換後画像の水平座標に変換するテーブルを前もっ
て作成することにより、拡大・縮小処理に伴う水平座標
の計算処理を少なくすることができる。テーブルを用い
ることによって、テーブルを用いない場合には変換前画
像内の画素数だけ行う必要があった計算が、変換前画像
の水平ラインの画素数分で済むこととなる。
It is possible to reduce the calculation processing of the horizontal coordinates associated with the enlargement / reduction processing by creating in advance a table for converting the horizontal coordinates of each pixel of the pre-conversion image into the corresponding horizontal coordinates of the post-conversion image. it can. By using the table, the calculation that has to be performed for the number of pixels in the pre-conversion image when the table is not used can be completed by the number of pixels of the horizontal line of the pre-conversion image.

【0016】原画像の水平ラインに黒画素が連続する場
合は、その連続領域の最小値と最大値にのみ着目し、変
換後画像において対応する最小値と最大値の間の画素に
ついても黒画素を配置することにより、変換前画像の全
ての画素について、原画像を参照する必要がなく、高速
に拡大処理を行うことが可能である。
When black pixels are continuous on the horizontal line of the original image, attention is paid only to the minimum value and the maximum value of the continuous area, and the pixels between the corresponding minimum value and maximum value in the converted image are also black pixels. By arranging, it is not necessary to refer to the original image for all the pixels of the pre-conversion image, and the enlargement processing can be performed at high speed.

【0017】[0017]

【0018】二値画像を垂直方向に拡大する場合におい
て、変換後画像の垂直座標に対応させて検出した原画像
の垂直座標が、直上の変換後画像の垂直座標に対応する
原画像の垂直座標と一致する場合は、直上の垂直座標を
持つ水平ラインを複写する。これにより、変換前画像の
同一水平ラインを複数回検査することを防ぎ高速な拡大
処理を行なうことができる。
When a binary image is enlarged in the vertical direction, the vertical coordinates of the original image detected corresponding to the vertical coordinates of the converted image are the vertical coordinates of the original image corresponding to the vertical coordinates of the converted image immediately above. If it matches, the horizontal line with the vertical coordinate immediately above is copied. As a result, it is possible to prevent the same horizontal line of the pre-conversion image from being inspected a plurality of times and perform high-speed enlargement processing.

【0019】[0019]

【0020】変換前画像内の水平ラインから連続する黒
画素の個数を算出する際、まずワード単位で画素の検出
を行い、ワード値を全ビットが1であるワードと比較す
ることにより、1回の比較処理でワード分連続した黒画
素の存在を検出することができ、連続する黒画素の個数
を高速で検出することができる。
When calculating the number of continuous black pixels from the horizontal line in the pre-conversion image, first the pixels are detected in word units, and the word value is compared once with the word in which all bits are 1 The presence of black pixels continuous for words can be detected by the comparison process of 1., and the number of continuous black pixels can be detected at high speed.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施形態を添付図
面を参照しつつ詳述する。図1は変数の意味を表したも
ので、IW,IHはそれぞれ変換前画像の水平方向、垂
直方向の画素数(単位:ドット)、OW,OHはそれぞ
れ変換後画像の水平方向、垂直方向の画素数(単位:ド
ット)である。また、各画素の座標は、画像の左上を原
点として、そこから右に水平方向に0、1、2、…、
n。そこから下へ垂直方向に0、1、2、…、nと区分
される。図2は変数a,b,c,d,e,fの意味を示
したもので、これらは変換後画像内の座標(X,Y)から
変換前画像内の座標(x,y)に逆変換する3×3行列
の要素である。例えば水平、垂直方向に2倍に拡大する
時、a=e=0.5、b=c=d=f=0.0となる。
また値xを超えない最大の整数値をint(x)で表す
こととする。
DETAILED DESCRIPTION OF THE INVENTION Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. FIG. 1 shows the meanings of variables. IW and IH are the number of pixels (unit: dot) in the horizontal and vertical directions of the image before conversion, and OW and OH are the horizontal and vertical directions of the image after conversion, respectively. The number of pixels (unit: dot). The coordinates of each pixel are 0, 1, 2, ..., Horizontally to the right from the origin at the upper left of the image.
n. From there, it is vertically divided into 0, 1, 2, ..., N. FIG. 2 shows the meanings of the variables a, b, c, d, e, and f, which are reversed from the coordinates (X, Y) in the post-conversion image to the coordinates (x, y) in the pre-conversion image. It is an element of the 3 × 3 matrix to be transformed. For example, when the magnification is doubled in the horizontal and vertical directions, a = e = 0.5 and b = c = d = f = 0.0.
Further, the maximum integer value that does not exceed the value x is represented by int (x).

【0022】図3及び図4は本発明による2値画像の拡
大・縮小アルゴリズムをフローチャートに表したもので
ある。このフローチャートに従い、図5に示す5×5ド
ットの変換前画像における右下3×3ドットの領域を水
平・垂直方向にそれぞれ1.5倍とする拡大処理につい
て説明する。この場合の変換後画像内の座標から変換前
画像内の座標を求める変換行列は図6のようになる。ま
た、この場合のIW,IHはそれぞれ5、OW,OHは
7となる。
FIGS. 3 and 4 are flowcharts showing an algorithm for enlarging / reducing a binary image according to the present invention. With reference to this flowchart, the enlargement processing for multiplying the lower right 3 × 3 dot area in the 5 × 5 dot pre-conversion image shown in FIG. 5 by 1.5 times in the horizontal and vertical directions will be described. In this case, the conversion matrix for obtaining the coordinates in the pre-conversion image from the coordinates in the post-conversion image is as shown in FIG. In this case, IW and IH are 5, and OW and OH are 7.

【0023】(変換テーブルの作成)ステップS10
1、ステップS102では、まず変換前画像における水
平座標を変換後画像の水平座標に変換する変換テーブル
table[x]を定義する。要素数がIW+1個の整
数配列を確保する(ステップS101)。この例では、
IWは5であるので、5+1=6だけ用意される。続い
て0≦x≦IWとなる全てのxについて、ここの例では
次の値を持つ変換テーブルが定義される。
(Creation of conversion table) Step S10
1. In step 1102, first, a conversion table table [x] for converting the horizontal coordinates in the pre-conversion image into the horizontal coordinates in the post-conversion image is defined. An integer array having IW + 1 elements is secured (step S101). In this example,
Since IW is 5, only 5 + 1 = 6 are prepared. Then, for all x satisfying 0 ≦ x ≦ IW, a conversion table having the following values is defined in this example.

【0024】 table[x] = int((x-c)/a+0.5) table[0] = int((0-2)/0.666+0.5) = -2 table[1] = int((1-2)/0.666+0.5) = -1 table[2] = int((2-2)/0.666+0.5) = 0 table[3] = int((3-2)/0.666+0.5) = 2 table[4] = int((4-2)/0.666+0.5) = 3 table[5] = int((5-2)/0.666+0.5) = 5 ここで、変数c,aはともに3×3の変換行列の要素で
ある。
Table [x] = int ((x-c) /a+0.5) table [0] = int ((0-2) /0.666+0.5) = -2 table [1] = int ((1- 2) /0.666+0.5) = -1 table [2] = int ((2-2) /0.666+0.5) = 0 table [3] = int ((3-2) /0.666+0.5) = 2 table [ 4] = int ((4-2) /0.666+0.5) = 3 table [5] = int ((5-2) /0.666+0.5) = 5 Here, both variables c and a are converted into 3 × 3. It is an element of the matrix.

【0025】ステップS103では変換テーブルの値が
0未満になる箇所を検出しその値を0に定義し直す。ま
たこの条件を満たすテーブルの添え字の最大値をxsと
する。この結果テーブルの値は以下のようになり、xs
←1となる。またこのような条件を満たすxがない場合
は、xs←0とする。
In step S103, a portion where the value in the conversion table becomes less than 0 is detected and the value is redefined to 0. Further, the maximum value of the subscript of the table that satisfies this condition is xs. The values in this result table are as follows, xs
← 1. When there is no x satisfying such a condition, xs ← 0.

【0026】 table[0] ← 0 table[1] ← 0 table[2] = 0 table[3] = 2 table[4] = 3 table[5] = 5 ここで、テーブル値がマイナス表示になるということ
は、変換後画像の外側にマッピングされることを意味
し、変換後画像に影響しないため、あらかじめ排除する
ものである。
Table [0] ← 0 table [1] ← 0 table [2] = 0 table [3] = 2 table [4] = 3 table [5] = 5 Here, it is said that the table value is displayed negatively. This means that the image is mapped outside the converted image, and since it does not affect the converted image, it is excluded in advance.

【0027】ステップS104では変換テーブルの値が
OW、つまり変換後画像の水平方向の画素数より大きく
なる箇所を検出し、その値をOWに定義し直す。またこ
の条件を満たすテーブルの添え字の最小値をxeとす
る。この例ではテーブルの中にこの条件を満たす要素は
ないのでテーブルの値は不変でxe←IW−1=4とな
る。以上が変換テーブルの作成手順である。ここで、テ
ーブル値がOWよりも大きくなるということは、変換後
画像の外側にマッピングされることを意味し、変換後画
像に影響しないため、あらかじめ排除するものである。
In step S104, a value in the conversion table is detected as OW, that is, a portion where the number of pixels in the converted image is larger than the number of pixels in the horizontal direction is detected, and the value is redefined as OW. Further, the minimum value of the subscript of the table that satisfies this condition is xe. In this example, since there is no element satisfying this condition in the table, the value in the table is unchanged and xe ← IW-1 = 4. The above is the procedure for creating the conversion table. Here, the fact that the table value is larger than OW means that the table value is mapped outside the converted image, and since it does not affect the converted image, it is excluded in advance.

【0028】続いてステップS105、ステップS10
6では変換後画像内で注目している垂直座標Yの値を0
に初期化し、前回のループで参照した変換前画像での水
平ラインの垂直座標を記憶する変数prevYを−1に初期
化する。
Subsequently, step S105 and step S10.
In 6, the value of the vertical coordinate Y of interest in the converted image is set to 0.
, And the variable prevY that stores the vertical coordinate of the horizontal line in the pre-conversion image referred to in the previous loop is initialized to -1.

【0029】(原画像の垂直座標の算出)ステップS1
07では、変換後画像での垂直座標Yに相当する変換前
画像での垂直座標を算出し、これをiyとする。算出式
は、
(Calculation of Vertical Coordinates of Original Image) Step S1
In 07, the vertical coordinate in the pre-conversion image corresponding to the vertical coordinate Y in the post-conversion image is calculated, and this is set as iy. The calculation formula is

【式1】 iy←int(eY+f)である。[Formula 1] iy ← int (eY + f).

【0030】ここで、変数e,fはともに3×3の変換
行列の要素である。この例ではY=0に初期化したとこ
ろであるのでiy←2である。iyは2となるので、変
換前画像の0、1の垂直座標は拡大変換処理の参照とさ
れない。
Here, the variables e and f are both elements of a 3 × 3 conversion matrix. In this example, since Y = 0 has just been initialized, iy ← 2. Since iy is 2, the vertical coordinates of 0 and 1 in the pre-conversion image are not referred to in the enlargement conversion process.

【0031】ステップS108ではステップS107で
算出した、変換前画像における垂直座標iyが変換前画
像内の画素を示しているかどうかを確認する。この例で
は0≦2<5(IH)であるので条件式は真となり、引
き続きステップS111の処理が行なわれる。
In step S108, it is confirmed whether or not the vertical coordinate iy in the pre-conversion image calculated in step S107 indicates a pixel in the pre-conversion image. In this example, 0 ≦ 2 <5 (IH), so the conditional expression becomes true, and the process of step S111 is continued.

【0032】ステップS111では以下で参照しようと
している変換前画像内での水平ラインが、前回のループ
で既に検査した水平ラインと同一かどうかを確認する。
この例では今回が初めてのループであり、iyは0、ス
テップS106でprevYを−1に初期化しているのでこ
の条件式は偽となり、引き続きステップS113の処理
が行なわれる。
In step S111, it is confirmed whether the horizontal line in the pre-conversion image to be referred to below is the same as the horizontal line already inspected in the previous loop.
In this example, this is the first loop, iy is 0, and prevY is initialized to -1 in step S106, so this conditional expression becomes false, and the process of step S113 is subsequently performed.

【0033】(白画素の配置)ステップS113では変
換後画像内で、垂直座標がYである画素を全て白で塗り
潰す。この例では変換後画像内の垂直座標が0である画
素(0,0)〜(6,0)がすべて白画素が配置され
る。
(Arrangement of White Pixels) In step S113, all pixels in the converted image whose vertical coordinates are Y are filled with white. In this example, white pixels are arranged for all the pixels (0, 0) to (6, 0) whose vertical coordinates are 0 in the converted image.

【0034】ステップS114では、以下で参照する変
換前画像内での水平ラインの垂直座標を変数prevYに記
憶する。ここの例ではprevY←2となる。この作業は、
ステップS111での判定のために必要となる。
In step S114, the vertical coordinate of the horizontal line in the pre-conversion image referred to below is stored in the variable prevY. In this example, prevY ← 2. This work
It is necessary for the determination in step S111.

【0035】(座標検出)ステップS115では変換前
画像の画素(xs,iy)〜画素(xe,iy)の濃度
を左から順に検査する。ここでは、(1、2)〜(4、
2)である。黒画素が単独であるもの及び黒画素が連続
したブロック領域をそれぞれ検出し、これらをB1,B
2,…,Bnとする。この例では画素(2,2)と画素
(3,2)が黒画素が連続したブロック領域であり、n
=1、B1={(2,2),(3,2)}となる。
(Coordinate detection) In step S115, the densities of pixels (xs, iy) to pixels (xe, iy) of the pre-conversion image are inspected in order from the left. Here, (1, 2) to (4,
2). A block area having a single black pixel and a block area having continuous black pixels are detected, and these are detected as B1 and B
2, ..., Bn. In this example, the pixel (2, 2) and the pixel (3, 2) are a block region in which black pixels are continuous, and n
= 1 and B1 = {(2,2), (3,2)}.

【0036】ステップS116では黒画素領域のブロッ
ク数に関するループで使用する変数iの値を1で初期化
する。
In step S116, the value of the variable i used in the loop for the number of blocks in the black pixel area is initialized to 1.

【0037】ステップS117では変数iの値が黒画素
領域のブロック数n以下であるかどうかの判別を行う。
この例ではiは1であり、nと同じであるので、真とな
り、引き続きステップS118の処理が行なわれる。
In step S117, it is determined whether or not the value of the variable i is less than or equal to the number n of blocks in the black pixel area.
In this example, i is 1 and is the same as n, so that it becomes true and the process of step S118 is continued.

【0038】ステップS118ではBiに含まれる画素
の水平座標の最小値、最大値をそれぞれSi,Eiとす
る。ここの例ではB1={(2,2),(3,2)}で
あるのでSi←2,Ei←3となる。
In step S118, the minimum and maximum values of the horizontal coordinates of the pixels included in Bi are set to Si and Ei, respectively. In this example, B1 = {(2,2), (3,2)}, so Si ← 2 and Ei ← 3.

【0039】(黒画素の配置)ステップS119では変
換後画像の画素(table[Si],Y)〜(tab
le[Ei+1]−1,Y)を黒で塗り潰す。この例で
は(table[2],2)〜(table[3+1]
−1,2)となり、変換後画像の(0,2)〜(2,
2)を黒で塗り潰す。図7に黒画素が配置された状態を
示す。
(Arrangement of Black Pixels) In step S119, pixels (table [Si], Y) to (tab) of the converted image are displayed.
Fill le [Ei + 1] -1, Y) with black. In this example, (table [2], 2) to (table [3 + 1]
-1,2), and (0,2) to (2,2 of the converted image
Fill 2) with black. FIG. 7 shows a state in which black pixels are arranged.

【0040】ステップS120で変数iの値を1増や
し、次の黒画素領域のブロックBiに注目する。この例
ではn=1であるので、ブロックは一つしかなく、ステ
ップS117の条件式は偽となるため、引き続きステッ
プS121の処理が行われる。
At step S120, the value of the variable i is incremented by 1, and attention is paid to the block Bi in the next black pixel area. In this example, since n = 1, there is only one block, and the conditional expression in step S117 is false, so the processing in step S121 is continued.

【0041】ステップS121では変換後画像の次の垂
直座標の処理をするため、Yの値を1増やす。S122
ではそのYの値がOH(変換後画像データの高さ)を越
えたか否かを判別する。越えた場合は、変換後画像内の
全ての垂直座標について検討しているため処理を終了す
る。この例のように越えていない場合は引き続きステッ
プS107の処理が行われる。
In step S121, the value of Y is incremented by 1 in order to process the next vertical coordinate of the converted image. S122
Then, it is determined whether or not the value of Y exceeds OH (the height of the converted image data). If it exceeds, all the vertical coordinates in the converted image have been examined, and the process ends. If it does not exceed as in this example, the process of step S107 is continued.

【0042】ステップS107ではY=1に対するiy
を計算した結果、iy=2となる。ステップS108の
条件式は真であり、ステップS111へ進む。iyは前
回のループのY=0の時と同じになるため、ステップS
111の条件式も真となる。すなわち、S114のprev
Yとiyが一致するため、S112の処理が行われる。
ステップS112では変換後画像においてY=1の水平
ラインの直上の水平ライン、すなわちY=0の水平ライ
ンがそのままY=1の水平ライン上に複写される。した
がって、図8に示すように0、1の垂直座標を持つ水平
ラインが同じ黒画素の配置となる。このように、変換後
画像の垂直座標とその直上の垂直座標の参照する原画像
の垂直座標が一致する場合は、直上の垂直座標の水平ラ
インが複写されることになるため、S113からS12
0までの処理を省くことができる。その後ステップS1
21でY←2とし、さらに次の垂直座標について再びス
テップS107の処理を行なう。以下、Y=2,3,4
のループでは上述の処理と同様の処理が行なわれる(図
9参照)。
In step S107, iy for Y = 1
As a result of calculating, iy = 2. The conditional expression in step S108 is true, and the process proceeds to step S111. Since iy is the same as when Y = 0 in the previous loop, step S
The conditional expression 111 is also true. That is, prev of S114
Since Y and iy match, the process of S112 is performed.
In step S112, the horizontal line immediately above the horizontal line of Y = 1, that is, the horizontal line of Y = 0 is copied as it is onto the horizontal line of Y = 1 in the converted image. Therefore, as shown in FIG. 8, horizontal lines having vertical coordinates of 0 and 1 have the same black pixel arrangement. In this way, if the vertical coordinates of the converted image and the vertical coordinates of the original image referred to by the vertical coordinates directly above the converted image match, the horizontal line of the vertical coordinates immediately above is copied, and therefore S113 to S12.
Processing up to 0 can be omitted. Then step S1
In step 21, Y ← 2 is set, and the process of step S107 is performed again for the next vertical coordinate. Below, Y = 2, 3, 4
In the loop, the same processing as the above processing is performed (see FIG. 9).

【0043】Y=5でステップS107に到達した時の
処理について説明する。ステップS107の式にてiy
←5となり、IH未満でなくなるため、ステップS10
8の条件式が偽となる。これは変換後画像において垂直
座標Y=5の水平ラインは変換前画像の外側の領域に対
応することを意味する。そこでステップS109にて変
換後画像の垂直座標Y=5の水平ラインの画素をすべて
白で塗り潰す。
The processing when Y = 5 and step S107 is reached will be described. Iy in the formula of step S107
← 5, which is not less than IH, so step S10
Conditional expression 8 is false. This means that in the converted image, the horizontal line with the vertical coordinate Y = 5 corresponds to the area outside the unconverted image. Therefore, in step S109, all the pixels of the horizontal line of the vertical coordinate Y = 5 of the converted image are filled with white.

【0044】以上の処理を終えステップS121でY←
6となりこの値はS122の条件式が真のため、もう一
度ステップS107に到達する。ステップS107の式
にてiy←6となり、ステップS108の条件式が偽と
なる。ステップS109にて変換後画像の垂直座標Y=
6の水平ラインの画素をすべて白で塗り潰す。
After the above processing is completed, Y ← in step S121.
Since this is 6, the conditional expression in S122 is true, and therefore the process again reaches step S107. In the expression of step S107, iy ← 6, and the conditional expression of step S108 becomes false. In step S109, the vertical coordinate of the converted image Y =
Fill all pixels in the horizontal line of 6 with white.

【0045】続いてステップS121で1追加され、Y
←7となりこの値はS122の条件式を偽にするため、
全ての処理が終了する。
Subsequently, 1 is added in step S121, and Y is added.
← 7 and this value makes the conditional expression in S122 false, so
All processing ends.

【0046】図12に図3及び図4の全体の処理手順を
簡略化して表したフローチャートを示す。図12と図3
及び図4の各ステップの対応関係は、次のとおりであ
る。 S1:S101〜S104、 S2:S105〜S106、 S3:S107、 S4:S108〜S114、 S5:S115、 S6:S116〜S120、 S7:S121、 S8:S122。
FIG. 12 is a flow chart showing the overall processing procedure of FIGS. 3 and 4 in a simplified manner. 12 and 3
And the corresponding relationship between the steps of FIG. 4 is as follows. S1: S101 to S104, S2: S105 to S106, S3: S107, S4: S108 to S114, S5: S115, S6: S116 to S120, S7: S121, S8: S122.

【0047】次に図3及び図4のステップS115の変
換前画像の画素(xs,iy)〜画素(xe,iy)の
濃度を左から順に検査し、黒の画素の領域を検出、これ
らをB1,B2,…,Bnとする処理について詳述す
る。図10及び11はS115の処理を更に細かくフロ
ーチャートに表したものである。なお、本装置における
ワード長をW(=8,16,32など)とする。
Next, the densities of pixels (xs, iy) to pixels (xe, iy) of the pre-conversion image in step S115 of FIGS. 3 and 4 are inspected in order from the left, and black pixel areas are detected. The processing of B1, B2, ..., Bn will be described in detail. 10 and 11 are flowcharts showing the process of S115 in more detail. The word length in this device is W (= 8, 16, 32, etc.).

【0048】ステップS201では作業用変数Xにxs
の値をセットし、ステップS202では黒画素領域のブ
ロック数を表す変数nの値を0に初期化する。
In step S201, xs is set to the work variable X.
Is set, and the value of the variable n representing the number of blocks in the black pixel area is initialized to 0 in step S202.

【0049】ステップS203ではXの値を検査しX>
xeであれば与えられた領域外ということなので本検出
処理を終了する。X≦xeならばステップS204以降
の処理を行ない、黒画素を検出する。
In step S203, the value of X is checked and X>
If it is xe, it means that it is outside the given area, so this detection processing is terminated. If X ≦ xe, the processing from step S204 is performed to detect a black pixel.

【0050】ステップS204ではxe−X+1≧Wか
どうかを検査する。W以上であるなら水平座標Xから始
まる一連のWドットに黒画素が含まれるか否かを1回の
ワード比較によって検査するためステップS205の処
理を行なう。W以下であれば、ステップS207に進
み、画素(x,iy)毎に黒であるかどうかを検査す
る。
In step S204, it is checked whether xe-X + 1≥W. If it is W or more, the process of step S205 is performed in order to inspect whether or not a black pixel is included in the series of W dots starting from the horizontal coordinate X by one word comparison. If it is W or less, the process proceeds to step S207, and it is checked whether or not each pixel (x, iy) is black.

【0051】ステップS205では(X,iy)からの
Wドット、すなわち画素(X,iy),(X+1,i
y),…,(X+W−1,iy)に黒画素が1つ以上含
まれるかどうかを、ワードの値と0を比較することによ
り検査する。例えばワードの値が0ならばW個の画素は
全て白画素である。このためワード分スキップしてステ
ップS206にてXの値にWを加えステップS203か
らの処理を繰り返す。一方ワードの値が0以外ならばW
個の画素中に黒画素が1つ以上含まれることを意味する
ので、スキップせずにステップS207以降の処理で1
画素ずつ画素の濃度を検査して黒画素を検出する。
In step S205, W dots from (X, iy), that is, pixels (X, iy), (X + 1, i).
It is checked whether y), ..., (X + W-1, iy) includes one or more black pixels by comparing the value of the word with 0. For example, if the word value is 0, all W pixels are white pixels. Therefore, the word is skipped and W is added to the value of X in step S206, and the processing from step S203 is repeated. On the other hand, if the word value is not 0, W
Since it means that one pixel includes one or more black pixels, the number of pixels is set to 1 in step S207 and subsequent steps without skipping.
The density of each pixel is inspected pixel by pixel to detect black pixels.

【0052】ステップS207では画素(X,iy)毎
に黒であるかどうかを検査する。もし黒でないならばス
テップS208でXの値を1増やすことによりさらに右
隣りの画素の濃度の検査を継続する。黒画素が発見され
るまで、この処理が繰り返される。ここで黒画素が発見
されたならばステップS209以降の処理を引き続き行
なうことにより、黒画素が何個連続しているか調べる。
In step S207, it is checked whether or not each pixel (X, iy) is black. If it is not black, the value of X is incremented by 1 in step S208 to continue the inspection of the density of the pixel on the right. This process is repeated until black pixels are found. If black pixels are found here, the number of black pixels in succession is checked by continuing the processing from step S209.

【0053】ステップS209では黒画素領域の最小水
平座標Sとして黒画素が発見されたXの値をセットす
る。ステップS210ではXの値を1増やすことにより
右隣りの画素の濃度比較を継続する。
In step S209, the value of X at which a black pixel is found is set as the minimum horizontal coordinate S of the black pixel area. In step S210, the value of X is increased by 1 to continue the density comparison of the pixel on the right side.

【0054】ステップS211ではXの値がxeより大
きいかどうかを検査する。もしX>xeであるならば黒
画素領域の最大水平座標Eがxeであることを意味する
のでステップS212にて最大水平座標値Eに値xeを
セットする。もしX≦xeであるならばステップS21
3以降の処理を引き続き行なう。
In step S211, it is checked whether the value of X is larger than xe. If X> xe, it means that the maximum horizontal coordinate E of the black pixel area is xe, and therefore the value xe is set to the maximum horizontal coordinate value E in step S212. If X ≦ xe, step S21
The processes after 3 are continuously performed.

【0055】ステップS213ではxe−X+1≧Wか
どうかを検査する。W以上であるなら水平座標Xから始
まる一連のWドット分黒画素が連続するか否かを1回の
ワード比較によって検査するためステップS214の処
理を行なう。W以下であれば、ステップS216で一画
素ずつ白画素かどうかを調べる。
In step S213, it is checked whether xe-X + 1≥W. If it is W or more, the process of step S214 is performed to inspect whether or not a series of black pixels for W dots starting from the horizontal coordinate X are continuous by one word comparison. If it is W or less, it is checked in step S216 whether each pixel is a white pixel.

【0056】ステップS214では(X,iy)からの
Wドット、すなわち画素(X,iy),(X+1,i
y),…,(X+w−1,iy)に白画素が1つ以上含
まれるかどうかを、ワードの値とワード中の全ビットが
1である値、すなわち$FF,$FFFF,$FFFFFFFFなどを比較
することにより検査する。ワード中の全ビットが1なら
ばW個の画素は全て黒画素である。このためワード分ス
キップしてステップS215にてXの値にWを加えステ
ップS211からの処理を繰り返す。一方ワード中の全
ビットが1とならないということは、W個の画素中に白
画素が1つ以上含まれることを意味するので、ステップ
S216以降の処理で1画素ずつ画素の濃度を検査す
る。
In step S214, W dots from (X, iy), that is, pixels (X, iy), (X + 1, i).
y), ..., (X + w-1, iy) includes one or more white pixels, whether the value of the word and all the bits in the word are 1, that is, $ FF, $ FFFF, $ FFFFFFFF, etc. Check by comparing. If all bits in the word are 1, then W pixels are all black pixels. Therefore, the word is skipped and W is added to the value of X in step S215, and the processing from step S211 is repeated. On the other hand, the fact that all the bits in the word do not become 1 means that one or more white pixels are included in the W number of pixels, and therefore the pixel density is inspected pixel by pixel in the processing from step S216.

【0057】ステップS216では画素(X,iy)が
白であるかどうかを検査する。もし白でないならばステ
ップS220でXの値を1増やすことによりさらに右の
画素の濃度の検査を継続する。もし画素(X,iy)が
白画素ならば、黒画素領域の最大水平座標はX−1であ
ることが分かるのでステップS217にて最大水平座標
値EにX−1をセットし、引き続きステップS218の
処理を行なう。
In step S216, it is checked whether or not the pixel (X, iy) is white. If it is not white, the density of the pixel on the right is further inspected by increasing the value of X by 1 in step S220. If the pixel (X, iy) is a white pixel, it can be seen that the maximum horizontal coordinate of the black pixel area is X-1, so in step S217, the maximum horizontal coordinate value E is set to X-1, and subsequently step S218. Is processed.

【0058】ステップS218では黒画素領域のブロッ
ク数を表す変数nの値を1増やし、ステップS219で
はBnに含まれる画素の水平座標の最小値および最大値
であるSn,Enをセットする。そして、ステップS2
03に戻って、次の黒画素領域について検査する。S
n,Enはここで求められた黒画素が連続しない場合
は、一致した値となる。
In step S218, the value of the variable n representing the number of blocks in the black pixel area is incremented by 1, and in step S219, the minimum and maximum values of the horizontal coordinates of the pixels contained in Bn are set to Sn and En. And step S2
Returning to 03, the next black pixel area is inspected. S
When the black pixels obtained here are not continuous, n and En have matching values.

【0059】[0059]

【発明の効果】以上で説明したように、本発明の拡大ま
たは縮小する変換処理方式は変換後画像をあらかじめ白
画素で塗りつぶしておき、変換前画像内から黒画素を検
出し、黒画素が見つかった時にのみ変換後画像の相当画
素を黒で塗り潰すため、黒画素が少ない2値イメージデ
ータ、例えばCAD図面や文書データなどに対して効率
の良い拡大・縮小処理が可能となる。実際上記のような
実イメージデータでは黒画素が画素全体に占める割合は
数%以下であることがほとんどである。
As described above, according to the conversion processing method of the present invention for enlarging or reducing, the converted image is filled with white pixels in advance, black pixels are detected in the image before conversion, and black pixels are found. Since the corresponding pixels of the converted image are filled with black only when the conversion is performed, efficient enlargement / reduction processing can be performed on binary image data having a small number of black pixels, such as CAD drawing or document data. In fact, in the actual image data as described above, the ratio of black pixels to the whole pixels is almost several percent or less.

【0060】原画像の水平ラインに黒画素が連続する場
合は、その連続領域の最小値と最大値にのみ着目し、変
換後画像において対応する最小値と最大値の間の画素に
ついても黒画素を配置することにより、変換前画像の全
ての画素について、原画像を参照する必要がなく、高速
に拡大処理を行うことが可能である。
When black pixels are continuous on the horizontal line of the original image, attention is paid only to the minimum value and the maximum value of the continuous area, and the pixels between the corresponding minimum value and maximum value in the converted image are also black pixels. By arranging, it is not necessary to refer to the original image for all the pixels of the pre-conversion image, and the enlargement processing can be performed at high speed.

【0061】変換前画像中の水平座標値から変換後画像
中の水平座標値に変換するための変換テーブルを用いた
ため、水平座標値の変換に伴う計算量の削減が実現でき
る。
Since the conversion table for converting the horizontal coordinate value in the pre-conversion image into the horizontal coordinate value in the post-conversion image is used, it is possible to reduce the calculation amount associated with the conversion of the horizontal coordinate value.

【0062】また変換テーブルに必要な記憶容量は、変
換前画像の水平方向の画素数分+1個の整数値を記憶す
る容量に等しく、これは現実的に十分確保可能な記憶容
量である。
The storage capacity required for the conversion table is equal to the capacity for storing an integer value of +1 for the number of pixels in the horizontal direction of the pre-conversion image, which is a storage capacity that can be practically sufficiently secured.

【0063】本発明では、変換前画像中の画素の内変換
後画像に影響を与えないものはその濃度を検査しない。
これにより無駄な濃度の参照処理を避けることができ処
理の速度性能の向上を可能とする。
In the present invention, of the pixels in the image before conversion, those that do not affect the image after conversion are not inspected for their densities.
As a result, useless density reference processing can be avoided and processing speed performance can be improved.

【0064】画像を垂直方向に拡大する際、変換前画像
のある1水平ラインが、変換後画像の複数の水平ライン
に拡大されることがある。この場合、本発明において
は、変換後画像の水平ラインを構築する際、直上の水平
ラインと同じ変換前水平ラインを参照するような場合、
再度の参照を避けて直上の水平ラインを複写することと
した。これにより変換前画像の同一水平ラインの画素の
濃度を複数回参照することを避けることができるため、
無駄な参照をなくし速度性能の向上が可能となる。
When the image is enlarged in the vertical direction, one horizontal line in the pre-conversion image may be enlarged in a plurality of horizontal lines in the post-conversion image. In this case, in the present invention, when the horizontal line of the post-conversion image is constructed, when the same horizontal line as the immediately preceding horizontal line is referred to,
It was decided to copy the horizontal line directly above, avoiding reference again. This makes it possible to avoid referring to the densities of pixels on the same horizontal line of the pre-conversion image multiple times.
It is possible to improve the speed performance by eliminating unnecessary references.

【0065】本発明では、変換前画像から黒画素領域を
検出する際、ワードの値と0を比較することにより複数
の画素が全て白であるか否かを検査した。これにより、
先に述べたようにCAD図面や文書データは比較的黒画
素数が少なく、かつ黒画素はランダムに配置されている
のではなく、局所的にまとまって配置されていることが
多いため、白画素領域を高速にスキップすることが可能
となる。
In the present invention, when the black pixel area is detected from the pre-conversion image, it is inspected whether all the plurality of pixels are white by comparing the value of the word with 0. This allows
As described above, the number of black pixels in the CAD drawing or the document data is relatively small, and the black pixels are not randomly arranged in many cases but are often arranged locally. It is possible to skip the area at high speed.

【0066】本発明では、変換前画像から黒領域を検索
する際、ワードの値を全ビットが1であるようなワード
の値と比較することにより、複数の画素が全て黒である
か否かを検査した。上述したように黒画素は局所的にま
とまって配置されていることが多いため、1回の比較操
作で複数の黒画素を認知することができ、連続する黒画
素の個数を高速に算出することが可能となる。
According to the present invention, when a black area is searched for from a pre-conversion image, it is determined whether or not a plurality of pixels are all black by comparing the value of the word with the value of the word in which all bits are 1. Was inspected. Since black pixels are often arranged locally as described above, a plurality of black pixels can be recognized by one comparison operation, and the number of consecutive black pixels can be calculated at high speed. Is possible.

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

【図1】 本発明の実施の態様における変数IW,I
H,OW,OHの意味を表した図である。
FIG. 1 shows variables IW and I according to an embodiment of the present invention.
It is a figure showing the meaning of H, OW, and OH.

【図2】 本発明の実施の態様における変数a,b,
c,d,e,fの意味を表した図である。
FIG. 2 shows variables a, b, and
It is a figure showing the meaning of c, d, e, and f.

【図3】 本発明の実施の態様における拡大処理のフロ
ーチャートである。
FIG. 3 is a flowchart of enlargement processing according to the embodiment of the present invention.

【図4】 本発明の実施の態様における拡大処理のフロ
ーチャートである。
FIG. 4 is a flowchart of enlargement processing according to the embodiment of the present invention.

【図5】 本発明の実施の態様における拡大処理前の原
画像の例を表したものである。
FIG. 5 illustrates an example of an original image before enlarging processing according to the embodiment of the present invention.

【図6】 本発明の実施の態様における拡大処理の例に
使用した変換行列を表したものである。
FIG. 6 shows a transformation matrix used in an example of enlargement processing in the embodiment of the present invention.

【図7】 本発明の実施の態様における拡大処理の例
で、垂直座標0の水平ラインまで処理を終えた変換後画
像を表したものである。
FIG. 7 shows an example of enlargement processing in the embodiment of the present invention, which shows a converted image after processing up to a horizontal line with a vertical coordinate of 0.

【図8】 本発明の実施の態様における拡大処理の例
で、垂直座標1の水平ラインまで処理を終えた変換後画
像を表したものである。
FIG. 8 illustrates an example of enlargement processing according to an embodiment of the present invention, which shows a converted image after processing up to a horizontal line with a vertical coordinate of 1.

【図9】 本発明の実施の態様における拡大処理の例
で、垂直座標4の水平ラインまで処理を終えた変換後画
像を表したものである。
FIG. 9 shows an example of enlargement processing in the embodiment of the present invention, which shows a converted image after processing up to a horizontal line of vertical coordinates 4.

【図10】 本発明の実施の態様において、ある水平ラ
イン中から黒画素領域を検出する処理のフローチャート
である。
FIG. 10 is a flowchart of processing for detecting a black pixel area in a certain horizontal line in the embodiment of the present invention.

【図11】 本発明の実施の態様において、ある水平ラ
イン中から黒画素領域を検出する処理のフローチャート
である。
FIG. 11 is a flowchart of a process of detecting a black pixel area in a horizontal line according to the embodiment of the present invention.

【図12】 本発明の実施態様における図3、4の処理
を簡略して表したフローチャートである。
FIG. 12 is a flowchart showing the processing of FIGS. 3 and 4 according to the embodiment of the present invention in a simplified manner.

【図13】 従来技術における変換後画像の画素と変換
前画像の画素のマッピングを表した図である。
FIG. 13 is a diagram showing mapping of pixels of a post-conversion image and pixels of a pre-conversion image in a conventional technique.

【図14】 従来技術における1.5倍の拡大を行なう処
理を説明するための図である。
FIG. 14 is a diagram for explaining a process of performing 1.5 times enlargement in the conventional technique.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/38 - 1/393 ─────────────────────────────────────────────────── ─── Continuation of the front page (58) Fields surveyed (Int.Cl. 7 , DB name) H04N 1/38-1/393

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 変換後画像にあらかじめ白画素を配置す
る白画素配置手段と、 変換後画像を形成する垂直座標に対応する原画像の垂直
座標を算出する算出手段と、 この算出した垂直座標を有する原画像の水平ライン内に
おいて黒画素が存在する領域を検出する黒画素検出手段
と、 検出した黒画素の水平座標に対応する変換処理後の水平
座標を算出し、この水平座標及び前記変換後画像を形成
する垂直座標で規定された変換後画像位置に黒画素を配
置する黒画素配置手段と、を有し、 変換後画像の垂直座標ごとの画像変換処理を全ての垂直
座標について繰り返すことを特徴とする2値イメージデ
ータで形成された白画素と黒画素とからなる2値画像の
拡大縮小変換処理方式。
1. A white pixel arrangement means for arranging white pixels in a converted image in advance, a calculation means for calculating vertical coordinates of an original image corresponding to vertical coordinates forming a converted image, and the calculated vertical coordinates. Black pixel detection means for detecting an area in which a black pixel exists in the horizontal line of the original image, and horizontal coordinates after conversion processing corresponding to the horizontal coordinates of the detected black pixel are calculated. A black pixel arranging means for arranging black pixels at the post-conversion image position defined by the vertical coordinates forming the image, and repeating the image conversion process for each vertical coordinate of the post-conversion image for all the vertical coordinates. A binary image enlarging / reducing conversion processing method consisting of white pixels and black pixels formed of characteristic binary image data.
【請求項2】 黒画素検出手段は、原画像から連続して
検出された黒画素については、連続する黒画素の水平座
標のうち、最小値及び最大値のみを記憶し、 黒画素配置手段は、前記記憶した最小及び最大座標に対
応する変換後の水平座標を算出し、 変換後の最小水平座標から最大水平座標まで連続して黒
画素を配置することを特徴とする請求項1に記載の2値
イメージデータで形成された白画素と黒画素とからなる
2値画像の拡大縮小変換処理方式。
2. The black pixel detecting means stores only the minimum value and the maximum value among the horizontal coordinates of the continuous black pixels for the black pixels continuously detected from the original image, and the black pixel arranging means 2. The converted horizontal coordinates corresponding to the stored minimum and maximum coordinates are calculated, and black pixels are continuously arranged from the converted minimum horizontal coordinate to the maximum horizontal coordinate. A binary image enlargement / reduction conversion processing method consisting of white pixels and black pixels formed of binary image data.
【請求項3】 原画像の水平座標を変換後画像の水平座
標に変換するための変換テーブルを有し、 前記変換テーブルを用いて変換処理後の黒画素の水平座
標を算出することを特徴とする請求項1、2のいずれか
に記載の2値イメージデータで形成された白画素と黒画
素とからなる2値画像の拡大縮小変換処理方式。
3. A conversion table for converting the horizontal coordinate of the original image into the horizontal coordinate of the converted image, wherein the horizontal coordinate of the black pixel after the conversion processing is calculated using the conversion table. 3. A scaling conversion processing method for a binary image formed of the binary image data according to claim 1, comprising a white pixel and a black pixel.
【請求項4】 垂直方向への拡大処理における変換後画
像の垂直座標Yに対応する原画像の垂直座標の検出にお
いて、 検出された原画像の垂直座標が、すでに変換処理済みの
変換後画像の垂直座標Y−1に対応する原画像の垂直座
標と一致する場合に、前記垂直座標Y−1を有する変換
後画像の水平ラインを垂直座標Yの水平ラインに複写す
る複写手段を有することを特徴とする請求項1から5の
いずれかに記載の2値イメージデータで形成された白画
素と黒画素とからなる2値画像の拡大縮小変換処理方
式。
4. In the detection of the vertical coordinates of the original image corresponding to the vertical coordinates Y of the converted image in the enlargement processing in the vertical direction, the detected vertical coordinates of the original image correspond to those of the converted image which has already been subjected to the conversion processing. The image forming apparatus further comprises copying means for copying a horizontal line of the converted image having the vertical coordinate Y-1 to a horizontal line of the vertical coordinate Y when the vertical coordinate of the original image corresponds to the vertical coordinate Y-1. 6. A scaling conversion processing method for a binary image formed of the binary image data according to claim 1, comprising a white pixel and a black pixel.
【請求項5】 2値イメージデータで形成された白画素
と黒画素とからなる2値画像を拡大または縮小する変換
処理方式において、 原画像の水平ライン中の黒画素の検出をワード単位で一
括して行う一括探知手段と、 探知したワード値を、全ビットが1であるワードと比較
してワード中の白画素の有無を判断する判断手段と、 探知したワード中には白画素が含まれないと判断した場
合、次のワードまで水平座標をスキップさせるスキップ
手段と、 を有することを特徴とする黒画素領域の検出方式。
5. A conversion processing method for enlarging or reducing a binary image composed of white pixels and black pixels formed of binary image data, wherein detection of black pixels in a horizontal line of an original image is performed in units of words. Collectively detecting means, and a judging means for judging the presence or absence of a white pixel in the word by comparing the detected word value with a word in which all the bits are 1, and the detected word contains a white pixel. A black pixel area detection method comprising: a skip means for skipping the horizontal coordinate to the next word when it is determined that the black pixel area is not present.
JP35315098A 1998-12-11 1998-12-11 Binary image scaling conversion processing method and black pixel area detection method Expired - Fee Related JP3434720B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35315098A JP3434720B2 (en) 1998-12-11 1998-12-11 Binary image scaling conversion processing method and black pixel area detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35315098A JP3434720B2 (en) 1998-12-11 1998-12-11 Binary image scaling conversion processing method and black pixel area detection method

Publications (2)

Publication Number Publication Date
JP2000184188A JP2000184188A (en) 2000-06-30
JP3434720B2 true JP3434720B2 (en) 2003-08-11

Family

ID=18428908

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35315098A Expired - Fee Related JP3434720B2 (en) 1998-12-11 1998-12-11 Binary image scaling conversion processing method and black pixel area detection method

Country Status (1)

Country Link
JP (1) JP3434720B2 (en)

Also Published As

Publication number Publication date
JP2000184188A (en) 2000-06-30

Similar Documents

Publication Publication Date Title
JP2921659B2 (en) Apparatus and method for resizing video image
US5847714A (en) Interpolation method and apparatus for fast image magnification
US7574071B2 (en) Method and apparatus for resizing images
GB2391127A (en) System and method for bounding and classifying regions within a graphical image.
US6421063B1 (en) Pixel zoom system and method for a computer graphics system
US8660384B2 (en) Method and system for predictive scaling of color mapped images
JPH07288689A (en) Device and method for binarization processing of image signal
US5760921A (en) Method of and apparatus for image processing
US5434931A (en) System and method for picture image processing employing transformation of picture data
JPH10164370A (en) Method and device for interpolating gradation of image, image filtering method and image filter
JPH10513284A (en) Automatic determination of blank pages and character frames for binary images
Chai et al. Orthogonal zig-zag: An efficient method for extracting straight lines from engineering drawings
JP3434720B2 (en) Binary image scaling conversion processing method and black pixel area detection method
JPH07160812A (en) Image processing apparatus and method
JP2000011167A (en) Pixel interpolation method and apparatus based on gradient
JP3026706B2 (en) Image processing device
JPH08153189A (en) Optionally magnification varying device for digital image
JPH06266747A (en) Dct/inverse dct arithmetic unit
JPH07107268A (en) Image processing device
CN113808028A (en) Adversarial sample detection method and device based on attribution algorithm
CN115797806B (en) A method and apparatus for testing multiple fittings in power transmission lines
JP3760634B2 (en) Image processing apparatus, image processing method, and recording medium
JP2803576B2 (en) Image processing device
JP3285349B2 (en) Dither image enlarger
JP3045810B2 (en) Binary image processing method and apparatus

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080530

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090530

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100530

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees