JPH0955855A - Picture processor - Google Patents

Picture processor

Info

Publication number
JPH0955855A
JPH0955855A JP7204461A JP20446195A JPH0955855A JP H0955855 A JPH0955855 A JP H0955855A JP 7204461 A JP7204461 A JP 7204461A JP 20446195 A JP20446195 A JP 20446195A JP H0955855 A JPH0955855 A JP H0955855A
Authority
JP
Japan
Prior art keywords
value
pixel
image
aperture
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7204461A
Other languages
Japanese (ja)
Inventor
Takashi Nagao
隆 長尾
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP7204461A priority Critical patent/JPH0955855A/en
Publication of JPH0955855A publication Critical patent/JPH0955855A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a picture processor where a pseudo half-tone pattern is sufficiently eliminated and blur of a picture is suppressed to satisfactorily restore the gradation at the time of estimating original gradation information from picture data where the gradation is limited. SOLUTION: Picture data is inputted from a picture input part 1 and is stored in a picture storage part 2. A picture element value integrating part 11 reads in a picture of a prescribed area including a given picture element from the picture storage part 2 and integrates picture element values of the given picture element and plural apertures set around it. A weighting value setting part 12 sets a weighting value corresponding to each of plural integrated values obtained by the picture element value integrating part 11. An average value calculation part 13 performs the weighted mean processing in accordance with integrated values obtained by the picture element value integrating part 11 and weighting values set by the weighting value setting part 12 to obtain the restoration value of the given picture element. The obtained restoration value is sent to a picture output part 3 in order and is outputted.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、デジタル化された
画像を処理する装置に係り、特に限定階調処理された画
像から元の階調情報を推定して画像を復元する画像処理
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for processing a digitized image, and more particularly to an image processing apparatus for estimating original gradation information from an image subjected to limited gradation processing and restoring the image. Is.

【0002】[0002]

【従来の技術】デジタル中間調画像を蓄積/伝送する際
に、記憶装置の容量や伝送時間を削減するため、256
値などの多階調で表現された画像を、例えば、ディザ法
や誤差拡散法などの擬似中間調処理で2値や4値などの
少ない階調数に変換する場合がある。しかし、このよう
な擬似中間調画像は、拡大や縮小処理を行なうとモアレ
と呼ばれる原画に無いパターンを生じることがある。ま
た、出力時に多値記録可能な出力装置を用いる場合、そ
の出力装置の性能を生かせないなどの問題もある。そこ
で、これらの問題を解決する手段の1つとして、擬似中
間調画像から元の階調情報を復元する方法が研究されて
いる。
In order to reduce the capacity of the storage device and the transmission time when storing / transmitting a digital halftone image, 256
An image expressed in multiple gradations such as values may be converted into a small number of gradations such as binary or quaternary by a pseudo halftone process such as a dither method or an error diffusion method. However, such a pseudo-halftone image may generate a pattern called moire, which is not included in the original image, when the image is enlarged or reduced. Further, when using an output device capable of multi-value recording at the time of output, there is a problem that the performance of the output device cannot be utilized. Therefore, as one of means for solving these problems, a method of restoring the original gradation information from the pseudo halftone image has been studied.

【0003】従来、限定階調処理された画像から原画像
を復元する方法としては、例えば、特公平5−1146
5号公報などに記載されているように、固定サイズの開
口を用いて画像を平滑化するのが最も一般的であった。
しかし、このような方法では、開口が大きいとエッジな
どの濃度変化のある部分までもが一様に平滑化されて、
画像がぼけてしまう。また、開口を小さくすると擬似中
間調パターンが残ったり、復元後の階調数が不十分とな
る。たとえば、2値画像を3×3の大きさの開口で処理
しても、たかだか10値にしか復元できない。
Conventionally, as a method for restoring an original image from an image subjected to limited gradation processing, for example, Japanese Patent Publication No. 5-1146.
As described in Japanese Patent Laid-Open No. 5 and the like, it is most common to use a fixed size aperture to smooth an image.
However, in such a method, if the opening is large, even a portion where density changes such as an edge is smoothed uniformly,
The image is blurred. Further, if the aperture is made small, a pseudo halftone pattern remains, or the number of gradations after restoration becomes insufficient. For example, even if a binary image is processed with an opening having a size of 3 × 3, it can be restored to only 10 values.

【0004】そこで、特公平6−24006号公報、特
公平4−31466号公報、特開平2−76370号公
報等に記載されているように、複数の開口を用意してさ
まざまな条件で開口を選択する方法や、電子情報通信学
会技術研究報告,IE93−13,「擬似中間調画像か
らの中間調画像推定」等に記載されているように、近傍
領域の平均値から回帰直線を求めて復元する方法などが
提案されている。
Therefore, as disclosed in Japanese Patent Publication No. 6-24006, Japanese Patent Publication No. 4-31466, Japanese Patent Publication No. 2-76370, etc., a plurality of apertures are prepared and the apertures are opened under various conditions. As described in the selection method, IEICE Technical Research Report, IE93-13, “Estimation of Halftone Image from Pseudo Halftone Image”, etc., a regression line is obtained from the average value of the neighborhood area and restored. The method of doing is proposed.

【0005】しかしながら、複数の開口を選択する方法
では、エッジや擬似中間調パターンの揺らぎなどで小さ
な開口が選択されて擬似中間調パターンが除去されなか
ったり、複数の開口の切り替わり部分で画質が急激に変
化することにより、画像が不自然になる場合がある。さ
らに、基本的には開口による平滑化であるため、復元後
の階調数が十分に取れないという問題もある。また、回
帰直線を用いる方式は、直線による推定であるため急激
な濃度変化に追従しにくく、また注目画素の周囲8また
は4方向の回帰直線から別々に復元値を求めて平均を取
るため、その平均化によりぼけを生じてしまう場合があ
った。
However, in the method of selecting a plurality of apertures, a small aperture is not selected and the pseudo-halftone pattern is not removed due to an edge or fluctuation of the pseudo-halftone pattern. The image may become unnatural by changing to. Further, since the smoothing is basically performed by the opening, there is a problem that the number of gradations after restoration cannot be sufficiently obtained. In addition, the method using a regression line is difficult to follow a rapid density change because it is an estimation by a straight line, and the restoration values are separately obtained from the regression lines in the 8 or 4 directions around the pixel of interest, and the average is taken. Blurring may occur due to averaging.

【0006】[0006]

【発明が解決しようとする課題】本発明は、上述した既
存方式の問題に鑑みてなされたもので、限定階調化され
た画像データから元の階調情報を推定する際に、擬似中
間調パターンを十分に除去することができ、かつ画像の
ぼけを抑えた良好な階調の復元が可能な画像処理装置を
提供することを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems of the existing method, and when estimating the original gradation information from the limited gradation-converted image data, the pseudo halftone is used. An object of the present invention is to provide an image processing device capable of sufficiently removing a pattern and capable of restoring good gradation while suppressing blurring of an image.

【0007】[0007]

【課題を解決するための手段】請求項1に記載の発明
は、画像処理装置において、注目画素およびその周囲に
複数の開口を設定して各開口ごとに画素値を積算する画
素値積算手段と、該画素値積算手段で求められた積算値
から各開口ごとの加重値を求める加重値設定手段と、前
記画素値積算手段で求められた積算値と前記加重値設定
手段で求められた加重値から加重平均値を求める平均値
計算手段を備え、与えられた画像中の各画素を前記注目
画素として前記画素値積算手段、前記加重値設定手段お
よび前記平均値計算手段により階調復元処理を行なうこ
とを特徴とするものである。
According to a first aspect of the present invention, in an image processing apparatus, a pixel value integrating means for setting a plurality of openings around a target pixel and a pixel value for each opening is provided. A weight value setting means for obtaining a weight value for each aperture from the integrated value obtained by the pixel value integrating means, an integrated value obtained by the pixel value integrating means, and a weight value obtained by the weight value setting means An average value calculating means for calculating a weighted average value is provided, and gradation restoration processing is performed by the pixel value integrating means, the weight value setting means, and the average value calculating means with each pixel in the given image as the target pixel. It is characterized by that.

【0008】請求項2に記載の発明は、請求項1に記載
の画像処理装置において、前記加重値設定手段は、前記
画素値積算手段で求められた積算値のうちの複数個の組
から、予め定められた関数またはテーブルにより開口の
加重値を求めることを特徴とするものである。
According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the weight value setting means selects from a plurality of sets of integrated values obtained by the pixel value integrating means, It is characterized in that the weight value of the aperture is obtained by a predetermined function or table.

【0009】請求項3に記載の発明は、請求項1に記載
の画像処理装置において、前記加重値設定手段は、前記
画素値積算手段で求められた積算値のうちの2個の差ま
たは差の絶対値から、予め定められた関数またはテーブ
ルにより開口の加重値を求めることを特徴とするもので
ある。
According to a third aspect of the present invention, in the image processing apparatus according to the first aspect, the weight value setting means is a difference or difference between two of the integrated values obtained by the pixel value integrating means. It is characterized in that the weighted value of the aperture is obtained from the absolute value of A by a predetermined function or table.

【0010】請求項4に記載の発明は、請求項2または
3に記載の画像処理装置において、前記加重値設定手段
の関数またはテーブルは、画像を前記開口で走査して求
めた積算値の分布に基づいて設定されることを特徴とす
るものである。
According to a fourth aspect of the present invention, in the image processing apparatus according to the second or third aspect, the function or table of the weight value setting means is a distribution of integrated values obtained by scanning an image with the aperture. It is characterized in that it is set based on.

【0011】請求項5に記載の発明は、請求項2ないし
4のいずれか1項に記載の画像処理装置において、前記
加重値設定手段の関数またはテーブル中の値は、前記画
素値積算手段で求められた積算値どうしの差または比に
対して相関関係を持つことを特徴とするものである。
According to a fifth aspect of the invention, in the image processing apparatus according to any one of the second to fourth aspects, the function of the weight value setting means or the value in the table is the pixel value integrating means. It is characterized by having a correlation with the difference or ratio between the obtained integrated values.

【0012】請求項6に記載の発明は、請求項1ないし
請求項5に記載の画像処理装置において、前記画素値積
算手段は、前記注目画素およびその近傍の画素の積算値
に応じて、前記開口のサイズ、形状、開口数を変更する
ことを特徴とするものである。
According to a sixth aspect of the present invention, in the image processing apparatus according to the first to fifth aspects, the pixel value accumulating means is responsive to the integrated value of the pixel of interest and pixels in the vicinity thereof. It is characterized in that the size, shape, and number of openings are changed.

【0013】請求項7に記載の発明は、請求項1ないし
請求項5のいずれか1項に記載の画像処理装置におい
て、前記画素値積算手段は、サイズ、形状、開口数が異
なる複数の開口群を設定し、前記平均値計算手段は、各
開口群ごとに加重平均値を求め、それらに基づいて復元
値を求めることを特徴とするものである。
According to a seventh aspect of the present invention, in the image processing apparatus according to any one of the first to fifth aspects, the pixel value accumulating means has a plurality of apertures having different sizes, shapes and numerical apertures. A group is set, and the average value calculating means obtains a weighted average value for each aperture group, and obtains a restoration value based on them.

