[go: up one dir, main page]

JPH06333034A - Image processing method and device - Google Patents

Image processing method and device

Info

Publication number
JPH06333034A
JPH06333034A JP5122499A JP12249993A JPH06333034A JP H06333034 A JPH06333034 A JP H06333034A JP 5122499 A JP5122499 A JP 5122499A JP 12249993 A JP12249993 A JP 12249993A JP H06333034 A JPH06333034 A JP H06333034A
Authority
JP
Japan
Prior art keywords
block
image
image data
pixel value
processing method
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.)
Withdrawn
Application number
JP5122499A
Other languages
Japanese (ja)
Inventor
Hiroyasu Morita
裕康 森田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP5122499A priority Critical patent/JPH06333034A/en
Publication of JPH06333034A publication Critical patent/JPH06333034A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

(57)【要約】 【目的】 画像の劣化を抑え、高品質に画像を処理でき
る画像処理方法及び装置を提供する。 【構成】 縮小するブロックを描画する最適値が1つで
なかった場合に、どちらを選ぶか判断するためのフラグ
を初期化し(S11)、画像データに対して、横1/
n、縦1/mの縮小に対応するn×mのブロックを設定
し(S12)、設定されたブロックを構成する各々の画
素値の平均を求める(S14)。次に、その平均値と描
画可能な画素値とを比較し、n×mのブロックを代表さ
せるのに最も適した画素値が1つか判定し(S15)、
1つでない場合、フラグを参照し(S17)、ブロック
を代表させる画素値を決定して(S18)、フラグを反
転させ(S19)、次の未処理ブロックについて処理を
繰り返す。
(57) [Summary] [Object] To provide an image processing method and apparatus capable of processing an image with high quality while suppressing image deterioration. [Constitution] When the optimum value for drawing a block to be reduced is not one, a flag for determining which one is selected is initialized (S11), and a horizontal 1 /
An n × m block corresponding to the reduction of n and 1 / m in the vertical direction is set (S12), and the average of each pixel value forming the set block is obtained (S14). Next, the average value is compared with the drawable pixel value, and it is judged whether or not there is one pixel value most suitable for representing an n × m block (S15).
If the number is not one, the flag is referred to (S17), the pixel value representing the block is determined (S18), the flag is inverted (S19), and the process is repeated for the next unprocessed block.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例えば情報処理装置で
作成又は画像読み取り装置等で得られた画像データを処
理する画像処理方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and apparatus for processing image data created by an information processing apparatus or obtained by an image reading apparatus or the like.

【0002】[0002]

【従来の技術】従来、画像の縮小は、ある一定の規則に
基づいて間引くか、或いは隣り合った画素同士の論理演
算によって行なわれている。また、画像の圧縮は、画像
全体を同じ圧縮率で圧縮するか、画像の色空間周波数等
の物理的性質に基づいて部分的に圧縮率を変更してい
る。
2. Description of the Related Art Conventionally, image reduction is performed by thinning out images based on a certain rule or by performing a logical operation between adjacent pixels. As for image compression, the entire image is compressed at the same compression rate, or the compression rate is partially changed based on physical properties such as color space frequency of the image.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来例では、画像の横を1/n、縦を1/mに縮小すると
いう作業は、結局このn×mのブロックを、どういう値
で代表させるか、ということである。一定規則で間引く
方式には、周囲の画素の値に関わらず縮小画像のための
画素が選ばれ、たまたま選ばれた画素が周囲と全く異な
ってしまう場合がある。また、論理演算を利用する場合
においても、その演算内容によりブロックを構成する画
素を最も良く代表したものが選ばれるとは限らない。例
えば、2値データを縮小する場合、ブロック内の1つだ
け周囲と異なった画素のために代表値がその多数を占め
る画素値にならないこともあり得る。
However, in the above-described conventional example, the work of reducing the width of the image to 1 / n and the height to 1 / m is ultimately represented by what value of this n × m block. That is. In the method of thinning out by a certain rule, a pixel for a reduced image is selected regardless of the values of surrounding pixels, and the selected pixel may happen to be completely different from the surroundings. Further, even in the case of utilizing a logical operation, the one that most representatively represents the pixels forming the block is not always selected depending on the content of the operation. For example, when the binary data is reduced, it is possible that only one pixel in the block is different from the surrounding pixels and the representative value does not become the pixel value occupying the majority.