【0014】請求項8に記載の発明は、請求項1ないし
請求項5のいずれか1項に記載の画像処理装置におい
て、前記注目画素の近傍の画像特徴量を検出する特徴量
検出手段を備え、前記画素値積算手段は、前記特徴量検
出手段により検出された特徴量に応じて、前記開口のサ
イズ、形状、開口数を変更することを特徴とするもので
ある。
According to an eighth aspect of the present invention, in the image processing apparatus according to any one of the first to fifth aspects, a feature amount detecting means for detecting an image feature amount near the target pixel is provided. The pixel value integrating means changes the size, shape, and numerical aperture of the opening according to the feature amount detected by the feature amount detecting means.

【0015】請求項9に記載の発明は、請求項1ないし
請求項5のいずれか1項に記載の画像処理装置におい
て、前記注目画素の近傍の画像特徴量を検出する特徴量
検出手段を備え、前記画素値積算手段は、サイズ、形
状、開口数が異なる複数の開口群を設定し、前記平均値
計算手段は、各開口群ごとに複数の加重平均値を求め、
前記特徴量検出手段により検出された前記画像特徴量に
基づき複数の前記加重平均値から復元値を求めることを
特徴とするものである。
According to a ninth aspect of the present invention, in the image processing apparatus according to any one of the first to fifth aspects, a feature amount detecting means for detecting an image feature amount near the target pixel is provided. The pixel value integrating means sets a plurality of aperture groups having different sizes, shapes, and numerical apertures, and the average value calculating means obtains a plurality of weighted average values for each aperture group,
The restoration value is obtained from the plurality of weighted average values based on the image feature amount detected by the feature amount detecting means.

【0016】請求項10に記載の発明は、請求項8また
は9に記載の画像処理装置において、前記画像特徴量
は、1次微分フィルタによるフィルタ処理結果であるこ
とを特徴とするものである。
According to a tenth aspect of the present invention, in the image processing apparatus according to the eighth or ninth aspect, the image feature amount is a filter processing result by a first-order differential filter.

【0017】[0017]

【作用】本発明によれば、入力された限定階調データ
は、各画素を順に注目画素とし、注目画素およびその周
辺に設定された複数個の開口ごとに画素値積算手段によ
り画素値が積算される。この複数個の積算値は加重値設
定手段に送られ、その値をもとに各開口の加重値が計算
される。また、複数個の積算値は平均値計算手段にも送
られ、平均値計算手段はこの積算値と、加重値設定手段
により求められた各開口の加重値から加重平均値を求
め、この加重平均値を注目画素の復元値として出力す
る。このように、本発明では、開口ごとの加重平均化処
理により復元を行なうので、従来のように注目画素を含
む固定サイズの開口を用いて画像を平滑化する場合と比
べて、十分な階調数および画質で画像の再現を行なうこ
とができる。
According to the present invention, in the input limited gradation data, each pixel is set as a pixel of interest in order, and the pixel value is integrated by the pixel value integrating means for each of the target pixel and a plurality of apertures set around it. To be done. The plurality of integrated values are sent to the weight value setting means, and the weight value of each aperture is calculated based on the values. Further, the plurality of integrated values are also sent to the average value calculating means, and the average value calculating means obtains a weighted average value from the integrated value and the weight value of each opening obtained by the weight value setting means, and this weighted average is calculated. The value is output as the restored value of the pixel of interest. As described above, according to the present invention, since the restoration is performed by the weighted averaging process for each aperture, a sufficient gradation can be obtained as compared with the conventional case where an image of a fixed size including a target pixel is used to smooth an image. The image can be reproduced with the number and the image quality.

【0018】また、請求項2に記載の発明によれば、請
求項1に記載の発明において、複数の積算値の組から、
予め定められた関数またはテーブルにより積算画素値に
応じた各開口の加重値を求める。例えば、注目画素を含
む開口の積算値と、その他の開口の積算値の組から、注
目画素を含まない開口の加重値を求めるように構成する
ことができる。このような例においては、注目画素を含
む開口の積算値と、その他の開口の積算値との関係、す
なわち階調変化を細かく知ることができる。このような
構成によって、画像中の複雑な階調変化に対応した階調
復元処理を行なうことができる。
According to the invention of claim 2, in the invention of claim 1, from the set of a plurality of integrated values,
The weighted value of each aperture is calculated according to the integrated pixel value by a predetermined function or table. For example, the weighted value of the opening not including the target pixel can be obtained from the set of the integrated value of the opening including the target pixel and the integrated value of the other openings. In such an example, the relationship between the integrated value of the opening including the target pixel and the integrated values of other openings, that is, the gradation change can be known in detail. With such a configuration, it is possible to perform gradation restoration processing corresponding to a complicated gradation change in the image.

【0019】また、請求項3に記載の発明によれば、請
求項1に記載の発明において、積算値の2個ずつの差ま
たは差の絶対値から、予め定められた関数またはテーブ
ルにより各開口の加重値を求めるので、より簡単な関数
またはより少ないテーブルにより階調復元処理を行なう
ことができる。
According to a third aspect of the present invention, in the first aspect of the invention, each aperture is formed by a predetermined function or table based on the difference of two integrated values or the absolute value of the difference. Since the weighted value of is calculated, the tone restoration processing can be performed with a simpler function or a smaller number of tables.

【0020】これらの関数またはテーブルは、請求項4
に記載の発明のように、復元処理に用いる開口により画
像を走査して求めた積算値の分布に基づいて設定するこ
とができるので、多値画像と擬似中間調画像との間の統
計的な関係を反映した階調復元処理を行なうことができ
る。
These functions or tables are defined in claim 4.
As described above, since it can be set based on the distribution of the integrated value obtained by scanning the image with the aperture used for the restoration processing, the statistical between the multi-valued image and the pseudo halftone image is It is possible to perform gradation restoration processing that reflects the relationship.

【0021】さらに、請求項5に記載の発明のように、
加重値を求める関数またはテーブル中の値を、積算値ど
うしの差または比に対して相関関係を持つように設定す
ることで、開口間の濃度差または濃度比に応じた加重値
が設定されて、エッジ部などでのぼけを抑えた良好な階
調復元画像を得ることができる。
Further, as in the invention described in claim 5,
By setting the function that calculates the weighted value or the value in the table so that it has a correlation with the difference or ratio between the integrated values, the weighted value is set according to the density difference between the openings or the density ratio. It is possible to obtain a good gradation restoration image in which blurring at the edge portion is suppressed.

【0022】また、請求項1ないし請求項5に記載の発
明において、注目画素の近傍の積算値に応じて、請求項
6に記載の発明のように、復元処理に用いられる開口群
のサイズ、形状、開口数を変更することで、視覚的に目
につきやすい画像中のハイライト部分の擬似中間調パタ
ーンの残留を抑え、良好な階調復元処理を行なうことが
できる。あるいは、請求項7に記載の発明のように、サ
イズ、形状、開口数が異なる複数の開口群を用い、各開
口群ごとの複数の加重平均値から復元値を求めることに
よっても、同様に、視覚的に目につきやすい画像中のハ
イライト部分の擬似中間調パターンの残留を抑え、良好
な階調復元処理を行なうことができる。
Further, in the invention described in any one of claims 1 to 5, according to the integrated value in the vicinity of the pixel of interest, as in the invention described in claim 6, the size of the aperture group used for the restoration processing, By changing the shape and the numerical aperture, it is possible to suppress the residual of the pseudo-halftone pattern in the highlight portion of the image that is visually noticeable, and to perform a good gradation restoration process. Alternatively, as in the invention according to claim 7, by using a plurality of aperture groups having different sizes, shapes, and numerical apertures, and obtaining a restoration value from a plurality of weighted average values for each aperture group, similarly, It is possible to suppress the residual of the pseudo-halftone pattern in the highlight portion of the image that is visually noticeable and to perform a good gradation restoration process.

【0023】さらに、請求項1ないし請求項5に記載の
発明において、注目画素近傍の画像の特徴量、例えば、
請求項10に記載の発明のように1次微分フィルタ処理
結果などを検出し、検出された特徴量に応じて、請求項
8に記載の発明のように、復元処理に用いられる開口群
のサイズ、形状、開口数を変更することで、与えられた
画像の特徴に応じた良好な階調復元処理を行なうことが
できる。または、請求項9に記載の発明のように、サイ
ズ、形状、開口数が異なる複数の開口群を用い、各開口
群ごとの複数の加重平均値から特徴量に基づいて復元値
を求めることによっても、同様に与えられた画像の特徴
に応じた良好な階調復元処理を行なうことができる。
Further, in the invention according to any one of claims 1 to 5, the feature amount of the image in the vicinity of the target pixel, for example,
The size of the aperture group used in the restoration process is detected according to the detected feature amount by detecting the primary differential filter processing result and the like as in the invention described in claim 10. By changing the shape and the numerical aperture, it is possible to perform good gradation restoration processing according to the characteristics of a given image. Alternatively, as in the invention according to claim 9, by using a plurality of aperture groups having different sizes, shapes, and numerical apertures, and obtaining a restoration value from a plurality of weighted average values for each aperture group based on the feature amount Also, similarly, it is possible to perform good gradation restoration processing according to the characteristics of the given image.

【0024】[0024]

【発明の実施の形態】図1は、本発明の画像処理装置の
第1の実施の形態を示すブロック図である。図中、1は
画像入力部、2は画像記憶部、3は画像出力部、4は階
調復元処理部、5は制御部、11は画素値積算部、12
は加重値設定部、13は平均値計算部である。画像入力
部1は、伝送または蓄積された限定階調データを入力す
る。画像記憶部2は、画像入力部1から入力された画像
データを記憶する。画像出力部3は、多値プリンタなど
の出力装置から構成され、処理結果を出力する。階調復
元処理部4は、階調復元処理を行なう。制御部5は、各
部を制御する。
FIG. 1 is a block diagram showing a first embodiment of an image processing apparatus according to the present invention. In the figure, 1 is an image input unit, 2 is an image storage unit, 3 is an image output unit, 4 is a gradation restoration processing unit, 5 is a control unit, 11 is a pixel value integration unit, and 12 is a unit.
Is a weight value setting unit, and 13 is an average value calculation unit. The image input unit 1 inputs the limited gradation data transmitted or accumulated. The image storage unit 2 stores the image data input from the image input unit 1. The image output unit 3 is composed of an output device such as a multi-valued printer and outputs the processing result. The gradation restoration processing unit 4 performs gradation restoration processing. The control unit 5 controls each unit.

【0025】階調復元処理部4は、画素値積算部11と
加重値設定部12と平均値計算部13を有する。画素値
積算部11は、注目画素の周辺に設定される複数の開口
ごとに画素値を積算する。加重値設定部12は、画素値
積算部11で計算された複数の積算値に基づき、各積算
値ごとの加重値を設定する。平均値計算部13は、画素
値積算部11で計算された複数の積算値と、加重値設定
部12で設定された各積算値に対応する加重値に基づ
き、加重平均化処理を行なって注目画素の復元値を求め
る。
The tone restoration processing unit 4 has a pixel value integration unit 11, a weight value setting unit 12, and an average value calculation unit 13. The pixel value integration unit 11 integrates pixel values for each of a plurality of openings set around the pixel of interest. The weight value setting unit 12 sets a weight value for each integrated value based on the plurality of integrated values calculated by the pixel value integrating unit 11. The average value calculation unit 13 performs weighted averaging processing based on the plurality of integrated values calculated by the pixel value integration unit 11 and the weight value corresponding to each integrated value set by the weight value setting unit 12 Find the pixel reconstruction value.