【0004】また、画像の圧縮の場合、人間にとって1
枚の画像全体が同じ重要度を持っているわけではなく、
例えばポートレートにおいては、写っている人物とその
背景とでは明らかに重要度が違っている。しかし、画像
全体を同じ圧縮率で圧縮するならば、人間によって重要
な情報も、そうでない情報も同じ重要度で圧縮されてし
まうという問題があった。また、画像の物理的性質に従
って部分的に圧縮率を変更する場合も、輝度情報等の物
理的に重要な情報が、必ずしもその画像を見る人間にと
って重要とは限らず、予め画像全体に渡って分析を行な
う必要があり、膨大な計算量を必要とするという問題も
あった。
Further, in the case of image compression, it is 1 for humans.
Not all images are of equal importance,
For example, in a portrait, the importance of the person in the picture and that of the background are obviously different. However, if the entire image is compressed at the same compression rate, there is a problem in that both important information and unimportant information are compressed by humans with the same degree of importance. Further, even when the compression ratio is partially changed according to the physical properties of the image, the physically important information such as the brightness information is not always important to the person who views the image, and the entire image is previously There is also a problem that it is necessary to perform analysis and requires a huge amount of calculation.

【0005】本発明は、上記課題を解決するために成さ
れたもので、画像の劣化を抑え、高品質に画像を処理で
きる画像処理方法及び装置を提供することを目的とす
る。
The present invention was made to solve the above problems, and an object of the present invention is to provide an image processing method and apparatus capable of suppressing deterioration of an image and processing the image with high quality.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、本発明の画像処理装置は以下の構成を備える。即
ち、情報処理装置で作成又は画像読み取り装置等で得ら
れた画像データを処理する画像処理装置において、画像
データに対してn×mのブロックを設定する設定手段
と、前記設定手段で設定されたブロック内の画素値の平
均値を算出する平均値算出手段と、前記平均値算出手段
で得られた平均値より描画する画素値を決定する決定手
段とを備え、決定した画素値が1つでない場合、各画素
値を交互にブロックの代表値として採用し、得られた画
像データを横1/n、縦1/mに縮小することを特徴と
する。
In order to achieve the above object, the image processing apparatus of the present invention has the following configuration. That is, in an image processing apparatus that processes image data created by an information processing apparatus or obtained by an image reading apparatus or the like, setting means for setting n × m blocks for the image data, and the setting means An average value calculating means for calculating an average value of pixel values in the block and a determining means for determining a pixel value to be drawn from the average value obtained by the average value calculating means are provided, and the determined pixel value is not one. In this case, each pixel value is alternately adopted as a representative value of the block, and the obtained image data is reduced to 1 / n in the horizontal direction and 1 / m in the vertical direction.

【0007】[0007]

【作用】かかる構成において、画像データに対してn×
mのブロックを設定し、設定されたブロック内の画素値
の平均値を求め、得られた平均値とブロック内の画素値
より描画する画素値を決定し、決定した画素値が1つで
ない場合、各画素値を交互にブロックの代表値として採
用し、得られた画像データを横1/n、縦1/mに縮小
することにより、画像の劣化を抑え、高品質に画像を処
理できる。
In such a structure, n × for image data
When the block of m is set, the average value of the pixel values in the set block is calculated, the pixel value to be drawn is determined from the obtained average value and the pixel value in the block, and the determined pixel value is not one , Each pixel value is alternately adopted as a representative value of the block, and the obtained image data is reduced to 1 / n in the horizontal direction and 1 / m in the vertical direction, thereby suppressing deterioration of the image and processing the image with high quality.

【0008】[0008]

【実施例】以下、図面を参照しながら本発明に係る好適
な実施例を詳細に説明する。図1は、本実施例における
情報処理システムの構成を示すブロック図である。図示
するように、本システムは、CPU,ROM,RAM等
で構成され、全体の制御を司る中央処理装置1と、ハー
ドディスク装置等の外部記憶装置(メモリ)2と、CR
T等の表示装置3と、キーボード4と、マウス等のポイ
ンティング・デバイス5とから、その主要部が構成され
ている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the information processing system in this embodiment. As shown in the figure, this system is composed of a CPU, a ROM, a RAM, etc., and controls a central processing unit 1, an external storage device (memory) 2 such as a hard disk device, and a CR.
A display device 3 such as T, a keyboard 4, and a pointing device 5 such as a mouse constitute a main part thereof.

【0009】<第1の実施例>図2及び図3は、第1の
実施例における画像縮小の概念を示す模式図である。図
2は、2値画像を縦横共に1/3に縮小する場合に適用
したものであり、まず画像データに対して3×3のブロ
ックを設定し、そのブロックを構成する画素の平均値を
求め、その値から実際に描画可能な画素値をブロックの
代表値(この例では“1”)とする。また、図3は2値
画像を縦横共に1/4に縮小する際に、ブロック内に白
と黒の画素が同数存在する場合に適用したものであり、
この場合、得られた平均値に最も近い描画可能な画素値
は“1”と“0”の2つになる。そこで、第1の実施例
では、前回の描画において、得られた平均値よりも大き
な値を採用したか否かに基づいて、前回とは逆の値を実
際に描画する画素値としてブロックの代表値とするもの
である。
<First Embodiment> FIGS. 2 and 3 are schematic views showing the concept of image reduction in the first embodiment. FIG. 2 is applied to a case where a binary image is reduced to 1/3 in both length and width. First, a 3 × 3 block is set for image data, and an average value of pixels forming the block is calculated. Then, the pixel value that can be actually drawn from that value is used as the representative value (“1” in this example) of the block. Further, FIG. 3 is applied to the case where the same number of white and black pixels are present in the block when the binary image is reduced to 1/4 in the vertical and horizontal directions.
In this case, there are two drawable pixel values that are closest to the obtained average value, "1" and "0". Therefore, in the first embodiment, based on whether or not a value larger than the obtained average value is used in the previous drawing, a value opposite to the previous value is actually used as the pixel value of the block to represent the block. It is a value.

【0010】次に、上述した画像縮小について中央処理
装置1が実行する処理手順を図4に示すフローチャート
に従って以下に説明する。まず、縮小するブロックを描
画する最適値が1つでなかった場合に、どちらを選ぶか
判断するためのフラグを初期化する(ステップS1
1)。次に、メモリ2に格納された画像データに対し、
横1/n、縦1/mの縮小に対応するn×mのブロック
を設定する(ステップS12)。そして、ステップS1
2で設定されたブロックにおいて、まだ縮小処理がなさ
れていないブロックが有るか否かを判断する(ステップ
S13)。その結果、No、即ち、未処理ブロックがな
ければ、処理を終了する。しかし、Yes、即ち、未処
理ブロックがあれば、ブロックを構成する各々の画素値
の平均を求める(ステップS14)。次に、ステップS
14で求めた平均値と描画可能な画素値とを比較し、n
×mのブロックを代表させるのに最も適した画素値が1
つであるか否かを判定する(ステップS15)、その結
果、Yes、即ち、1つであれば、その画素値をブロッ
クの代表値として決定し(ステップS16)、次の未処
理ブロックについて、上述のステップS13からの処理
を繰り返す。
Next, the processing procedure executed by the central processing unit 1 for the above-described image reduction will be described below with reference to the flowchart shown in FIG. First, when the optimum value for drawing the block to be reduced is not one, a flag for determining which to select is initialized (step S1).
1). Next, for the image data stored in the memory 2,
An n × m block corresponding to a reduction of 1 / n in the horizontal direction and 1 / m in the vertical direction is set (step S12). And step S1
It is determined whether or not there is a block that has not been subjected to the reduction process in the block set in 2 (step S13). As a result, No, that is, if there is no unprocessed block, the process ends. However, if Yes, that is, if there is an unprocessed block, the average of the pixel values of each block is calculated (step S14). Next, step S
The average value obtained in 14 is compared with the drawable pixel value, and n
The most suitable pixel value to represent a block of × m is 1
If the result is Yes, that is, if it is one, the pixel value is determined as the representative value of the block (step S16), and the next unprocessed block is The process from step S13 described above is repeated.

【0011】一方、ステップS15での判定結果がN
o、即ち、縮小するブロックを描画する最適値が1つで
ない場合には、どちらを選ぶか判断するためのフラグを
参照し(ステップS17)、その結果に基づいて、ブロ
ックを代表させる画素値を決定する(ステップS1
8)。そして、フラグを反転させ(ステップS19)、
次の未処理ブロックについて、上述のステップS13か
らの処理を繰り返す。
On the other hand, the determination result in step S15 is N
o, that is, when the optimum value for drawing the block to be reduced is not one, the flag for determining which is selected is referred to (step S17), and the pixel value representing the block is determined based on the result. Determine (step S1
8). Then, the flag is inverted (step S19),
For the next unprocessed block, the processing from step S13 described above is repeated.

【0012】このように、第1の実施例によれば、縮小
するブロックを最も良く表わす画素値で代表させて縮小
画像を形成することで、縮小による劣化を抑えることが
できる。また、2値画像において、縮小対象ブロックに
白黒同数の画素が存在する場合、全てのブロックが白又
は黒と決まってしまわず、原画像に忠実な縮小が行なえ
る。
As described above, according to the first embodiment, it is possible to suppress deterioration due to the reduction by forming the reduced image by representing the block to be reduced by the pixel value that best represents the block. Further, in the binary image, when the reduction target block has the same number of black and white pixels, all the blocks are not determined to be white or black, and the original image can be reduced faithfully.