【0026】図1において、画像データは、画像入力部
1から入力されて画像記憶部2に格納され、階調復元処
理部4へ読み出されて階調復元処理され、処理された順
に画像出力部3へ送られて出力される。
In FIG. 1, image data is input from the image input unit 1, stored in the image storage unit 2, read out by the tone restoration processing unit 4 and subjected to tone restoration processing, and image output is performed in the order of processing. It is sent to the section 3 and output.

【0027】図2は、本発明の画像処理装置の第1の実
施の形態における階調復元処理部4の処理の流れの一例
を示すフローチャートである。なお、図2では、処理対
象の画像の幅と高さをW画素×Hラインとし、画像の左
上を(0,0)、右下を(W−1,H−1)とする。S
31において、注目画素を入力画像の左上の画素に設定
し、階調復元処理を開始する。
FIG. 2 is a flow chart showing an example of the processing flow of the gradation restoration processing unit 4 in the first embodiment of the image processing apparatus of the present invention. In FIG. 2, the width and height of the image to be processed are W pixels × H lines, the upper left of the image is (0, 0), and the lower right is (W-1, H-1). S
At 31, the target pixel is set to the upper left pixel of the input image, and the gradation restoration process is started.

【0028】S32において、画像記憶部2から画素値
積算部11に注目画素を中心としたp×q画素分の画像
データを読み込む。読み込んだp×q画素分の画像デー
タは、画素値積算部11で設定するすべての開口を含む
だけの大きさが必要である。画素値積算部11は、注目
画素の周辺に複数の開口を設定し、各開口に含まれる画
素値を積算する。
In step S32, image data for p × q pixels centering on the pixel of interest is read from the image storage unit 2 into the pixel value integration unit 11. The read image data for p × q pixels needs to have a size enough to include all the openings set by the pixel value integration unit 11. The pixel value integration unit 11 sets a plurality of openings around the target pixel and integrates the pixel values included in each opening.

【0029】S33において、S32で求めた複数個の
積算値を加重値設定部12に転送し、加重値設定部12
で各開口ごとの加重値を求める。加重値の設定方法につ
いては、後述する。
In S33, the plurality of integrated values obtained in S32 are transferred to the weight value setting unit 12, and the weight value setting unit 12
Calculate the weighted value for each aperture. The method of setting the weight value will be described later.

【0030】S34において、S32で求めた各開口ご
との積算値と、S33で求めた各開口ごとの加重値を平
均値計算部13に転送し、積算値と加重値とから加重平
均化演算を行ない、注目画素の復元値を計算する。そし
て、S35において、S34で求めた注目画素の復元値
を画像出力部3に送り、順次出力する。
In step S34, the integrated value for each opening obtained in step S32 and the weighted value for each opening obtained in step S33 are transferred to the average value calculator 13, and a weighted averaging operation is performed from the integrated value and the weighted value. Then, the restoration value of the pixel of interest is calculated. Then, in S35, the restoration value of the pixel of interest obtained in S34 is sent to the image output unit 3 and sequentially output.

【0031】S36において、1ラインの画素について
の処理が終了したか否かを判定し、当該ラインの処理中
である場合には、S37において注目画素を現在の画素
の右の画素に変更し、S32に戻る。もし当該ラインの
処理が終了、すなわち現在の注目画素が最右端ならば、
S38において最終ラインまで処理を行なったか否かを
判定する。最終ラインでない場合には、S39において
1ライン下の最左端の画素を注目画素とし、S32へ戻
る。最終ラインの処理が終了した場合には、階調復元処
理部4の処理を終了する。
In S36, it is determined whether or not the process for one line of pixels is completed. If the line is being processed, the target pixel is changed to the pixel to the right of the current pixel in S37, Return to S32. If the processing of the line is completed, that is, if the current pixel of interest is the rightmost edge,
In S38, it is determined whether the processing has been performed up to the final line. If it is not the final line, the leftmost pixel one line below is taken as the pixel of interest in S39, and the process returns to S32. When the processing of the final line is completed, the processing of the gradation restoration processing unit 4 is completed.

【0032】以下、具体例をもとに本発明の画像処理装
置の第1の実施の形態における動作の一例を説明する。
以下の説明では2値データを256値に復元する場合を
例に説明を行なうが、入力として3値以上のデータが入
力される場合でも、また、出力データの階調が256値
以外の場合でも同様に処理可能である。
An example of the operation of the first embodiment of the image processing apparatus of the invention will be described below based on a specific example.
In the following description, the case where binary data is restored to 256 values will be described as an example. However, even when data of three or more values is input as input, and when the gradation of output data is other than 256 values, It can be processed similarly.

【0033】図3は、本発明の第1の実施の形態におけ
る一具体例で設定される開口の一例の説明図である。図
3において、中心の黒く塗りつぶされているドットが注
目画素である。ここでは、図3に斜線で示す9個の3×
3領域を開口として設定する。画素値積算部11は、す
べての開口を含む9×9画素を読み込み、設定されてい
る各開口内の画素値を積算する。入力が2値画像の場合
には、この積算は3×3領域内の白または黒画素数をカ
ウントすることで行なわれる。ここで、注目画素を含む
中央の開口をblock0、その他の開口をblock
1〜block8とし、block0〜block8領
域中の黒画素の積算値をp0〜p8と称す。
FIG. 3 is an explanatory diagram of an example of an opening set in a specific example of the first embodiment of the present invention. In FIG. 3, the black dot in the center is the target pixel. Here, nine 3 × shown by hatching in FIG.
Three areas are set as openings. The pixel value integration unit 11 reads 9 × 9 pixels including all openings and integrates the pixel values in each set opening. When the input is a binary image, this integration is performed by counting the number of white or black pixels in the 3 × 3 area. Here, the central opening including the pixel of interest is block0, and the other openings are block.
1 to block8, and integrated values of black pixels in the block0 to block8 regions are referred to as p0 to p8.

【0034】画素値積算部11で求めた9個の積算値p
0〜p8は、加重値設定部12に転送される。加重値設
定部12では、2つの積算値p0とpk(k=1〜8)
の組合せから、例えば、図7のグラフに示すような値が
格納されたテーブルを引いて、p1からp8に対応した
0〜1の加重値を求める。また、p0に対応する加重値
は、ここでは1に設定する。以下、これらの加重値をそ
れぞれw0〜w8で表わす。ここで用いられる加重値は
予め定められているもので、その決定方法については、
図7に示したグラフとともに後述する。
Nine integrated values p obtained by the pixel value integrating section 11
0 to p8 are transferred to the weight value setting unit 12. In the weight value setting unit 12, two integrated values p0 and pk (k = 1 to 8)
For example, a table in which the values shown in the graph of FIG. 7 are stored is subtracted from the combination of 1 to obtain the weighted values of 0 to 1 corresponding to p1 to p8. Further, the weight value corresponding to p0 is set to 1 here. Hereinafter, these weighted values are represented by w0 to w8, respectively. The weight value used here is predetermined, and the method for determining it is as follows.
It will be described later together with the graph shown in FIG. 7.

【0035】画素値積算部11で求めた9個の積算値p
0〜p8と、加重値設定部12で求められた9個の加重
値w0〜w8は、平均値計算部13に転送される。平均
値計算部12では、次に示す(1)式により加重平均値
を求め、その結果を注目画素の復元値として画像出力部
3に出力する。 (復元値)=(w0×p0+w1×p1+…+w7×p7+w8×p8)/ (w0+w1+…+w7+w8)×(255/9) =(p0+w1×p1+…+w7×p7+w8×p8)/(1+ w1+…+w7+w8)×(255/9) −(1)
Nine integrated values p obtained by the pixel value integrating unit 11
0 to p8 and the nine weight values w0 to w8 obtained by the weight value setting unit 12 are transferred to the average value calculation unit 13. The average value calculation unit 12 obtains a weighted average value by the following equation (1), and outputs the result to the image output unit 3 as the restored value of the pixel of interest. (Restored value) = (w0 × p0 + w1 × p1 + ... + w7 × p7 + w8 × p8) / (w0 + w1 + ... + w7 + w8) × (255/9) = (p0 + w1 × p1 + ... + w7 × p7 + w8 × p8) / (1 + w1 + ... + w7 + w8) (255/9)-(1)

【0036】各開口の積算値に差がない場合には、その
周辺での濃度変化は少ないと考えられるので、全体で平
滑化を行なうことで滑らかな多値復元ができる。また、
積算値に差がある場合には、各開口間またはその近傍に
濃度変化があると考えられるので、差のある開口を平滑
化に用いないようにすることでエッジが保存できる。し
かし、このように平滑化方法を切り替えると、切り替え
部分で平滑化特性の急激な変化による不自然さが生じる
ので、加重関数を定めて平滑化特性を連続的に変化さ
せ、エッジ保存と平滑化を滑らかに切替えている。
When there is no difference in the integrated value of each aperture, it is considered that there is little change in density around it, so smooth multivalue restoration can be performed by performing smoothing as a whole. Also,
If there is a difference in the integrated value, it is considered that there is a density change between the openings or in the vicinity thereof. Therefore, the edges can be preserved by not using the openings having the differences for smoothing. However, when the smoothing method is switched in this way, unnaturalness occurs due to a sudden change in the smoothing characteristic at the switching part, so a weighting function is set to continuously change the smoothing characteristic, and edge preservation and smoothing are performed. Is smoothly switched.

【0037】なお、この例では、図3に示したような開
口を用いて復元を行なったが、開口の位置やサイズ、形
状はこれに限定されるものではない。図4は、本発明の
第1の実施の形態における一具体例で設定される開口の
別の例の説明図である。例えば、図4(A)では、9個
の5×5画素の開口を設けている。また、図4(B)で
は、16個の4×4画素の開口を設けている。この例で
は、注目画素は、開口全体を含む16×16画素の領域
の中心とはなっていない。図4(C)では、注目画素を
含む変形の21画素の領域の周囲に8個の3×3画素の
領域を配している。さらに、これらの領域は隣接してい
るが、互いに離れた領域を設定してもよい。このよう
に、開口の取り方は、種々変更可能である。
In this example, the restoration is performed using the opening as shown in FIG. 3, but the position, size and shape of the opening are not limited to this. FIG. 4 is an explanatory diagram of another example of the opening set in the specific example of the first embodiment of the present invention. For example, in FIG. 4A, nine openings of 5 × 5 pixels are provided. Further, in FIG. 4B, 16 openings of 4 × 4 pixels are provided. In this example, the pixel of interest is not in the center of the region of 16 × 16 pixels including the entire opening. In FIG. 4C, eight 3 × 3 pixel areas are arranged around the modified 21 pixel area including the target pixel. Further, although these areas are adjacent to each other, areas apart from each other may be set. In this way, the way of taking the opening can be variously changed.