【0013】<第2の実施例>次に、図面を参照しなが
ら本発明に係る第2の実施例を詳細に説明する。尚、第
2の実施例である画像圧縮方法が適用される情報処理シ
ステムの構成は、前述した第1の実施例と同様であり、
その説明は省略する。図5は、画像中の注目点(圧縮率
を低く設定したい重要な部分)とその圧縮率を設定する
画面を示す図であり、図6は注目点から離れる毎に圧縮
率を高くしていくアルゴリズムを選択する画面を示す図
である。そして、図7は圧縮する単位ブロックの大きさ
を設定する画面を示す図であり、図8は設定されたブロ
ックを圧縮する圧縮方法を選択する画面を示す図であ
る。
<Second Embodiment> Next, a second embodiment of the present invention will be described in detail with reference to the drawings. The configuration of the information processing system to which the image compression method of the second embodiment is applied is the same as that of the first embodiment described above,
The description is omitted. FIG. 5 is a diagram showing a point of interest in the image (an important portion for which the compression rate is to be set low) and a screen for setting the compression rate, and FIG. 6 increases the compression rate as the distance from the point of interest increases. It is a figure which shows the screen which selects an algorithm. 7 is a diagram showing a screen for setting the size of a unit block to be compressed, and FIG. 8 is a diagram showing a screen for selecting a compression method for compressing the set block.

【0014】また、図9は図5乃至図8に示す画面によ
って設定されたデータと圧縮されたデータを格納するフ
ァイルを示す図である。図9において、91は画像の大
きさ(縦×横)を、92は設定された単位ブロックの大
きさから求められるブロックの総数を、93は設定され
た単位ブロックの大きさ(縦×横)を、94は注目点毎
に設定された圧縮率の内、選択された最も低い圧縮率
(基本圧縮率)を、95は選択されたアルゴリズムに従
って求めた基本圧縮率に対する各ブロックの相対圧縮率
を、そして、96は選択された圧縮方法により各相対圧
縮率で各ブロックを圧縮した画像データを、それぞれ格
納する。
FIG. 9 is a diagram showing a file for storing the data set by the screens shown in FIGS. 5 to 8 and the compressed data. In FIG. 9, 91 is the size of the image (vertical × horizontal), 92 is the total number of blocks obtained from the set unit block size, and 93 is the set unit block size (vertical × horizontal). 94 is the lowest selected compression ratio (basic compression ratio) of the compression ratios set for each target point, and 95 is the relative compression ratio of each block with respect to the basic compression ratio obtained according to the selected algorithm. , 96 stores the image data obtained by compressing each block at each relative compression rate by the selected compression method.

【0015】次に、上述した画像圧縮について中央処理
装置1が実行する処理手順を図10に示すフローチャー
トに従って以下に説明する。まず、メモリ2に取り込ま
れ、図5に示す如く、表示装置3に表示された画像中の
注目点をポインティング・デバイス5を用いて設定し
(ステップS21)、設定された注目点毎に、注目点の
圧縮率を設定する(ステップS22)。次に、全ての注
目点の設定が終ったかどうかを判定し(ステップS2
3)、判定結果がYesであれば、ステップS22で設
定された各注目点の圧縮率の内、最も低いものを選び出
し、基本圧縮率とする(ステップS24)。そして、注
目点より離れる毎に、圧縮率を高くしていくアルゴリズ
ムを設定する(ステップS25)。ステップS25で設
定されるアルゴリズムは、離れるに従ってリニアに圧縮
率を変化させる方法や、ガウシアン分布に従って圧縮率
を変化させるもの等が考えられる。
Next, the processing procedure executed by the central processing unit 1 for the above-mentioned image compression will be described below with reference to the flowchart shown in FIG. First, as shown in FIG. 5, the attention points in the image captured in the memory 2 and displayed on the display device 3 are set using the pointing device 5 (step S21), and the attention points are set for each of the set attention points. The point compression rate is set (step S22). Next, it is determined whether or not all the attention points have been set (step S2
3) If the determination result is Yes, the lowest compression rate is selected from the compression rates of the points of interest set in step S22 and set as the basic compression rate (step S24). Then, an algorithm for increasing the compression rate each time the point is separated from the target point is set (step S25). The algorithm set in step S25 may be a method of linearly changing the compression rate with increasing distance, or a method of changing the compression rate according to a Gaussian distribution.

【0016】次に、図7及び図8に示す如く、メモリ2
に格納されている画像データに対し、圧縮を行なう単位
であるnxmのブロックを設定し(ステップS26)、
更にその単位ブロックを圧縮する圧縮方法を設定する
(ステップS27)。ステップS27で設定される圧縮
方法は、単純間引きや2値画像の場合には論理和を取る
方法や論理積を取る方法等が考えられる。
Next, as shown in FIGS. 7 and 8, the memory 2
An nxm block, which is a unit for compression, is set for the image data stored in (step S26),
Further, a compression method for compressing the unit block is set (step S27). The compression method set in step S27 may be a method of taking a logical sum or a method of taking a logical product in the case of simple thinning or a binary image.