【0038】例えば、図4(C)に示すように、異なる
開口サイズを有する開口が設定されている場合には、次
の(2)式のようにサイズの違いを補正した式で加重平
均化を行なう必要がある。 (復元値)={p0×(9/21)+w1×p1+…+w7×p7+w8× p8}/(1+w1+…+w7+w8)×(255/9) −(2)
For example, when apertures having different aperture sizes are set as shown in FIG. 4 (C), weighted averaging is performed by an equation in which the size difference is corrected as in the following equation (2). Need to do. (Restored value) = {p0 × (9/21) + w1 × p1 + ... + w7 × p7 + w8 × p8} / (1 + w1 + ... + w7 + w8) × (255/9)-(2)

【0039】これまでの説明では、平均値計算部13で
(1)式や(2)式を使って加重平均値を求めたが、同
様の結果をもたらす範囲でこれらを変形した構成を用い
ることもできる。例えば、これまでの説明では、平均値
計算部13で加重値の総和による正規化や、出力値の範
囲を0〜255にするための乗算を行なっているが、こ
の部分を加重値設定部12で行なうこともできる。具体
的には、加重値設定部12ではw0〜w8を求めた後に
(3)式により各加重値を変換して出力し、平均値計算
部13では(4)式により復元値を求めるように構成し
ても、(1)式と同じ結果を得ることができる。 wi’=wi/(1+w1+…+w7+w8)×(255/9) (i= 0〜8) −(3) (復元値)=w0’×p0+w1’×p1+…+w7’×p7+w8’×p 8 −(4)
In the above description, the average value calculating section 13 calculates the weighted average value by using the equations (1) and (2), but it is necessary to use a modified configuration of these within a range that produces a similar result. You can also For example, in the above description, the average value calculation unit 13 performs normalization by the sum of weight values and multiplication for setting the output value range to 0 to 255. You can also do it at. Specifically, the weight value setting unit 12 calculates w0 to w8 and then converts and outputs each weight value by the formula (3), and the average value calculation unit 13 calculates the restored value by the formula (4). Even if it is configured, the same result as the expression (1) can be obtained. wi '= wi / (1 + w1 + ... + w7 + w8) * (255/9) (i = 0-8)-(3) (restoration value) = w0' * p0 + w1 '* p1 + ... + w7' * p7 + w8 '* p8- ( 4)

【0040】図5は、本発明の画像処理装置の第1の実
施の形態における平均値計算部13の一例を示す構成図
である。図中、21は総和演算部、22はテーブル格納
部、23は乗算処理部、24は乗算値積算部である。上
述の(1)式や(2)式のような平均値計算部13にお
ける計算は、乗除算を含んでいる。ここで、各加重値と
積算値との乗算をテーブルを用いて行ない、加重値の総
和に応じて乗算用のテーブルを切り替えるよう構成する
ことによって、処理負荷が大きい除算処理を除くことが
可能である。図5では、乗算用のテーブルを用いて処理
する場合の構成の一例を示している。
FIG. 5 is a block diagram showing an example of the average value calculation unit 13 in the first embodiment of the image processing apparatus of the present invention. In the figure, 21 is a total calculation unit, 22 is a table storage unit, 23 is a multiplication processing unit, and 24 is a multiplication value integration unit. The calculation in the average value calculation unit 13 such as the formula (1) and the formula (2) described above includes multiplication and division. Here, by multiplying each weight value by the integrated value using a table and switching the table for multiplication according to the total sum of weight values, it is possible to exclude division processing that has a large processing load. is there. FIG. 5 shows an example of the configuration when processing is performed using a multiplication table.

【0041】画素値積算部11で積算された各開口の黒
画素数は、0〜9の4ビットデータとして加重値設定部
12ならびに平均値計算部13に出力される。加重値設
定部12では、この積算値から9つの加重値を求めて平
均値計算部13に出力する。この加重値は、例えば、0
〜1の小数値を0〜255の整数値に量子化した8ビッ
トデータの形で出力されるものとする。平均値計算部1
3では、内部の総和演算部21でこの量子化された加重
値wk(k=0〜8)の総和を求め、テーブル格納部2
2に送る。テーブル格納部22は、総和演算部21から
入力された加重値の総和を用いて、複数用意された乗算
用テーブルのうちから、次の(5)式で表わす出力を生
成するテーブルT(w,p)を選択し、乗算処理部23
にそのテーブルT(w,p)を出力する。 (出力値)=T(w,p)=w×p/(w0+w1+…+w7+w8)×( 255/9) −(5)
The number of black pixels in each opening accumulated by the pixel value accumulating unit 11 is output to the weight value setting unit 12 and the average value calculating unit 13 as 4-bit data of 0-9. The weight value setting unit 12 obtains nine weight values from the integrated value and outputs the nine weight values to the average value calculation unit 13. This weighted value is, for example, 0
It is assumed that a decimal value of ˜1 is quantized into an integer value of 0 to 255 and is output in the form of 8-bit data. Average value calculator 1
In 3, the internal sum total calculation unit 21 obtains the total sum of the quantized weight values wk (k = 0 to 8), and the table storage unit 2
Send to 2. The table storage unit 22 uses the total sum of the weight values input from the total sum calculation unit 21 to generate a table T (w, p), and the multiplication processing unit 23
The table T (w, p) is output to. (Output value) = T (w, p) = w × p / (w0 + w1 + ... + w7 + w8) × (255/9) − (5)

【0042】乗算処理部23は、このテーブルを受けて
積算値と加重値の組からテーブルを引き、その結果を乗
算値積算部24に出力する。乗算値積算部24は、乗算
処理部23からの開口数分(ここでは9個)の出力を積
算し、その積算結果を復元値として画像出力部3などに
出力する。このような構成により、除算処理を用いずに
階調復元処理を行なうことができる。
The multiplication processing section 23 receives this table, subtracts the table from the set of the integrated value and the weighted value, and outputs the result to the multiplied value integrating section 24. The multiplication value integration unit 24 integrates the outputs corresponding to the numerical aperture (here, 9) from the multiplication processing unit 23, and outputs the integration result as a restored value to the image output unit 3 or the like. With such a configuration, the gradation restoration process can be performed without using the division process.

【0043】次に、加重値設定部12の加重値の決定方
法について説明する。2つの開口内の黒画素数p0とp
kが等しい場合、この2つの開口は、処理画像のもとと
なる多値画像上では、類似の濃度領域に属していたと仮
定できる。また、p0とpkが等しくない場合、この2
つの開口が類似の濃度領域に属していた可能性は、p0
とpkの差の絶対値に逆比例するような関係になると考
えられる。この可能性に対応した量をpkに対する加重
値wkとして設定することを考えると、例えば、次のよ
うな方法で統計的に求めることができる。
Next, a method of determining the weight value by the weight value setting section 12 will be described. Number of black pixels p0 and p in two openings
When k is equal, it can be assumed that the two apertures belong to similar density regions on the multi-valued image that is the basis of the processed image. If p0 and pk are not equal, this 2
The probability that the two apertures belonged to similar density regions was p0.
It is considered that the relationship is inversely proportional to the absolute value of the difference between pk and pk. Considering that an amount corresponding to this possibility is set as the weight value wk for pk, it can be statistically obtained by the following method, for example.

【0044】多値画像とそれを擬似中間調処理した画像
の組を多数用意し、擬似中間調画像を先の開口群と同じ
サイズの開口で走査して各積算値に対応したもとの多値
画素値の頻度分布を求め、これを正規化する。この正規
化された頻度は、各積算値を示す擬似中間調領域が原画
像上でどのような画素値を持っていたかを統計的に表わ
したものとなる。正規化された頻度分布の重なりの面積
を求めれば、それが積算値の組(p0,pk)に対応し
た加重値wkとなる。
A large number of sets of multi-valued images and images obtained by performing pseudo-halftone processing on the multi-valued images are prepared, and the pseudo-halftone images are scanned with an aperture having the same size as the previous aperture group, and the original multi-value image corresponding to each integrated value is obtained. The frequency distribution of the value pixel values is obtained, and this is normalized. The normalized frequency statistically represents what kind of pixel value the pseudo halftone area showing each integrated value had on the original image. When the area of overlap of the normalized frequency distributions is obtained, it becomes the weight value wk corresponding to the set (p0, pk) of integrated values.

【0045】図6は、本発明の第1の実施の形態の一具
体例における加重値の設定の一例の説明図である。図6
では、もとの多値画像が256階調であるものとし、2
値化処理された画像を開口サイズが3×3の開口によっ
て走査した場合を示している。このとき、開口の積算値
は0〜9を取るから、開口の積算値に対応した多値画像
の画素値の頻度は、例えば、図6(A)に示すような分
布となる。ここでは、積算値p0が3、積算値pkが5
の場合の分布を示している。この2つの分布の重なる部
分の多少が、どの程度同じ濃度領域であった可能性があ
るかを示している。図6(A)でクロスハッチングを施
した部分の面積あるいは面積の割合が、積算値p0が3
のときの加重値w5である。この加重値は積算値p0に
よって変化する。積算値p0と積算値pkとの組(p
0,pk)における頻度分布の重なりの面積あるいは面
積の割合をF(p0,pk)とすれば、F(p0,p
k)は、例えば、図6(B)に示すように値を求めるこ
とができる。
FIG. 6 is an explanatory diagram of an example of setting the weight value in a specific example of the first embodiment of the present invention. Figure 6
Then, assume that the original multi-valued image has 256 gradations, and 2
The figure shows a case where the image subjected to the binarization processing is scanned by an opening having an opening size of 3 × 3. At this time, since the integrated value of the aperture is 0 to 9, the frequency of the pixel value of the multivalued image corresponding to the integrated value of the opening has a distribution as shown in FIG. 6A, for example. Here, the integrated value p0 is 3 and the integrated value pk is 5
The distribution in the case of is shown. It shows how much the overlapping portions of these two distributions may have the same density region. In FIG. 6A, the area of the cross-hatched portion or the ratio of the areas is such that the integrated value p0 is 3
Is the weighted value w5. This weighted value changes depending on the integrated value p0. A set of integrated value p0 and integrated value pk (p
F (p0, p), where F (p0, pk) is the area or ratio of the overlapping frequency distributions in (0, pk)
The value of k) can be calculated, for example, as shown in FIG.

【0046】図7は、本発明の第1の実施の形態の一具
体例における加重値設定部12において使用される加重
値関数の一例の説明図、図8は、処理対象画像生成時に
用いた誤差拡散係数の説明図である。256階調の多値
画像をもとに、図8に示すような誤差拡散係数を用いて
2値化処理を行ない、得られた2値画像を対象画像とし
て多値化処理を行なう場合の加重値を図7に示してい
る。図7では、図6で説明した方法によってF(p0,
pk)を求め、これをグラフに示している。図中、細い
実線はp0=0の場合を、細い破線はp0=1の場合
を、細い点線はp0=2の場合を、細い一点鎖線はp0
=3の場合を、細い二点鎖線はp0=4の場合を、太い
実線はp0=5の場合を、太い破線はp0=6の場合
を、太い点線はp0=7の場合を、太い一点鎖線はp0
=8の場合を、太い二点鎖線はp0=9の場合を、それ
ぞれ示している。
FIG. 7 is an explanatory diagram of an example of the weight value function used in the weight value setting unit 12 in the specific example of the first embodiment of the present invention, and FIG. 8 is used when the processing target image is generated. It is explanatory drawing of an error diffusion coefficient. Weighting in the case where the binarization processing is performed using the error diffusion coefficient as shown in FIG. 8 on the basis of the 256-gradation multivalued image, and the obtained binarized image is the target image. The values are shown in FIG. In FIG. 7, by the method described in FIG. 6, F (p0,
pk), which is shown in the graph. In the figure, the thin solid line is for p0 = 0, the thin broken line is for p0 = 1, the thin dotted line is for p0 = 2, and the thin dash-dotted line is for p0.
= 3, a thin two-dot chain line is for p0 = 4, a thick solid line is for p0 = 5, a thick broken line is for p0 = 6, and a thick dotted line is for p0 = 7. The dashed line is p0
= 8, and the thick two-dot chain line shows the case of p0 = 9.

【0047】ここでは特定の擬似中間調方式に対する加
重値の求め方を説明したが、このようにして求められた
加重値は、異なる誤差拡散係数を用いた二値化処理や、
他の擬似中間調方式に対しても有効な結果を生じる。ま
た、複数の擬似中間調方式に対して加重値を求め、それ
らの加重値を平均するなどの操作を行なえば、多くの方
式に対してさらに有効な加重値テーブルを得ることがで
きる。
Here, the method of obtaining the weight value for a specific pseudo halftone method has been described. However, the weight value thus obtained is binarized using different error diffusion coefficients,
It also produces valid results for other pseudo-halftone schemes. Further, by obtaining weight values for a plurality of pseudo halftone methods and performing an operation such as averaging those weight values, a weight value table that is more effective for many methods can be obtained.

【0048】このようにして求められたF(p0,p
k)の値は、例えば、テーブルとして加重値設定部12
に保持させておくことができる。あるいは、図7に示す
ようなグラフを適当な関数で近似し、加重値設定部12
で関数値を発生するような機構を用いてもよい。
Thus obtained F (p0, p
The value of k) is, for example, as a table, the weight value setting unit 12
Can be kept at. Alternatively, a graph as shown in FIG. 7 is approximated by an appropriate function, and the weight value setting unit 12
A mechanism for generating a function value may be used.

【0049】図9は、本発明の第1の実施の形態の一具
体例における加重値の設定の変形例の説明図である。図
7からわかるように、p0の変化に対して各関数の形状
はあまり大きく変化していない。そこで、図9(A)に
示すように各p0の値に対応して存在する関数を重ね合
わせて近似し、図9(B)に示すようにF(p0,p
k)からF(p0−pk)と変更することで、テーブル
容量などを削減することができる。さらに、この関数F
(p0−pk)が左右対象に近い場合には、図9(C)
に示すようにF(|p0−pk|)としてさらに削減を
行なうことも可能である。
FIG. 9 is an explanatory diagram of a modification of the setting of the weight value in the specific example of the first embodiment of the present invention. As can be seen from FIG. 7, the shape of each function does not change significantly with respect to the change of p0. Therefore, as shown in FIG. 9A, the functions existing corresponding to the respective values of p0 are superposed and approximated, and as shown in FIG. 9B, F (p0, p
By changing k) to F (p0-pk), the table capacity and the like can be reduced. Furthermore, this function F
When (p0-pk) is close to the left-right symmetry, FIG.
It is also possible to further reduce as F (| p0-pk |) as shown in FIG.

【0050】図10は、本発明の第1の実施の形態の一
具体例における加重値の設定の別の変形例の説明図であ
る。人間の視覚は、明るい部分での擬似中間調パターン
の残留の方が、暗い部分での残留よりも目につきやすい
という性質を持っていることが知られている。このよう
な現象を考慮し、図10(B)に示すように、明るい部
分に対応した加重値テーブルを意図的に広げ、明るい部
分での擬似中間調パターンの除去効果が強くなるように
するなどの工夫も可能である。
FIG. 10 is an explanatory diagram of another modification of the setting of the weight value in the specific example of the first embodiment of the present invention. It is known that human vision has a property that a pseudo halftone pattern remaining in a bright portion is more noticeable than a dark portion remaining. In consideration of such a phenomenon, as shown in FIG. 10B, the weight value table corresponding to the bright portion is intentionally widened so that the pseudo halftone pattern removal effect is enhanced in the bright portion. It is also possible to devise.

【0051】なお、上述の説明では、256階調の多値
画像を、誤差拡散係数を用いて2値化処理した画像を処
理対象画像とすることを前提に説明したが、例えば、入
力が2値以外の画像や、出力が256階調以外、あるい
は図4に示すように開口が3×3画素以外の場合も、同
様の手法で加重値を求めることができる。
The above description has been made on the premise that a multi-valued image with 256 gradations is binarized using the error diffusion coefficient as an image to be processed. The weighted value can be obtained by the same method even for images other than the values, the output other than the 256 gradations, or the opening other than the 3 × 3 pixels as shown in FIG.

【0052】次に、第2の実施の形態について説明す
る。上述の第1の実施の形態では、各注目画素について
同じ開口群を用いた復元を行なっていた。しかし、各注
目画素の特徴に応じて開口サイズや位置などのパラメー
タを変更することで、エッジ部や平坦部などに適応的な
処理が行なわれ、よりエッジを保存して擬似中間調パタ
ーンを良好に取り除くことができる。この第2の実施の
形態では、注目画素の近傍の積算画素値から、開口サイ
ズを変更する例について説明する。
Next, a second embodiment will be described. In the above-described first embodiment, restoration is performed using the same aperture group for each pixel of interest. However, by changing the parameters such as aperture size and position according to the characteristics of each pixel of interest, adaptive processing is performed on the edges and flats, and more edges are saved to improve the pseudo halftone pattern. Can be removed. In the second embodiment, an example in which the aperture size is changed from the integrated pixel value in the vicinity of the pixel of interest will be described.

【0053】図11は、本発明の画像処理装置の第2の
実施の形態における階調復元処理の一例の説明図であ
る。前述のように、人間の視覚は、明るい部分での擬似
中間調パターンの残留の方が、暗い部分での残留よりも
目につきやすいという性質を持っている。そこで、例え
ば、図11に示すような注目画素を含む開口を設定して
画素値を積算し、その積算値に応じて加重平均値を求め
るための開口のサイズを切り替える。図11では、注目
画素を含む開口として、5×5画素の開口でその中の黒
画素数を積算し、その積算値pがある閾値Th以上、す
なわち暗い部分では、例えば図3に示したような3×3
画素のサイズの開口を用い、積算値pがある閾値Thよ
りも小さい場合には、明るい部分であるので4×4画素
の画素のサイズの開口を用いる。このように、明るい部
分での開口サイズを暗い部分の開口サイズよりも大きく
することによって、明るい部分で平滑化が強く行なわ
れ、擬似中間調パターンの残留を少なくすることができ
る。
FIG. 11 is an explanatory diagram showing an example of gradation restoration processing in the second embodiment of the image processing system of the invention. As described above, human vision has the property that the pseudo halftone pattern remaining in the bright portion is more noticeable than the remaining in the dark portion. Therefore, for example, an opening including a target pixel as shown in FIG. 11 is set, pixel values are integrated, and the size of the opening for obtaining the weighted average value is switched according to the integrated value. In FIG. 11, as an opening including a target pixel, the number of black pixels therein is integrated by an opening of 5 × 5 pixels, and the integrated value p is equal to or larger than a certain threshold Th, that is, in a dark portion, as shown in FIG. 3, for example. Na 3x3
When the integrated value p is smaller than a certain threshold Th, an aperture having a pixel size of 4 × 4 pixels is used. As described above, by making the opening size in the bright portion larger than the opening size in the dark portion, the smoothing is strongly performed in the bright portion, and the residual pseudo halftone pattern can be reduced.

【0054】図12は、本発明の画像処理装置の第2の
実施の形態における階調復元処理部4の処理の流れの一
例を示すフローチャートである。なお、図12では、画
像の幅と高さをW画素×Hラインとし、画像の左上を
(0,0)、右下を(W−1,H−1)とする。また、
具体例として、図11に示すような開口を設定するもの
とする。S41において、注目画素を入力画像の左上の
画素に設定し、階調復元処理を開始する。
FIG. 12 is a flow chart showing an example of the processing flow of the gradation restoration processing section 4 in the second embodiment of the image processing apparatus of the invention. In FIG. 12, the width and height of the image are W pixels × H lines, the upper left of the image is (0, 0), and the lower right is (W-1, H-1). Also,
As a specific example, an opening as shown in FIG. 11 is set. In S41, the target pixel is set to the upper left pixel of the input image, and the gradation restoration process is started.

【0055】S42において、画像記憶部2から画素値
積算部11に注目画素を中心とした所定画素サイズ、こ
こでは5×5画素の画像データを読み込み、この中に含
まれる黒画素数を積算する。この積算値をpと称する。
In step S42, image data of a predetermined pixel size centered on the pixel of interest, here 5 × 5 pixels, is read from the image storage unit 2 into the pixel value integration unit 11, and the number of black pixels contained therein is integrated. . This integrated value is called p.

【0056】S43において、S42で求めた積算値p
を予め定められた閾値Thと比較する。その結果、Th
≦pの場合にはS44に、p<Thの場合にはS46に
移る。Th≦pの場合、注目画素近傍には比較的多くの
黒画素が存在し、すなわち暗い領域となっていることを
示している。そこで、3×3画素の開口を用いて平滑化
の程度が弱い階調復元処理を行なう。S44において、
画像記憶部2から画素値積算部11に注目画素を中心と
した3×3画素の開口を含む9×9画素分の画像データ
を読み込み、9個の3×3画素の開口ごとに、画素値を
積算する。S45において、S44で求めた9個の積算
値を加重値設定部12に転送し、加重値設定部12で各
開口ごとの加重値を求める。
In S43, the integrated value p obtained in S42
Is compared with a predetermined threshold Th. As a result, Th
If ≦ p, the process proceeds to S44, and if p <Th, the process proceeds to S46. When Th ≦ p, it indicates that a relatively large number of black pixels are present in the vicinity of the pixel of interest, that is, it is a dark region. Therefore, a gradation restoration process with a weak degree of smoothing is performed using an opening of 3 × 3 pixels. In S44,
Image data for 9 × 9 pixels including an opening of 3 × 3 pixels centered on the pixel of interest is read from the image storage unit 2 into the pixel value integration unit 11, and the pixel value is calculated for each of the nine openings of 3 × 3 pixels. Is added. In S45, the nine integrated values obtained in S44 are transferred to the weight value setting unit 12, and the weight value setting unit 12 obtains the weight value for each opening.

【0057】p<Thの場合、注目画素近傍にはあまり
黒画素が存在せず、すなわち明るい領域となっているこ
とを示している。そこで、4×4開口を用いて平滑化の
程度が強い階調復元処理を行なう。S46において、画
像記憶部2から画素値積算部11に9個の4×4画素の
開口の全画素を含む12×12画素分の画像データを読
み込み、各4×4画素開口ごとに画素値を積算する。S
47において、S46で求めた9個の積算値を加重値設
定部12に転送し、加重値設定部12で各開口ごとの加
重値を求める。
When p <Th, it means that there are not many black pixels in the vicinity of the pixel of interest, that is, the area is bright. Therefore, gradation restoration processing with a high degree of smoothing is performed using a 4 × 4 aperture. In step S46, image data for 12 × 12 pixels including all pixels of nine 4 × 4 pixel openings is read from the image storage section 2 into the pixel value integration section 11, and pixel values are calculated for each 4 × 4 pixel opening. Add up. S
In 47, the nine integrated values obtained in S46 are transferred to the weight value setting unit 12, and the weight value setting unit 12 obtains the weight value for each aperture.