【0017】以上の準備が終了した後、メモリ2に格納
された画像に対して処理を行なう。まずステップS26
で設定された各ブロックに対し、ステップS22で設定
された注目点の圧縮率と、ステップS25で設定された
注目点より離れる毎に圧縮率を高くしていくアルゴリズ
ムに従って今回処理するブロックの圧縮率を決定する
(ステップS28)。また、ステップS28で決定され
た圧縮率と、ステップS24で選ばれた基本圧縮率との
比を計算して相対圧縮率を求め、ステップS27で設定
されたブロックを圧縮する圧縮方法で、今回処理対象と
なったブロックを圧縮する(ステップS29)。続い
て、未処理ブロックが残っているかを判定し(ステップ
S30)、判定結果がYesであればステップS28へ
処理を戻し、Noであれば処理を終了する。
After the above preparation is completed, the image stored in the memory 2 is processed. First, step S26
For each block set in step S22, the compression rate of the point of interest set in step S22 and the compression rate of the block to be processed this time according to an algorithm that increases the compression rate each time the block is separated from the point of interest set in step S25 Is determined (step S28). In addition, the ratio between the compression rate determined in step S28 and the basic compression rate selected in step S24 is calculated to obtain the relative compression rate, and the block is set in step S27. The target block is compressed (step S29). Subsequently, it is determined whether or not there are unprocessed blocks remaining (step S30). If the determination result is Yes, the process returns to step S28, and if No, the process ends.

【0018】このように、第2の実施例によれば、人間
にとって重要な部分を低い圧縮率に設定できるので情報
がより多く残され、見た目が自然である。また、あまり
重要でない部分には高い圧縮をかけることができるの
で、注目点の画質が同等ならば、画像全体のデータ量は
少なくなる。更に、各部の圧縮率を変化させる際、画像
全体を走査して物理特性を求めるなど、繁雑な計算をす
る必要がない。
As described above, according to the second embodiment, a portion important to humans can be set to a low compression rate, so that more information is left and the appearance is natural. Moreover, since high compression can be applied to a less important portion, if the image quality at the point of interest is the same, the data amount of the entire image becomes small. Furthermore, when changing the compression ratio of each part, it is not necessary to perform complicated calculation such as scanning the entire image to obtain physical characteristics.

【0019】<第3の実施例>次に、図面を参照しなが
ら本発明に係る第3の実施例を詳細に説明する。従来、
情報処理装置で作成、又は画像読み取り装置等で得られ
た画像データを処理する画像処理における消しゴム機能
は、指定された領域を白色等の、単一色で塗りつぶすこ
とによって実現されている。
<Third Embodiment> Next, a third embodiment of the present invention will be described in detail with reference to the drawings. Conventionally,
The eraser function in image processing for processing image data created by an information processing apparatus or obtained by an image reading apparatus or the like is realized by painting a designated area with a single color such as white.

【0020】そのため、背景が無地の場合には問題が生
じないが、背景の模様が格子状など、ある一定のパター
ンを持っている領域に対して消しゴム機能を適用した場
合、指定された領域が背景の模様とは関係なく単一色で
塗りつぶされてしまい、本来の「消しゴム」という言葉
から、ユーザーが期待する動作とは異なってしまうとい
う問題があった。
Therefore, although the problem does not occur when the background is plain, when the eraser function is applied to a region having a certain pattern such as a lattice pattern of the background, the specified region is There was a problem that it was painted with a single color regardless of the background pattern, and the original word "eraser" was different from the operation expected by the user.

【0021】第3の実施例は、上記課題を解決するため
に成されたもので、背景がある一定のパターンの模様を
描いているような領域に対して消しゴム機能を適用して
も、周囲との模様とマッチングが取れた画像が得られる
画像処理方法及び装置を提供することを目的とする。
尚、第3の実施例である消しゴム機能が適用される情報
処理システムの構成は、前述した第1の実施例と同様で
あり、その説明は省略する。
The third embodiment was made in order to solve the above problems. Even if the eraser function is applied to an area where the background has a certain pattern, the surrounding area is not affected. It is an object of the present invention to provide an image processing method and apparatus capable of obtaining an image that matches a pattern with.
The configuration of the information processing system to which the eraser function of the third embodiment is applied is the same as that of the first embodiment described above, and the description thereof will be omitted.

【0022】図11は、表示装置3に表示された背景が
一定のパターンを持つ画像に対して、ポインティング・
デバイス5を用いて消しゴム機能を適用する領域を指定
した状態を示す図である。図12は、消しゴム機能を適
用する領域を塗りつぶす模様(パターン)が存在する領
域を指定する画面を示す図である。図13は、元の画像
データに、抽出された基本パターンの幅と高さを持つブ
ロック単位で矩形領域を設定する画面を示す図である。
そして、図14は消しゴム機能が適用される領域を塗り
つぶすパターンを示す図である。
FIG. 11 shows that when the background image displayed on the display device 3 has a certain pattern, the pointing
It is a figure which shows the state which designated the area | region to which an eraser function is applied using the device 5. FIG. 12 is a diagram showing a screen for designating an area in which a pattern (pattern) for filling the area to which the eraser function is applied exists. FIG. 13 is a diagram showing a screen for setting a rectangular area in the original image data in block units having the width and height of the extracted basic pattern.
Then, FIG. 14 is a diagram showing a pattern for filling the area to which the eraser function is applied.