【0058】このようにして求められた9個の積算値と
加重値は平均値計算部13に送られ、S48において加
重平均処理により注目画素の復元値が計算され、S49
においてその復元値は画像出力部3に転送され、順次出
力される。
The nine integrated values and the weighted values thus obtained are sent to the average value calculation unit 13, the restored value of the pixel of interest is calculated by the weighted average processing in S48, and S49.
At, the restored value is transferred to the image output unit 3 and sequentially output.

【0059】その後、S50において、1ラインの画素
についての処理が終了したか否かを判定し、当該ライン
の処理中である場合には、S51において注目画素を現
在の画素の右の画素に変更し、S42に戻る。もし当該
ラインの処理が終了、すなわち現在の注目画素が最右端
ならば、S52において最終ラインまで処理を行なった
か否かを判定する。最終ラインでない場合には、S53
において1ライン下の最左端の画素を注目画素とし、S
42へ戻る。最終ラインの処理が終了した場合には、階
調復元処理部4の処理を終了する。
Then, in S50, it is determined whether or not the processing for the pixels of one line is completed. If the processing for the line is in progress, the target pixel is changed to the pixel to the right of the current pixel in S51. Then, the process returns to S42. If the processing of the line is completed, that is, if the current pixel of interest is the rightmost end, it is determined in S52 whether processing has been performed up to the final line. If it is not the last line, S53
, The leftmost pixel one line below is taken as the pixel of interest, and S
Return to 42. When the processing of the final line is completed, the processing of the gradation restoration processing unit 4 is completed.

【0060】復元時の開口サイズが大きいほど平滑度が
強くなるため、このような処理により、周辺に黒画素が
少ない(=明るい領域に属する)注目画素は強めの平滑
化で擬似中間調パターンが良好に除去され、周辺に黒画
素数が多い(=暗い領域に属する)注目画素は弱めの平
滑化でエッジがより良好に保存される。
Since the larger the opening size at the time of restoration, the stronger the smoothness is, the processing like this causes the target pixel having a small number of black pixels (= belonging to a bright area) to be a smooth halftone pattern with a strong smoothing. The target pixel, which is well removed and has a large number of black pixels in the periphery (= belongs to a dark area), is better smoothed and the edges are better preserved.

【0061】ここでは、注目画素の近傍の積算画素値か
ら開口サイズを変更したが、本発明はこれに限定される
ものではなく、平滑化特性が異なるような開口群の組合
せであれば、どのようなものでも良い。例えば、開口サ
イズを変えずに注目画素近傍に設定する開口の数を変更
する、または開口サイズと開口の数の両方を変更する、
または開口の形状を変更する、あるいは開口の位置を変
更するなど、様々な方法が考えられる。
Although the aperture size is changed from the integrated pixel value in the vicinity of the pixel of interest here, the present invention is not limited to this, and any combination of aperture groups having different smoothing characteristics can be used. It can be something like this. For example, changing the number of apertures set in the vicinity of the pixel of interest without changing the aperture size, or changing both the aperture size and the number of apertures,
Alternatively, various methods such as changing the shape of the opening or changing the position of the opening can be considered.

【0062】図13は、本発明の画像処理装置の第2の
実施の形態における階調復元処理の別の例の説明図であ
る。上述の例では、平滑化の程度があまり大きく異なら
ないため、開口を閾値処理により切り替えた。しかしこ
のような切り替えを行なうと、切り替え部分に画質の変
化が目立つ場合がある。このような場合には、図13に
示すように、複数種類の開口を用いた複数の復元結果を
もとに演算することによって、画質変化を目立たなくす
ることも可能である。図13に示した例では、図11の
積算値pが閾値Th以上の場合の9個の3×3画素の開
口を用いて復元処理を行なった復元値1と、積算値pが
閾値Thより小さい場合の9個の4×4画素の開口を用
いて復元処理を行なった復元値2とを用い、積算値pに
応じて寄与する割合を変えている。例えば、図13に示
すように、 (復元値)={(復元値1)×p+(復元値2)×(25−p)}/25 により復元値を求めることができる。
FIG. 13 is an explanatory diagram of another example of the gradation restoration processing in the second embodiment of the image processing apparatus of the invention. In the above example, the degree of smoothing does not differ so much, so the openings are switched by thresholding. However, when such switching is performed, the change in image quality may be noticeable at the switching portion. In such a case, as shown in FIG. 13, it is possible to make the change in image quality inconspicuous by performing calculation based on a plurality of restoration results using a plurality of types of openings. In the example shown in FIG. 13, when the integrated value p in FIG. 11 is equal to or larger than the threshold Th, the restored value 1 obtained by performing the restoration process using nine openings of 3 × 3 pixels, and the integrated value p are smaller than the threshold Th. The ratio of contribution is changed according to the integrated value p by using the restored value 2 obtained by performing the restoration process using the nine apertures of 4 × 4 pixels. For example, as shown in FIG. 13, the restoration value can be calculated by (restoration value) = {(restoration value 1) × p + (restoration value 2) × (25−p)} / 25.

【0063】次に、第3の実施の形態について説明す
る。上述の第2の実施の形態では、復元に用いられる開
口のサイズを、注目画素近傍の積算画素値により変化さ
せた。ここでは、別の具体例として、注目画素近傍の特
徴量により開口形状を変更する例について説明する。
Next, a third embodiment will be described. In the above-described second embodiment, the size of the opening used for restoration is changed according to the integrated pixel value in the vicinity of the pixel of interest. Here, as another specific example, an example in which the opening shape is changed according to the feature amount near the target pixel will be described.

【0064】図14は、本発明の画像処理装置の第3の
実施の形態を示すブロック図である。図中、図1と同様
の部分には同じ符合を付して説明を省略する。6は特徴
量検出部である。特徴量検出部6は、注目画素の近傍の
画像の特徴量を検出する。特徴量としては様々なものが
考えられる。ここでは特徴量の一例として、エッジ部と
平坦部とを適応的に処理するために、画像中のエッジ特
徴を検出するものとする。エッジ部の検出には、例え
ば、1次微分フィルタを用いることができる。この特徴
量検出部6で検出した特徴量は、階調復元処理部4に伝
えられる。
FIG. 14 is a block diagram showing a third embodiment of the image processing apparatus of the invention. In the figure, the same parts as those in FIG. 6 is a feature amount detection unit. The feature amount detection unit 6 detects the feature amount of the image near the pixel of interest. Various features can be considered. Here, as an example of the feature amount, it is assumed that the edge feature in the image is detected in order to adaptively process the edge portion and the flat portion. For the detection of the edge portion, for example, a first-order differential filter can be used. The characteristic amount detected by the characteristic amount detecting unit 6 is transmitted to the gradation restoration processing unit 4.

【0065】図15は、1次微分フィルタの一例の説明
図である。ここでは、一例として7×7画素の大きさの
フィルタを示している。このフィルタの値を使い、7×
7画素の画素値との積和を演算し、その値を特徴量とし
て用いることができる。図15(A)に示した1次微分
フィルタでは、注目画素の左側と右側とで大きく濃度が
異なるとき、積和演算の値が大きくなる。そのため、縦
に存在する濃度境界を検出することができる。同様に、
図15(B)に示した1次微分フィルタでは、横に存在
する濃度境界を検出することができる。1次微分フィル
タは、7×7の大きさに限らず、特徴を捉えられる大き
さであればよい。
FIG. 15 is an explanatory diagram of an example of the first-order differential filter. Here, a filter having a size of 7 × 7 pixels is shown as an example. Using the value of this filter, 7 ×
The sum of products with the pixel value of 7 pixels can be calculated, and the value can be used as the feature amount. In the first-order differential filter shown in FIG. 15 (A), when the left side and the right side of the pixel of interest differ greatly in density, the value of the product-sum calculation becomes large. Therefore, it is possible to detect a vertically existing density boundary. Similarly,
The first-order differential filter shown in FIG. 15 (B) can detect the density boundary that exists laterally. The first-order differential filter is not limited to the size of 7 × 7, but may be any size as long as the feature can be captured.

【0066】図16は、本発明の第3の実施の形態にお
いて設定される複数の開口群の一例の説明図である。例
えば、図15に示すような1次微分フィルタにより、縦
方向に濃度境界が存在することが検出されたときには、
横方向の平滑化処理を弱めて縦方向の濃度境界を保存す
るようにする。そのために、例えば、図16(A)に示
すような3×5画素の開口を設定する。また、横方向に
濃度境界が存在することが検出されたときには、縦方向
の平滑化処理を弱めて横方向の濃度境界を保存するよう
にする。そのために、例えば、図16(B)に示すよう
な5×3画素の開口を設定する。なお、この実施の形態
では、どちらの方向の濃度境界も検出されないとき、図
16(C)に示すように4×4画素の開口を用いること
とする。
FIG. 16 is an explanatory diagram of an example of a plurality of aperture groups set in the third embodiment of the invention. For example, when it is detected that a density boundary exists in the vertical direction by a first-order differential filter as shown in FIG. 15,
The horizontal smoothing process is weakened to preserve the vertical density boundary. Therefore, for example, an opening of 3 × 5 pixels as shown in FIG. 16A is set. Further, when it is detected that the density boundary exists in the horizontal direction, the smoothing process in the vertical direction is weakened to save the density boundary in the horizontal direction. Therefore, for example, an opening of 5 × 3 pixels as shown in FIG. 16B is set. Note that in this embodiment, when the density boundary in either direction is not detected, an opening of 4 × 4 pixels is used as shown in FIG. 16C.

【0067】図17、図18は、本発明の画像処理装置
の第3の実施の形態における階調復元処理の流れの一例
を示すフローチャートである。なお、図17において
も、画像の幅と高さをW画素×Hラインとし、画像の左
上を(0,0)、右下を(W−1,H−1)とする。ま
た、特徴量の抽出には、図15に示した7×7画素のフ
ィルタを用いることとし、画素値積算部11が設定する
開口は、具体例として図16に示すものを用いるものと
する。S61において、注目画素を入力画像の左上の画
素に設定し、階調復元処理を開始する。
FIG. 17 and FIG. 18 are flowcharts showing an example of the flow of gradation restoration processing in the third embodiment of the image processing apparatus of the invention. Also in FIG. 17, the width and height of the image are W pixels × H lines, the upper left of the image is (0, 0), and the lower right is (W-1, H-1). Further, the 7 × 7 pixel filter shown in FIG. 15 is used to extract the feature amount, and the aperture set by the pixel value integration unit 11 is the one shown in FIG. 16 as a specific example. In S61, the target pixel is set to the upper left pixel of the input image, and the gradation restoration process is started.