【0023】次に、上述した消しゴム機能を実現する中
央処理装置1の処理手順を図15に示すフローチャート
に従って以下に説明する。図11に示すように、消しゴ
ム機能を適用する領域11が指定され(ステップS3
1)、図12に示すように、指定された領域を塗りつぶ
す模様(パターン)が存在する領域12が指定されると
(ステップS32)、ステップS32で指定された領域
12から、ステップS31で指定された領域11を塗り
つぶす画像を構成する矩形の基本パターンを抽出する
(ステップS33)。ここで、図13に示す13は抽出
された基本パターンであり、この基本パターン13の頂
点の1つを原点と定め、この原点を基に元の画像データ
を走査(マッチング)することにより、基本パターン1
3の幅と高さを持つブロックを単位とする領域を設定す
る(ステップS34)。即ち、各ブロックには、背景を
構成する基本パターン13がそれぞれ1つづつ含まれる
ことになる。
Next, the processing procedure of the central processing unit 1 for realizing the above-mentioned eraser function will be described below with reference to the flowchart shown in FIG. As shown in FIG. 11, the area 11 to which the eraser function is applied is designated (step S3).
1) As shown in FIG. 12, when the area 12 in which the pattern (pattern) for filling the specified area exists is specified (step S32), the area 12 specified in step S32 is specified in step S31. A rectangular basic pattern forming an image that fills the area 11 is extracted (step S33). Here, 13 shown in FIG. 13 is an extracted basic pattern, and one of the vertices of this basic pattern 13 is defined as an origin, and the original image data is scanned (matched) based on this origin, thereby Pattern 1
An area is set in units of blocks having a width and a height of 3 (step S34). That is, each block includes one basic pattern 13 forming the background.

【0024】次に、ステップS34で設定された各ブロ
ックのうち、ステップS31で指定された、消しゴム機
能を適用する領域11が含まれる複数のブロックを検出
する(ステップS35)。そして、ステップS35で検
出された消しゴム機能が適用される領域11を含む各ブ
ロックを、ステップS33で抽出された基本パターン1
3でそれぞれ描画した画像をメモリ2上に作成し、これ
と消しゴム機能を適用する領域11との論理積をとるこ
とにより、図14に示す如く、消しゴム機能が適用され
る領域11を塗りつぶす画像をメモリ2上に得る(ステ
ップS36)。この画像は、ステップS31で指定され
た領域11の周囲とマッチングがとれた画像となる。最
後に、ステップS36で得られた画像で、ステップS3
1で指定された消しゴム機能を適用する領域11に描画
する(ステップS37)。
Next, among the blocks set in step S34, a plurality of blocks specified in step S31 and including the area 11 to which the eraser function is applied are detected (step S35). Then, each block including the area 11 to which the eraser function detected in step S35 is applied is set to the basic pattern 1 extracted in step S33.
The images respectively drawn in 3 are created in the memory 2, and the logical product of this and the area 11 to which the eraser function is applied is used to obtain an image that fills the area 11 to which the eraser function is applied, as shown in FIG. It is obtained on the memory 2 (step S36). This image is an image matched with the periphery of the area 11 designated in step S31. Finally, in the image obtained in step S36, step S3
Drawing is performed in the area 11 to which the eraser function designated by 1 is applied (step S37).

【0025】このように、第3の実施例によれば、図1
6に示すように、背景がある一定のパターンの模様を描
いているような領域に対して、消しゴム機能を適用して
も、指定領域が単に白く塗りつぶされることなく、周囲
の模様とマッチングが取れた画像が得られる。尚、本発
明は、複数の機器から構成されるシステムに適用して
も、1つの機器から成る装置に適用しても良い。
Thus, according to the third embodiment, as shown in FIG.
As shown in 6, even if the eraser function is applied to an area where the background has a pattern of a certain pattern, the designated area is not simply painted in white, but can match the surrounding pattern. Image is obtained. The present invention may be applied to a system including a plurality of devices or an apparatus including a single device.

【0026】また、本発明はシステム或いは装置にプロ
グラムを供給することによって達成される場合にも適用
できることは言うまでもない。
It goes without saying that the present invention can also be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0027】[0027]

【発明の効果】以上説明したように本発明によれば、画
像の劣化を抑え、高品質に画像を処理することが可能と
なる。
As described above, according to the present invention, it is possible to suppress deterioration of an image and process the image with high quality.

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

【図1】実施例における情報処理システムの構成を示す
ブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an information processing system according to an embodiment.

【図2】第1の実施例で2値画像を縦横1/3に縮小す
る場合を示す図である。
FIG. 2 is a diagram showing a case where a binary image is reduced to 1/3 in height and width in the first embodiment.

【図3】第1の実施例で2値画像の縦横1/4に縮小す
る際に、ブロック内に白と黒の画素が同数存在する場合
を示す図である。
FIG. 3 is a diagram showing a case where the same number of white and black pixels are present in a block when the binary image is reduced to 1/4 in width and height in the first embodiment.

【図4】第1の実施例における縮小処理を示すフローチ
ャートである。
FIG. 4 is a flowchart showing reduction processing in the first embodiment.

【図5】第2の実施例で注目点と圧縮率を指定する画面
を示す図である。
FIG. 5 is a diagram showing a screen for designating an attention point and a compression rate in the second embodiment.

【図6】第2の実施例で圧縮率決定のアルゴリズムを選
択する画面を示す図である。
FIG. 6 is a diagram showing a screen for selecting an algorithm for determining a compression ratio in the second embodiment.

【図7】第2の実施例で単位ブロックの大きさを設定す
る画面を示す図である。
FIG. 7 is a diagram showing a screen for setting the size of a unit block in the second embodiment.

【図8】第2の実施例で圧縮方法を選択する画面を示す
図である。
FIG. 8 is a diagram showing a screen for selecting a compression method in the second embodiment.

【図9】第2の実施例で設定された圧縮率やアルゴリズ
ム、及びブロックの大きさ等を格納する画像ファイルを
示す図である。
FIG. 9 is a diagram showing an image file that stores a compression ratio, an algorithm, a block size, etc. set in the second embodiment.

【図10】第2の実施例における圧縮処理を示すフロー
チャートである。
FIG. 10 is a flowchart showing a compression process in the second embodiment.

【図11】第3の実施例で消しゴム機能を適用する領域
を指定する状態を示す図である。
FIG. 11 is a diagram showing a state in which an area to which an eraser function is applied is designated in the third embodiment.

【図12】第3の実施例で指定領域を塗りつぶす模様を
指定する状態を示す図である。
FIG. 12 is a diagram showing a state in which a pattern for painting a designated area is designated in the third embodiment.

【図13】第3の実施例で抽出された基本パターンとブ
ロックの設定を示す図である。
FIG. 13 is a diagram showing setting of basic patterns and blocks extracted in the third embodiment.

【図14】第3の実施例で消しゴム機能を適用する領域
を塗りつぶすパターンである。
FIG. 14 is a pattern for filling the area to which the eraser function is applied in the third embodiment.

【図15】第3の実施例における処理手順を示すフロー
チャートである。
FIG. 15 is a flowchart showing a processing procedure in a third embodiment.

【図16】第3の実施例で消しゴム機能を適用した結果
を示す図である。
FIG. 16 is a diagram showing a result of applying an eraser function in the third embodiment.

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