【0068】S62において、画像記憶部2から特徴量
検出部6に注目画素を中心とした7×7画素分の画像デ
ータを読み込む。そして、特徴量検出部6で図15
(A),(B)に示すような1次微分フィルタを用いて
微分処理を行ない、それぞれの結果の絶対値を出力す
る。上述のように、図15に示すような1次微分フィル
タを用いることによって、縦または横方向の濃度境界を
検出することができる。1次微分値は濃度変化の方向に
より符合が異なるので、これら1次微分値の絶対値を算
出し、常に正の値として出力する。ここで、図15
(a),(b)に示したフィルタによる1次微分値の絶
対値を、それぞれqa,qbとする。
In S62, image data for 7 × 7 pixels centering on the pixel of interest is read from the image storage unit 2 into the feature amount detection unit 6. Then, in the feature amount detection unit 6, FIG.
Differentiation is performed using a first-order differential filter as shown in (A) and (B), and the absolute value of each result is output. As described above, the density boundary in the vertical or horizontal direction can be detected by using the first-order differential filter as shown in FIG. Since the sign of the primary differential value differs depending on the direction of density change, the absolute value of these primary differential values is calculated and always output as a positive value. Here, FIG.
The absolute values of the first-order differential values obtained by the filters shown in (a) and (b) are qa and qb, respectively.

【0069】S63において、S62で求めたqa,q
bを予め定められた閾値Thと比較する。その結果、q
a,qbともに閾値以下の場合にはS64に、qa,q
bのどちらかが閾値よりも大きい場合にはS66に移
る。
In S63, qa, q obtained in S62
b is compared with a predetermined threshold Th. As a result, q
If both a and qb are less than or equal to the threshold value, then in step S64,
If either b is larger than the threshold value, the process proceeds to S66.

【0070】qaおよびqbの値がともに閾値Th以下
の場合、その注目画素の周辺には、縦および横方向には
大きな濃度変化がないと考えられる。そこで、例えば、
図16(C)に示す4×4画素の9つの開口を用いて、
縦横に等方的な復元処理を行なう。S64において、画
像記憶部2から画素値積算部11に、図16(C)に示
す9個の4×4画素の開口の全画素を含む12×12画
素分の画像データを読み込み、各開口ごとに画素値を積
算する。そして、S65において、S64で求めた9個
の積算値を加重値設定部12に転送し、加重値設定部1
2で各開口ごとの加重値を求める。
When both the values of qa and qb are less than or equal to the threshold value Th, it is considered that there is no large density change in the vertical and horizontal directions around the pixel of interest. So, for example,
Using 9 apertures of 4 × 4 pixels shown in FIG.
Performs an isotropic restoration process vertically and horizontally. In step S64, image data for 12 × 12 pixels including all the pixels of nine 4 × 4 pixel openings shown in FIG. 16C is read from the image storage section 2 into the pixel value integration section 11, and for each opening. The pixel value is added to. Then, in S65, the nine integrated values obtained in S64 are transferred to the weight value setting unit 12, and the weight value setting unit 1
In step 2, the weight value for each aperture is calculated.

【0071】qaまたはqbの値のどちらかが閾値Th
よりも大きい場合、その注目画素の周辺には、縦または
横方向に大きな濃度変化があると考えられる。そこで、
例えば、図16(A)に示す3×5画素開口、または図
16(B)に示す5×3画素開口を用いて濃度変化の方
向に応じた復元処理を行なう。S66において、縦と横
のどちらの方向に濃度変化があるかを見るために、qa
とqbの大小関係を判定する。qa≧qbならばS67
へ、qa<qbの場合にはS69へ移る。S67に移っ
た場合には、画像記憶部2から画素値積算部11に注目
画素を中心とした9×15画素分の画像データを読み込
み、図16(A)に示す9個の3×5画素の開口ごとに
画素値を積算する。そして、S68において、S67で
求めた9個の積算値を加重値設定部12に転送し、加重
値設定部12で各開口ごとの加重値を求める。
Either the value of qa or qb is the threshold Th.
If it is larger than that, it is considered that there is a large density change in the vertical or horizontal direction around the pixel of interest. Therefore,
For example, the restoration process according to the direction of density change is performed using the 3 × 5 pixel aperture shown in FIG. 16A or the 5 × 3 pixel aperture shown in FIG. 16B. In S66, in order to see whether the density changes in the vertical direction or the horizontal direction, qa
And qb are compared. If qa ≧ qb, S67
If qa <qb, the process proceeds to S69. When the process proceeds to S67, image data for 9 × 15 pixels centered on the pixel of interest is read from the image storage unit 2 into the pixel value integration unit 11, and nine 3 × 5 pixels shown in FIG. Pixel values are integrated for each aperture. Then, in S68, the nine integrated values obtained in S67 are transferred to the weight value setting unit 12, and the weight value setting unit 12 obtains the weight value for each opening.

【0072】S69に移った場合には、画像記憶部2か
ら画素値積算部11に注目画素を中心とした15×9画
素分の画像データを読み込み、図16(B)に示す9個
の5×3画素の開口ごとに画素値を積算する。そして、
S70において、S69で求めた9個の積算値を加重値
設定部12に転送し、加重値設定部12で各開口ごとの
加重値を求める。
When the process proceeds to S69, the image data of 15 × 9 pixels centered on the pixel of interest is read from the image storage unit 2 into the pixel value integration unit 11, and the nine image data 5 shown in FIG. The pixel value is integrated for each opening of × 3 pixels. And
In S70, the nine integrated values obtained in S69 are transferred to the weight value setting unit 12, and the weight value setting unit 12 obtains the weight value for each opening.

【0073】このようにして求められた9個の積算値と
加重値は平均値計算部13に送られ、S71において加
重平均処理により注目画素の復元値が計算され、S72
においてその復元値は画像出力部3に転送され、順次出
力される。
The nine integrated values and weighted values thus obtained are sent to the average value calculation unit 13, and the weighted average processing calculates the restored value of the pixel of interest in S71, and S72
At, the restored value is transferred to the image output unit 3 and sequentially output.

【0074】その後、S73において、1ラインの画素
についての処理が終了したか否かを判定し、当該ライン
の処理中である場合には、S74において注目画素を現
在の画素の右の画素に変更し、S62に戻る。もし当該
ラインの処理が終了、すなわち現在の注目画素が最右端
ならば、S75において最終ラインまで処理を行なった
か否かを判定する。最終ラインでない場合には、S76
において1ライン下の最左端の画素を注目画素とし、S
62へ戻る。最終ラインの処理が終了した場合には、階
調復元処理を終了する。
After that, in S73, it is determined whether or not the processing for the pixels of one line is completed. If the processing for the line is in progress, the pixel of interest is changed to the pixel to the right of the current pixel in S74. Then, the process returns to S62. If the processing of the line is completed, that is, if the current pixel of interest is the rightmost end, it is determined in S75 whether the processing has been performed up to the final line. If it is not the last line, S76
, The leftmost pixel one line below is taken as the pixel of interest, and S
Return to 62. When the processing of the final line is completed, the gradation restoration processing is completed.

【0075】このように、注目画素の周辺の濃度変化に
応じて、濃度変化の強い方向に開口形状を狭め、濃度変
化の弱い方向に開口を広げることで、よりエッジが保存
された良好な復元画像を得ることができる。なお、ここ
では縦横方向の濃度境界を検出する1次微分フィルタを
用いたが、斜め方向に対応したフィルタやサイズの異な
るフィルタなどを付加し、さらに細かいエッジ検出を行
なって開口を変更することも可能である。また、1次微
分フィルタ以外に2次微分フィルタの出力や、入力画像
が2値の場合には画素値の反転回数などの特徴量を使っ
ても、同様に良好な復元画像を得ることが期待できる。
また、特徴量に応じて設定される開口は、大きさを変化
させる他、位置や形状、個数などを変化させてもよい。
As described above, according to the change in density around the pixel of interest, the shape of the opening is narrowed in the direction where the density change is strong, and the opening is widened in the direction where the density change is weak. Images can be obtained. Although the first-order differential filter that detects the density boundaries in the vertical and horizontal directions is used here, it is also possible to add a filter corresponding to the diagonal direction or a filter having a different size to detect the finer edges to change the aperture. It is possible. In addition, it is expected that a good restored image can be obtained by using the output of a secondary differential filter other than the primary differential filter, or the feature amount such as the number of pixel value inversions when the input image is binary. it can.
In addition, the size of the opening set according to the feature amount may be changed, and the position, shape, and number may be changed.

【0076】また、第2の実施の形態において図13で
説明したように、開口のサイズや位置、形状、個数など
の異なる複数の開口群を設定し、それぞれの開口群で復
元値を計算した後、特徴量検出部6における検出結果を
もとに各開口群から求めた復元値の割合を増減し、最終
的な復元値を求めるように構成することも可能である。
As described with reference to FIG. 13 in the second embodiment, a plurality of aperture groups having different sizes, positions, shapes, and numbers of apertures are set, and the restoration value is calculated for each aperture group. After that, it is possible to increase / decrease the ratio of the restoration value obtained from each aperture group based on the detection result of the feature amount detection unit 6 to obtain the final restoration value.

【0077】[0077]

【発明の効果】以上の説明から明らかなように、本発明
によれば、複数の開口による画素値の積算値に応じた加
重平均処理により、従来の1つの開口による単純な平均
化と比べてエッジ部のぼけや擬似中間調パターンの残留
を抑えた、良好な階調の復元が可能となる。また、加重
平均化処理を用いているので、単純な平均化処理による
復元と比べて、十分な階調の再現が可能な画像処理装置
を実現することができる。さらに、注目画素付近の画像
の特徴に応じて開口を変更したり、または各開口群によ
る複数の復元値を用いることにより、目立ちやすいハイ
ライト部でのパターンの残留やエッジ部のぼけを抑え
た、より良好な階調復元画像を得ることが可能な画像処
理装置を実現することができるという効果がある。
As is apparent from the above description, according to the present invention, the weighted average processing according to the integrated value of the pixel values by a plurality of apertures makes it possible to compare with the conventional simple averaging by one aperture. It is possible to restore a good gradation while suppressing blurring of the edge portion and residual pseudo halftone pattern. Further, since the weighted averaging process is used, it is possible to realize an image processing device capable of reproducing sufficient gradations as compared with the restoration by the simple averaging process. Furthermore, by changing the aperture according to the characteristics of the image near the pixel of interest, or by using multiple restoration values by each aperture group, it is possible to suppress the residual pattern of the highlight portion and blurring of the edge portion. Therefore, there is an effect that it is possible to realize an image processing apparatus capable of obtaining a better gradation restored image.

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

【図1】 本発明の画像処理装置の第1の実施の形態を
示すブロック図である。
FIG. 1 is a block diagram illustrating a first embodiment of an image processing apparatus according to the present invention.

【図2】 本発明の画像処理装置の第1の実施の形態に
おける階調復元処理部4の処理の流れの一例を示すフロ
ーチャートである。
FIG. 2 is a flowchart showing an example of a processing flow of a gradation restoration processing unit 4 in the first embodiment of the image processing apparatus of the present invention.

【図3】 本発明の第1の実施の形態における一具体例
で設定される開口の一例の説明図である。
FIG. 3 is an explanatory diagram of an example of an opening set in a specific example according to the first embodiment of the present invention.

【図4】 本発明の第1の実施の形態における一具体例
で設定される開口の別の例の説明図である。
FIG. 4 is an explanatory diagram of another example of the opening set in a specific example according to the first embodiment of the present invention.

【図5】 本発明の画像処理装置の第1の実施の形態に
おける平均値計算部13の一例を示す構成図である。
FIG. 5 is a configuration diagram showing an example of an average value calculation unit 13 in the first embodiment of the image processing apparatus of the present invention.