1 中央処理装置 2 メモリ 3 表示装置 4 キーボード 5 ポインティング・デバイス 1 central processing unit 2 memory 3 display device 4 keyboard 5 pointing device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 情報処理装置で作成又は画像読み取り装
置等で得られた画像データを処理する画像処理方法にお
いて、 画像データに対してn×mのブロックを設定し、 設定されたブロック内の画素値の平均値を求め、 得られた平均値に基づいて描画する画素値を決定し、 決定した画素値が1つでない場合、各画素値を交互にブ
ロックの代表値として採用し、得られた画像データを横
1/n、縦1/mに縮小することを特徴とする画像処理
方法。
1. An image processing method for processing image data created by an information processing device or obtained by an image reading device or the like, wherein n × m blocks are set for the image data, and pixels in the set blocks are set. Obtain the average value of the values, determine the pixel value to draw based on the obtained average value, and if the determined pixel value is not one, adopt each pixel value alternately as the representative value of the block and obtain An image processing method characterized in that image data is reduced to 1 / n in width and 1 / m in length.
【請求項2】 情報処理装置で作成又は画像読み取り装
置等で得られた画像データを処理する画像処理方法にお
いて、 画像中に所望の圧縮率を設定するための注目点を少なく
とも1つ指定し、 指定された注目点の圧縮率に相対する相対圧縮率を決定
し、 決定された相対圧縮率で圧縮を行なう圧縮方法を選択
し、 前記決定された相対圧縮率に基づいて、n×mのブロッ
ク単位にブロック圧縮率を決定し、各ブロックの圧縮を
行なうことを特徴とする画像処理方法。
2. An image processing method for processing image data created by an information processing apparatus or obtained by an image reading apparatus or the like, wherein at least one point of interest for setting a desired compression rate in an image is designated, A relative compression ratio relative to the compression ratio of the designated point of interest is determined, a compression method for performing compression at the determined relative compression ratio is selected, and n × m blocks are selected based on the determined relative compression ratio. An image processing method characterized in that a block compression rate is determined for each unit and each block is compressed.
【請求項3】 情報処理装置で作成又は画像読み取り装
置等で得られた画像データを処理する画像処理方法にお
いて、 指定された領域を所定のパターンで塗りつぶすことで実
現される消しゴム機能を適用する領域を指定し、 指定された領域より基本パターンを抽出し、 抽出された基本パターンの幅と高さを有するブロックを
単位として矩形領域を設定し、 設定されたブロックのうち、消しゴム機能が含まれるブ
ロックを検出し、 検出された各ブロックと消しゴム機能が適用される領域
とから塗りつぶし画像データを作成し、 作成された画像データで、指定された領域を塗りつぶす
ことを特徴とする画像処理方法。
3. An image processing method for processing image data created by an information processing apparatus or obtained by an image reading apparatus or the like, and an area to which an eraser function realized by filling a specified area with a predetermined pattern is applied. Is specified, a basic pattern is extracted from the specified area, a rectangular area is set with the block having the width and height of the extracted basic pattern as a unit, and the block that includes the eraser function among the set blocks The image processing method is characterized by detecting, and creating filled image data from each detected block and the area to which the eraser function is applied, and filling the specified area with the created image data.
【請求項4】 情報処理装置で作成又は画像読み取り装
置等で得られた画像データを処理する画像処理装置にお
いて、 画像データに対してn×mのブロックを設定する設定手
段と、 前記設定手段で設定されたブロック内の画素値の平均値
を算出する平均値算出手段と、 前記平均値算出手段で得られた平均値より描画する画素
値を決定する決定手段とを備え、 決定した画素値が1つでない場合、各画素値を交互にブ
ロックの代表値として採用し、得られた画像データを横
1/n、縦1/mに縮小することを特徴とする画像処理
方法。
4. An image processing apparatus for processing image data created by an information processing apparatus or obtained by an image reading apparatus or the like, comprising: setting means for setting n × m blocks for image data; and the setting means. An average value calculating means for calculating an average value of the pixel values in the set block and a determining means for determining a pixel value to be drawn from the average value obtained by the average value calculating means are provided, and the determined pixel value is If the number is not one, each pixel value is alternately adopted as the representative value of the block, and the obtained image data is reduced to 1 / n in the horizontal direction and 1 / m in the vertical direction.
JP5122499A 1993-05-25 1993-05-25 Image processing method and device Withdrawn JPH06333034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5122499A JPH06333034A (en) 1993-05-25 1993-05-25 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5122499A JPH06333034A (en) 1993-05-25 1993-05-25 Image processing method and device

Publications (1)

Publication Number Publication Date
JPH06333034A true JPH06333034A (en) 1994-12-02

Family

ID=14837361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5122499A Withdrawn JPH06333034A (en) 1993-05-25 1993-05-25 Image processing method and device

Country Status (1)

Country Link
JP (1) JPH06333034A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009122279A (en) * 2007-11-13 2009-06-04 Ntt Docomo Inc Portable information processing apparatus and display control method for portable information processing apparatus
WO2011065067A1 (en) * 2009-11-30 2011-06-03 富士通テン株式会社 Image processing apparatus and image processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009122279A (en) * 2007-11-13 2009-06-04 Ntt Docomo Inc Portable information processing apparatus and display control method for portable information processing apparatus
WO2011065067A1 (en) * 2009-11-30 2011-06-03 富士通テン株式会社 Image processing apparatus and image processing method

Similar Documents

Publication Publication Date Title
US6075926A (en) Computerized method for improving data resolution
JP3870109B2 (en) Image display apparatus, image display method, and image display program
JPH10178541A (en) Image processing method, document display method, and computer execution operation selection method
US6424342B1 (en) Decompressing and compositing graphical image data
US7327904B2 (en) Pattern classification and filter design for increasing image resolution
JP2991336B2 (en) Character display device and method for video processing device
JP2008046608A (en) Video window detector
JP2014044595A (en) Line drawing coloring system
JP2702408B2 (en) Image conversion system
JPH06333034A (en) Image processing method and device
CA2297168A1 (en) Method and apparatus for image processing, and medium
JP2891862B2 (en) Image compression apparatus and image compression method
JP2002118737A (en) Image converter and image conversion method
JP3507685B2 (en) Image communication display system and its program storage medium
JP4116325B2 (en) Image display control device
JP3509397B2 (en) Markov model image coding device
JPH10208038A (en) Image processing method and image processing apparatus
US7187474B1 (en) System and method for halftoning using a time-variable halftone pattern
JP2010009305A (en) Image-processing device, image-processing method, and program
KR100617797B1 (en) Device and method for displaying data using overlay technique in terminal equipment
JPH06180568A (en) Image smoothing display system
JPH04337877A (en) Picture display device
US20060227353A1 (en) Printing apparatus and program thereof
JPH0962238A (en) Text color setting device
CN119071531A (en) Image processing method, device and electronic equipment

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000801