【図6】 本発明の第1の実施の形態の一具体例におけ
る加重値の設定の一例の説明図である。
FIG. 6 is an explanatory diagram showing an example of setting a weight value in a specific example of the first exemplary embodiment of the present invention.

【図7】 本発明の第1の実施の形態の一具体例におけ
る加重値設定部12において使用される加重値関数の一
例の説明図である。
FIG. 7 is an explanatory diagram of an example of a weight value function used in the weight value setting unit 12 in the specific example of the first exemplary embodiment of the present invention.

【図8】 処理対象画像生成時に用いた誤差拡散係数の
説明図である。
FIG. 8 is an explanatory diagram of an error diffusion coefficient used when generating an image to be processed.

【図9】 本発明の第1の実施の形態の一具体例におけ
る加重値の設定の変形例の説明図である。
FIG. 9 is an explanatory diagram of a modified example of setting a weight value in a specific example of the first embodiment of the present invention.

【図10】 本発明の第1の実施の形態の一具体例にお
ける加重値の設定の別の変形例の説明図である。
FIG. 10 is an explanatory diagram of another modification of setting the weight value in the specific example of the first embodiment of the present invention.

【図11】 本発明の画像処理装置の第2の実施の形態
における階調復元処理の一例の説明図である。
FIG. 11 is an explanatory diagram of an example of gradation restoration processing in the second embodiment of the image processing apparatus of the invention.

【図12】 本発明の画像処理装置の第2の実施の形態
における階調復元処理部4の処理の流れの一例を示すフ
ローチャートである。
FIG. 12 is a flowchart showing an example of the processing flow of the gradation restoration processing unit 4 in the second embodiment of the image processing apparatus of the present invention.

【図13】 本発明の画像処理装置の第2の実施の形態
における階調復元処理の別の例の説明図である。
FIG. 13 is an explanatory diagram of another example of gradation restoration processing in the second embodiment of the image processing apparatus of the invention.

【図14】 本発明の画像処理装置の第3の実施の形態
を示すブロック図である。
FIG. 14 is a block diagram showing a third embodiment of the image processing apparatus of the invention.

【図15】 1次微分フィルタの一例の説明図である。FIG. 15 is an explanatory diagram of an example of a first-order differential filter.

【図16】 本発明の第3の実施の形態において設定さ
れる複数の開口群の一例の説明図である。
FIG. 16 is an explanatory diagram of an example of a plurality of aperture groups set in the third embodiment of the invention.

【図17】 本発明の画像処理装置の第3の実施の形態
における階調復元処理の流れの一例を示すフローチャー
トである。
FIG. 17 is a flowchart showing an example of the flow of gradation restoration processing in the third embodiment of the image processing apparatus of the invention.

【図18】 本発明の画像処理装置の第3の実施の形態
における階調復元処理の流れの一例を示すフローチャー
ト(続き)である。
FIG. 18 is a flowchart (continuation) showing an example of the flow of gradation restoration processing in the third embodiment of the image processing apparatus of the invention;

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

1は画像入力部、2は画像記憶部、3は画像出力部、4
は階調復元処理部、5は制御部、6は特徴量検出部、1
1は画素値積算部、12は加重値設定部、13は平均値
計算部、21は総和演算部、22…テーブル格納部、2
3…乗算処理部、24…乗算値積算部。
1 is an image input unit, 2 is an image storage unit, 3 is an image output unit, 4
Is a gradation restoration processing unit, 5 is a control unit, 6 is a feature amount detection unit, 1
1 is a pixel value integration unit, 12 is a weight value setting unit, 13 is an average value calculation unit, 21 is a sum calculation unit, 22 ... Table storage unit, 2
3 ... Multiplication processing unit, 24 ... Multiplication value integrating unit.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 注目画素およびその周囲に複数の開口を
設定して各開口ごとに画素値を積算する画素値積算手段
と、該画素値積算手段で求められた積算値から各開口ご
との加重値を求める加重値設定手段と、前記画素値積算
手段で求められた積算値と前記加重値設定手段で求めら
れた加重値から加重平均値を求める平均値計算手段を備
え、与えられた画像中の各画素を前記注目画素として前
記画素値積算手段、前記加重値設定手段および前記平均
値計算手段により階調復元処理を行なうことを特徴とす
る画像処理装置。
1. A pixel value integrating means for setting a plurality of openings around a target pixel and its surroundings and integrating pixel values for each opening, and a weight for each opening from the integrated value obtained by the pixel value integrating means. A weighted value setting means for obtaining a value, an average value calculation means for obtaining a weighted average value from the integrated value obtained by the pixel value integrating means and the weighted value obtained by the weighted value setting means are provided. An image processing apparatus, wherein each pixel is used as the target pixel, and gradation restoration processing is performed by the pixel value integration means, the weight value setting means, and the average value calculation means.
【請求項2】 前記加重値設定手段は、前記画素値積算
手段で求められた積算値のうちの複数個の組から、予め
定められた関数またはテーブルにより開口の加重値を求
めることを特徴とする請求項1に記載の画像処理装置。
2. The weight value setting means obtains the weight value of the aperture by a predetermined function or table from a plurality of sets of the integrated values obtained by the pixel value integrating means. The image processing device according to claim 1.
【請求項3】 前記加重値設定手段は、前記画素値積算
手段で求められた積算値のうちの2個の差または差の絶
対値から、予め定められた関数またはテーブルにより開
口の加重値を求めることを特徴とする請求項1に記載の
画像処理装置。
3. The weight value setting means calculates the weight value of the aperture by a predetermined function or table from the difference or the absolute value of the difference between the two integrated values obtained by the pixel value integrating means. The image processing apparatus according to claim 1, which is obtained.
【請求項4】 前記加重値設定手段の関数またはテーブ
ルは、画像を前記開口で走査して求めた積算値の分布に
基づいて設定されることを特徴とする請求項2または3
に記載の画像処理装置。
4. The function or table of the weight value setting means is set based on a distribution of integrated values obtained by scanning an image with the aperture.
An image processing apparatus according to claim 1.
【請求項5】 前記加重値設定手段の関数またはテーブ
ル中の値は、前記画素値積算手段で求められた積算値ど
うしの差または比に対して相関関係を持つことを特徴と
する請求項2ないし4のいずれか1項に記載の画像処理
装置。
5. The function or the value in the table of the weight value setting means has a correlation with a difference or a ratio between the integrated values obtained by the pixel value integrating means. 5. The image processing device according to any one of items 4 to 4.
【請求項6】 前記画素値積算手段は、前記注目画素お
よびその近傍の画素の積算値に応じて、前記開口のサイ
ズ、形状、開口数を変更することを特徴とする請求項1
ないし請求項5に記載の画像処理装置。
6. The pixel value integrating means changes the size, shape, and numerical aperture of the opening according to the integrated value of the pixel of interest and pixels in the vicinity thereof.
The image processing apparatus according to claim 5.
【請求項7】 前記画素値積算手段は、サイズ、形状、
開口数が異なる複数の開口群を設定し、前記平均値計算
手段は、各開口群ごとに加重平均値を求め、それらに基
づいて復元値を求めることを特徴とする請求項1ないし
請求項5のいずれか1項に記載の画像処理装置。
7. The pixel value accumulating means includes a size, a shape,
6. A plurality of aperture groups having different numerical apertures are set, and the average value calculating means obtains a weighted average value for each aperture group, and obtains a restoration value based on them. The image processing device according to any one of 1.
【請求項8】 前記注目画素の近傍の画像特徴量を検出
する特徴量検出手段を備え、前記画素値積算手段は、前
記特徴量検出手段により検出された特徴量に応じて、前
記開口のサイズ、形状、開口数を変更することを特徴と
する請求項1ないし請求項5のいずれか1項に記載の画
像処理装置。
8. A feature quantity detecting means for detecting an image feature quantity in the vicinity of the pixel of interest is provided, and the pixel value integrating means has a size of the opening according to the feature quantity detected by the feature quantity detecting means. The image processing apparatus according to any one of claims 1 to 5, wherein the shape, the numerical aperture, and the numerical aperture are changed.
【請求項9】 前記注目画素の近傍の画像特徴量を検出
する特徴量検出手段を備え、前記画素値積算手段は、サ
イズ、形状、開口数が異なる複数の開口群を設定し、前
記平均値計算手段は、各開口群ごとに複数の加重平均値
を求め、前記特徴量検出手段により検出された前記画像
特徴量に基づき複数の前記加重平均値から復元値を求め
ることを特徴とする請求項1ないし請求項5のいずれか
1項に記載の画像処理装置。
9. A feature quantity detecting means for detecting an image feature quantity in the vicinity of the target pixel, wherein the pixel value integrating means sets a plurality of aperture groups having different sizes, shapes, and numerical apertures, and the average value is set. The calculating means obtains a plurality of weighted average values for each aperture group, and obtains a restoration value from the plurality of weighted average values based on the image feature amount detected by the feature amount detecting means. The image processing apparatus according to any one of claims 1 to 5.
【請求項10】 前記画像特徴量は、1次微分フィルタ
によるフィルタ処理結果であることを特徴とする請求項
8または9に記載の画像処理装置。
10. The image processing apparatus according to claim 8, wherein the image feature amount is a filter processing result by a first-order differential filter.
JP7204461A 1995-08-10 1995-08-10 Picture processor Pending JPH0955855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7204461A JPH0955855A (en) 1995-08-10 1995-08-10 Picture processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7204461A JPH0955855A (en) 1995-08-10 1995-08-10 Picture processor

Publications (1)

Publication Number Publication Date
JPH0955855A true JPH0955855A (en) 1997-02-25

Family

ID=16490924

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7204461A Pending JPH0955855A (en) 1995-08-10 1995-08-10 Picture processor

Country Status (1)

Country Link
JP (1) JPH0955855A (en)

Similar Documents

Publication Publication Date Title
US8675104B2 (en) Noise filter for bayer pattern image data
JP2871127B2 (en) Image processing apparatus and method
US5875268A (en) Image processing with low-resolution to high-resolution conversion
US7373020B2 (en) Image processing apparatus and image processing program
JP4065155B2 (en) Image processing apparatus and image processing program
EP1404120A1 (en) Image processing method and device
JPH05225332A (en) Method and apparatus for variable-space wave filtering
EP1909227A1 (en) method of and apparatus for minimizing ringing artifacts in an input image
JPH05344340A (en) Gradation conversion processing method and device
JPH10191100A (en) Video signal processing method
JP3700357B2 (en) Image processing device
US6009193A (en) Method and apparatus for converting N-value image to M-value image, for &lt; NM
JP2001109889A (en) Image processor
JP3932470B2 (en) Image processing method and apparatus
JPH0955855A (en) Picture processor
JP2000307869A (en) Device and method for image processing and computer- readable storage medium with image processing procedure stored therein
JP3361355B2 (en) Image processing device
JP4053362B2 (en) Interpolation processing method, interpolation processing program, recording medium recording the same, image processing apparatus, and image forming apparatus provided with the same
JP2857906B2 (en) Halftone binarization processor
JP3804214B2 (en) Image processing method and image processing apparatus
JP3635761B2 (en) Image processing device
JPH08265572A (en) Picture processor
JP2702133B2 (en) Image processing method
JP2836992B2 (en) Image scaling processor
JPH0554190A (en) Picture processor