JPH10208034A - Processor and method for image processing - Google Patents

Processor and method for image processing

Info

Publication number
JPH10208034A
JPH10208034A JP9006898A JP689897A JPH10208034A JP H10208034 A JPH10208034 A JP H10208034A JP 9006898 A JP9006898 A JP 9006898A JP 689897 A JP689897 A JP 689897A JP H10208034 A JPH10208034 A JP H10208034A
Authority
JP
Japan
Prior art keywords
luminance
image processing
processing apparatus
image
distribution
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
JP9006898A
Other languages
Japanese (ja)
Inventor
Naoki Kuwata
直樹 鍬田
Yoshihiro Nakami
至宏 中見
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP9006898A priority Critical patent/JPH10208034A/en
Publication of JPH10208034A publication Critical patent/JPH10208034A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To eliminate the need for operation based upon operator's intuition by allocating a small number of gradations to a range of small distribution density while giving a large number of gradations to a range of large distribution density according to the quantity of extent of a calculated luminance distribution. SOLUTION: An image input device 10 outputs image data to the image processor 20 by picking up an image, etc. This image processor 20 extracts a distribution of luminance, detects the quantity of extent of the luminance distribution first on the basis of the detected luminance distribution, allocates a small number of gradations to the range of small distribution density while giving a large number of gradations to the range of large distribution density, and converts the image data on the basis of the allocated gradations of luminance. Namely, the distribution of luminance (y) is found as to pixels of the image data while the data are thinned out, and then standard deviation σcorresponding to the extent quantity of the luminance distribution is found; and parameters (γ1, γ2) for γ correction for generating correspondence relation of an S curve is calculated on the basis of the standard deviation σ.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理装置およ
び画像処理方法に関し、特に、ドットマトリクス状の画
像データのコントラストを強調させる画像処理装置およ
び画像処理方法に関する。
The present invention relates to an image processing apparatus and an image processing method, and more particularly, to an image processing apparatus and an image processing method for enhancing the contrast of dot matrix image data.

【0002】[0002]

【従来の技術】スキャナで写真を取り込んだり、デジタ
ルスチルカメラで撮影した画像データはドットマトリク
ス状に構成されている。取り込んだ画像データが好まし
い状態であれば良いものの、デジタル画像の特性を活か
して好みに応じた修正を行いたいこともある。特に、コ
ントラストが弱い場合、これまでのカラーフィルムを使
用した写真であれば修正が困難であり、そのような写真
は撮り直さざるを得ないものの、デジタル画像であれば
画像修正ソフトなどを使用してコントラストの強調も可
能である。
2. Description of the Related Art Image data captured by a scanner or captured by a digital still camera is arranged in a dot matrix. Although it is sufficient if the captured image data is in a preferable state, sometimes it is desired to make a correction according to the taste by utilizing the characteristics of the digital image. In particular, when the contrast is low, it is difficult to correct a photo using a conventional color film, and such a photo must be retaken, but if it is a digital image, use image correction software or the like. It is also possible to enhance the contrast.

【0003】すなわち、従来よりこのようなデジタル画
像データを修正するために画像修正ソフトが利用されて
おり、コンピュータ上にて起動することにより、オペレ
ータは各種の修正が可能となっている。例えば、上述し
たようなコントラストの強調であれば輝度の拡大操作を
することによって可能である。より具体的には、変換元
の輝度と変換先の輝度との対応関係を正比例状態から適
度にS字状に歪めた状態に変更せしめることにより、変
換元でのある幅をもった輝度が変換先でより広い幅とな
るよう対応づけることができる。
[0003] That is, conventionally, image correction software has been used to correct such digital image data, and an operator can perform various corrections by activating the software on a computer. For example, the enhancement of the contrast as described above can be performed by performing an operation of increasing the luminance. More specifically, by changing the correspondence between the luminance of the conversion source and the luminance of the conversion destination from a direct proportional state to a state in which the luminance is appropriately distorted into an S shape, the luminance having a certain width at the conversion source is converted. It is possible to correspond to a wider width earlier.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の画像処
理装置においては、オペレータの操作によってコントラ
ストを強調させる処理が可能ではあるものの、必要なパ
ラメータの値は勘によって与えるしかなく、画像データ
の処理に慣れていない者にとっては思い通りにコントラ
ストを強調できず、薄暮の写真が真昼のようになってし
まったりするなど、操作性の課題があった。
In the above-mentioned conventional image processing apparatus, it is possible to enhance the contrast by an operator's operation, but the necessary parameter values must be given by intuition. For those unfamiliar with, there was a problem with operability, such as the inability to enhance the contrast as desired and the dusk of the picture as if it were midday.

【0005】本発明は、上記課題にかんがみてなされた
もので、オペレータの勘に頼る操作を不要とすることが
可能な画像処理装置および画像処理方法の提供を目的と
する。
[0005] The present invention has been made in view of the above problems, and has as its object to provide an image processing apparatus and an image processing method capable of eliminating the need for an operation relying on the intuition of an operator.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するた
め、請求項1にかかる発明は、ドットマトリクス状の画
像データにおける各画素単位の所定階調の輝度相当値に
ついて、同輝度相当値を入力して所定の変換処理を施し
て出力することにより、入力と出力との関係でコントラ
ストを強調せしめる変換が行われるようにした画像処理
装置であって、上記画像データにおける輝度分布を求め
て同輝度分布の広がり量を算出し、かかる広がり量に基
づいて分布密度の大きい範囲に多くの階調数を与えつつ
分布密度の小さい範囲に少ない階調数を割り当てる構成
としてある。
In order to achieve the above object, according to the first aspect of the present invention, a luminance equivalent value of a predetermined gradation for each pixel in dot matrix image data is inputted. And performing a predetermined conversion process and outputting the result, thereby performing a conversion for enhancing the contrast in a relationship between the input and the output. The spread amount of the distribution is calculated, and based on the spread amount, a large number of tones are assigned to a range with a high distribution density and a small number of tones is assigned to a range with a small distribution density.

【0007】上記のように構成した発明においては、ド
ットマトリクス状の画像データを対象として、まず、画
像データにおける輝度分布を求め、同輝度分布の広がり
量を算出する。輝度分布の広がり量はコントラストの幅
を間接的に表すといえるので、この広がり量に基づいて
分布密度の大きい範囲に多くの階調数を与えつつ分布密
度の小さい範囲に少ない階調数を割り当てる。例えば、
ある幅に輝度分布が集中していたとするときに、その幅
を広げるように階調数を与えればコントラストが強調さ
れて明暗がはっきりする一方、輝度分布が集中していな
いような部分に割り当てられていた階調数を減らしても
支障はない。
In the invention configured as described above, first, a brightness distribution in the image data is obtained for the dot matrix image data, and a spread amount of the brightness distribution is calculated. Since the amount of spread of the luminance distribution can be said to indirectly represent the width of the contrast, a small number of tones is assigned to a range with a small distribution density while giving a large number of tones to a range with a large distribution density based on the amount of spread. . For example,
If the luminance distribution is concentrated in a certain width, if the number of gradations is given so as to increase the width, the contrast will be enhanced and the contrast will be sharpened, but it will be assigned to the part where the luminance distribution is not concentrated. There is no problem even if the number of gradations is reduced.

【0008】むろん、輝度分布の集中がなくまんべんに
広がっているような場合には階調数の割り当てをあえて
変化させる必要はない。
Of course, when the luminance distribution is not concentrated but spreads evenly, it is not necessary to change the assignment of the number of gradations.

【0009】このような輝度分布の広がり量を求める作
業は、従来の操作でオペレータが行っていた勘に頼って
検知していたものであり、この広がり量に応じて階調数
をどの範囲に多く割り当てるかという操作は、オペレー
タが与えていたパラメータを設定することに対応する。
The operation of obtaining the spread amount of the luminance distribution is performed by relying on the intuition that the operator has performed in the conventional operation, and the range of the number of gradations according to the spread amount is determined. The operation of assigning a large number corresponds to setting the parameter given by the operator.

【0010】ここにおいて、輝度分布からその広がり量
を求めるにあたっては各種の手法が可能である。既知の
広がり量に対応する値を求めるものであっても良いし、
計算量を軽減するための処置を施して広がり量を求める
ものであっても良い。既知の広がり量を利用するものと
して、請求項2にかかる発明は、上記請求項1に記載の
画像処理装置において、上記輝度分布の広がり量は標準
偏差に対応する値を利用し、輝度分布の標準偏差が大き
いときに入出力比を小さくするとともに、標準偏差が小
さいときに入出力比を大きくする構成としてある。
Here, various methods are available for obtaining the spread amount from the luminance distribution. A value corresponding to a known spread amount may be obtained,
The spread amount may be obtained by performing a measure for reducing the calculation amount. According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the spread amount of the luminance distribution uses a value corresponding to a standard deviation, and the known spread amount is used. When the standard deviation is large, the input / output ratio is reduced, and when the standard deviation is small, the input / output ratio is increased.

【0011】上記のように構成した発明においては、標
準偏差は平均値に対して個々の要素のバラツキ量を表す
ものであるから、バラツキが多ければ輝度の変換は必要
なく、入出力比を大きくして階調数の割り当て変化を拡
大化するような変換は必要ない。すなわち、輝度分布が
集中していることもないので階調数の割り当てを大きく
したり小さくしたりする必要はない。しかしながら、標
準偏差が小さいということはバラツキが少ないことを意
味し、その場合には輝度分布が集中していることになる
ので、分布密度の大きい範囲に多くの階調数を与えてコ
ントラストを強調させる。
In the invention configured as described above, since the standard deviation indicates the amount of variation of each element with respect to the average value, if the variation is large, the conversion of the luminance is not required, and the input / output ratio is increased. Therefore, there is no need to perform a conversion that enlarges the change in the assignment of the number of gradations. That is, since the luminance distribution is not concentrated, there is no need to increase or decrease the assignment of the number of gradations. However, a small standard deviation means that there is little variation. In this case, since the luminance distribution is concentrated, the contrast is emphasized by giving a large number of gradations to a large distribution density range. Let it.

【0012】むろん、標準偏差はバラツキを表すものと
して使用するので、分散と同義であるし、その計算課程
においては必ずしもサンプル数による除算などを必要と
するわけでもない。
Of course, since the standard deviation is used to represent the variation, it is synonymous with the variance, and the calculation process does not necessarily require division by the number of samples.

【0013】階調数を多く与えたり少なく与えたりする
というのは、概ね入出力比に対応するものであり、階調
数を多く与えるのであれば、入力側で与えられていた階
調数よりもたくさんの階調数を与えてその範囲内で階調
を広げることになり、コントラストの強調にあたる。一
方、階調数の総数を増減させることはできないので、あ
る範囲に階調数を多く与えればその反動として残りの範
囲には階調数を多く与えることができなくなり、入力側
で与えられていた階調数よりも少ない階調数が与えられ
てその範囲内でコントラストが狭められることになる。
Giving a larger or smaller number of gradations generally corresponds to an input / output ratio. If a larger number of gradations is given, the number of gradations is larger than that given on the input side. Also gives a large number of gradations and expands the gradation within that range, which is an enhancement of contrast. On the other hand, since the total number of gradations cannot be increased or decreased, if a large number of gradations is given in a certain range, it is impossible to give a large number of gradations in the remaining range as a reaction, and it is given on the input side. The number of gradations smaller than the number of gradations given is given, and the contrast is narrowed within the range.

【0014】このような階調数の与え方は個々の階調毎
にどのように変換するかを定めることも可能であるが、
より簡便な例とし、請求項3にかかる発明は、上記請求
項2に記載の画像処理装置において、輝度分布にγ補正
を行うとともに標準偏差が大きいときにγ補正による変
化量が小さくなるようにγの値を設定し、標準偏差が小
さいときにγ補正の変化量が大きくなるようにγの値を
設定する構成としてある。
Although it is possible to determine how to convert the number of gradations for each gradation,
As a simpler example, the invention according to claim 3 is characterized in that, in the image processing apparatus according to claim 2, γ correction is performed on the luminance distribution and the amount of change due to γ correction is reduced when the standard deviation is large. The value of γ is set, and the value of γ is set so that the amount of change in γ correction increases when the standard deviation is small.

【0015】上記のように構成した発明においては、γ
補正の手法によって上に凸となったり下に凸となったり
する対応関係を与えるものであり、上に凸となる場合に
は前半部分に階調数を多く割り当てることになるととも
に後半部分に少ない階調数を割り当てることになり、ま
た、下に凸となる場合には前半部分に少ない階調数を割
り当てることになるとともに後半部分に階調数を多く割
り当てることになる。そして、かかる割り当て量の大小
はγ補正による変化量で適宜調整でき、与えるγの値に
て対応している。
In the invention configured as described above, γ
The correction method gives a corresponding relationship such as convex upward or convex downward. In the case of convex upward, a large number of gradations is assigned to the first half and a small number is assigned to the second half. The number of gradations will be assigned, and if it is convex downward, a small number of gradations will be assigned to the first half and a large number of gradations will be assigned to the second half. The magnitude of the assigned amount can be appropriately adjusted by the amount of change due to the γ correction, and is corresponded by the given γ value.

【0016】このγ補正の一対応として、請求項4にか
かる発明は、上記請求項3に記載の画像処理装置におい
て、輝度分布の概略中心位置を求めるとともに、この概
略中心位置を基準として高輝度側と低輝度側とで輝度変
換の極性を反転させることにより入力と出力との関係で
概略S字カーブの輝度変換を行う構成としてある。
According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect, the approximate center position of the luminance distribution is determined, and high luminance is determined with reference to the approximate center position. By inverting the polarity of the luminance conversion between the side and the low luminance side, the luminance conversion of the approximate S-curve is performed in relation to the input and output.

【0017】上記のように構成した発明においては、γ
補正による輝度変換の極性を反転させるべく、高輝度側
でγ<1のγ補正をするとともに低輝度側でγ>1のγ
補正をすることにより、下に凸のカーブと上に凸のカー
ブとが連続することになり、いわゆるS字カーブの入出
力関係が成立する。ここにおいてその中央部分には階調
数を多く割り当てることになるから、輝度分布の概略中
心に二つのカーブの連続点を持ってくるようにすれば輝
度分布を拡大したい範囲に多くの階調数を割り当てるこ
とが可能となる。
In the invention configured as described above, γ
In order to invert the polarity of the luminance conversion by the correction, the γ correction of γ <1 is performed on the high luminance side, and the γ of γ> 1 is corrected on the low luminance side.
By performing the correction, the downwardly convex curve and the upwardly convex curve are continuous, and a so-called S-shaped curve input / output relationship is established. Here, since a large number of gradations are assigned to the central portion, if a continuous point of the two curves is brought to the approximate center of the luminance distribution, a large number of gradations are set in a range where the luminance distribution is to be expanded. Can be assigned.

【0018】各種の手法で輝度を変換するにあたり、請
求項5にかかる発明は、上記請求項1〜請求項4に記載
の画像処理装置において、変換元の輝度の取りうる範囲
内で変換先の輝度を演算して記憶しておき、変換時には
この対応関係を呼び起こして変換することを構成として
ある。
In converting the luminance by various methods, the invention according to claim 5 is an image processing apparatus according to any one of claims 1 to 4, wherein the image processing apparatus according to claim 1 is configured such that the luminance of the conversion destination is within the range of the luminance of the conversion source. The configuration is such that the luminance is calculated and stored, and at the time of conversion, this correspondence is recalled and converted.

【0019】変換式に基づいて輝度を毎回計算すること
も不可能ではないが、輝度分布のとりうる値の範囲は決
まっている。このため、あらかじめ変換元の輝度に基づ
いて変換先の輝度を演算して記憶しておけば、変換時に
対応関係を呼び起こすだけで変換することが可能とな
る。
Although it is not impossible to calculate the luminance every time based on the conversion formula, the range of values that the luminance distribution can take is determined. For this reason, if the brightness of the conversion destination is calculated and stored in advance based on the brightness of the conversion source, the conversion can be performed only by invoking the correspondence at the time of conversion.

【0020】輝度を変換するにあたっては画像データが
輝度のデータとして含んでいる場合もあるし、間接的で
しか輝度のデータを含んでいない場合もある。むろん、
直接の輝度のデータを含んでいればそれを変換すればよ
いし、間接的な輝度のデータである場合でも輝度のデー
タに変換してから所定の輝度変換を行えばよい。しかし
ながら、輝度の変換は極めて正確でなければならないわ
けではなく、大まかに分かれば良いともいえる。
In converting the luminance, the image data may include the luminance data in some cases, or may include the luminance data only indirectly. Of course,
If it includes direct luminance data, it may be converted, or even if it is indirect luminance data, it may be converted into luminance data and then subjected to predetermined luminance conversion. However, the conversion of the luminance does not have to be extremely accurate, and it can be said that it is only necessary to roughly know.

【0021】その意味では厳格な正確さが要求されるわ
けではないので、請求項6にかかる発明は、上記請求項
1〜請求項5に記載の画像処理装置において、画像デー
タが輝度に対応した複数の成分値で表される場合におい
て、輝度の演算を同成分値の線形加算で求めることを構
成としてある。
Since strict accuracy is not required in that sense, the invention according to claim 6 is the image processing apparatus according to any one of claims 1 to 5, wherein the image data corresponds to the luminance. When represented by a plurality of component values, the configuration is such that the calculation of the luminance is obtained by linear addition of the same component values.

【0022】画像データがいわゆるRGB(赤緑青)の
階調データで表されている場合、赤緑青についての各成
分値はそれぞれが輝度に対応しているといえる。このた
め、同成分値の線形加算は十分に輝度を表すものとい
え、極めて容易な変換手法となりうる。
When image data is represented by so-called RGB (red, green, blue) gradation data, it can be said that each component value for red, green, and blue corresponds to luminance. For this reason, it can be said that linear addition of the same component value sufficiently represents luminance, and can be a very easy conversion method.

【0023】各画素についての輝度が求められるものと
して、画像としての輝度分布は必ずしも画像データの全
画素について求める必要がなく、例えば、請求項7にか
かる発明は、上記請求項1〜請求項6に記載の画像処理
装置において、画像データについて所定の抽出率に対応
した間引きを行って輝度分布を求めることを構成として
ある。
Assuming that the luminance for each pixel is determined, the luminance distribution as an image does not necessarily need to be determined for all the pixels of the image data. For example, the invention according to claim 7 is based on claims 1 to 6 above. In the image processing device described in (1), the luminance distribution is obtained by performing thinning-out corresponding to a predetermined extraction rate on the image data.

【0024】分布を求めることを目的とすれば、全画素
に対して輝度を求めることなく、所定の抽出率で間引き
を行なったとしても抽出率に応じた程度の確かさの輝度
分布を得ることができる。
In order to obtain the distribution, it is possible to obtain a luminance distribution having a certain degree of accuracy according to the extraction rate even if thinning is performed at a predetermined extraction rate without obtaining the luminance for all the pixels. Can be.

【0025】ここにおいて、間引く手法も様々であるも
のの、請求項8にかかる発明は、上記請求項7に記載の
画像処理装置において、縦方向と横方向の範囲での短い
側において所定の抽出数が確保されるようにすることを
構成としてある。
Here, although there are various methods for thinning out, the invention according to claim 8 is the image processing apparatus according to claim 7, wherein the predetermined number of extractions on the short side in the vertical direction and the horizontal direction is reduced. Is ensured.

【0026】画像は平面的であるが故、自ずからその画
像データも縦方向と横方向とに分布するが、ある抽出率
を決定するにあたっては、少なくとも短い側においてあ
る抽出数を確保することにより、抽出率に応じた確かさ
を保持することになる。
Since an image is planar, its image data is naturally distributed in the vertical and horizontal directions. To determine a certain extraction rate, at least a certain number of extractions must be secured on the short side. The certainty corresponding to the extraction rate is maintained.

【0027】さらに、請求項9にかかる発明は、上記請
求項1〜請求項8に記載の画像処理装置において、コン
トラストの強調程度に制限を設定することを構成として
ある。
Further, according to a ninth aspect of the present invention, in the image processing apparatus according to any one of the first to eighth aspects, a limit is set on a degree of enhancement of contrast.

【0028】コントラストが狭いことが当然の場合があ
る。例えば、夕方の風景であれば輝度分布の幅が狭いの
は自然であり、これを必要以上に拡大してしまうと昼の
風景となってしまう。同様の例は他の場合においてもあ
り得ることで、輝度分布の拡大範囲に制限を設定するこ
とにより、かかる現象を回避する。
In some cases, the contrast is narrow. For example, it is natural that the width of the luminance distribution is narrow in the evening scene, and if it is expanded beyond necessity, it becomes a day scene. A similar example is possible in other cases, and such a phenomenon is avoided by setting a limit on the enlarged range of the luminance distribution.

【0029】さらに、請求項10にかかる発明は、上記
請求項1〜請求項9に記載の画像処理装置において、輝
度分布に基づいて二値画像データを判定するとともに、
二値画像データであればコントラストの強調を行わない
ことを構成としてある。
Further, according to a tenth aspect of the present invention, in the image processing apparatus according to the first to ninth aspects, the binary image data is determined based on the luminance distribution.
In the case of binary image data, contrast enhancement is not performed.

【0030】二値画像については実質的な意味での輝度
分布はないといえるので、輝度分布から二値画像データ
を判定したらコントラストの強調は行わないようにして
いる。
Since it can be said that there is no substantial luminance distribution in the binary image, the contrast is not enhanced when the binary image data is determined from the luminance distribution.

【0031】二値画像データはある色を持ったものでも
あり得るため、その色の有りと無しに対応する二つの輝
度となりうる。その色の輝度か否かを判定することも可
能であるが、それを示唆する情報がない場合に対応し、
請求項11にかかる発明は、上記請求項10に記載の画
像処理装置において、再現可能な範囲内の両端に輝度分
布が集中しているときに白黒の二値画像データであると
判断することを構成としてある。
Since the binary image data can have a certain color, it can have two luminances corresponding to the presence or absence of the color. It is possible to determine whether or not it is the luminance of the color, but in the case where there is no information suggesting that,
According to an eleventh aspect of the present invention, in the image processing apparatus according to the tenth aspect, when the luminance distribution is concentrated at both ends within the reproducible range, it is determined that the image data is monochrome binary image data. There is a configuration.

【0032】すなわち、白黒画像については再現可能な
範囲内の両端に輝度分布が集中しているといえ、判断可
能となる。
That is, for a black-and-white image, it can be said that the luminance distribution is concentrated at both ends within the reproducible range, and the determination can be made.

【0033】さらに、請求項12にかかる発明は、上記
請求項1〜請求項11に記載の画像処理装置において、
突出する輝度分布に基づいて画像データの枠部を判定す
るとともに、枠部があれば枠部のデータについてコント
ラストの強調に利用しない構成としてある。
Further, according to a twelfth aspect of the present invention, in the image processing apparatus according to the first to eleventh aspects,
The frame portion of the image data is determined based on the prominent luminance distribution, and if there is a frame portion, the data of the frame portion is not used for enhancing the contrast.

【0034】画像を処理する場合に頻繁に起こり得るの
は枠を持っていることであり、単色の枠として存在すれ
ば当然にその色に対応する輝度分布だけが突出する。従
って、かかる突出した輝度分布をもってして強調の判断
の基準とすれば有効な判断ができなくなり得るから、枠
部と判断してコントラストの強調に利用しない。
When an image is processed, it often happens that the image has a frame. If the image exists as a single-color frame, only the luminance distribution corresponding to the color is naturally prominent. Therefore, if such a prominent luminance distribution is used as a standard for judging the enhancement, it may not be possible to make an effective judgment. Therefore, the frame is judged to be a frame portion and is not used for enhancing the contrast.

【0035】さらに、その一例として、請求項13にか
かる発明は、上記請求項12に記載の画像処理装置にお
いて、再現可能な範囲内での端部に集中している輝度分
布が枠部であると判定することを構成としてある。
Further, as an example, in the invention according to claim 13, in the image processing apparatus according to claim 12, the luminance distribution concentrated on the edge within the reproducible range is the frame portion. Is determined.

【0036】白枠あるいは黒枠は頻繁にあり採用される
し、トリミングの結果によっても生じ得るものであり、
再現可能な範囲内での端部に該当する。従って、この端
部に集中している輝度分布を枠部と判定する。
A white frame or a black frame is frequently used and employed, and may also be generated as a result of trimming.
It corresponds to the end within the reproducible range. Therefore, the luminance distribution concentrated at this end is determined as the frame.

【0037】ところで、請求項14にかかる発明は、上
記請求項1〜請求項13に記載の画像処理装置におい
て、画像データが自然画でない場合にコントラストの強
調を行わない構成としてある。
According to a fourteenth aspect of the present invention, in the image processing apparatus of the first to thirteenth aspects, the contrast is not enhanced when the image data is not a natural image.

【0038】コントラストの幅の狭さが問題となりやす
いのは写真のような自然画であり、ビジネスグラフのよ
うなものでは殆ど必要が無いと言える。逆に、ビジネス
グラフのようなものについて手を加えることが作り手の
イメージと異ならせる結果になりかねない。従って、こ
のような自然画の場合にだけ輝度分布を拡大するように
している。
It is natural images such as photographs that narrow contrast is likely to cause a problem, and it can be said that such images are hardly necessary in business graphs. Conversely, tweaking things like business graphs can result in a different image from the creator. Therefore, the luminance distribution is expanded only in the case of such a natural image.

【0039】自然画か否かの判断の一例として、請求項
15にかかる発明は、上記請求項14に記載の画像処理
装置において、輝度分布がスペクトル状に存在する場合
に上記画像データが自然画でないと判定する自然画判定
手段を備えることを構成としてある。
As an example of the determination as to whether or not the image data is a natural image, in the image processing apparatus according to the present invention, when the luminance distribution exists in a spectral form, the image data It is configured to include a natural image determination unit that determines that the image is not the same.

【0040】自然画の特徴として輝度分布が滑らかに幅
を持つことが言える。従って、輝度分布が線スペクトル
状に表れていれば自然画でないと判断して概ね差し支え
ない。上記のように構成した請求項15にかかる発明に
おいては、自然画判定手段が輝度分布の状態を判定し、
線スペクトル状に存在する場合に画像データが自然画で
ないと判定し、これにより輝度分布の拡大が行われなく
なる。
As a feature of a natural image, it can be said that the luminance distribution has a smooth width. Therefore, if the luminance distribution appears in the form of a line spectrum, it is generally safe to judge that the image is not a natural image. In the invention according to claim 15 configured as described above, the natural image determining means determines the state of the luminance distribution,
If the image data exists in the form of a line spectrum, it is determined that the image data is not a natural image, so that the luminance distribution is not enlarged.

【0041】さらに、請求項16にかかる発明は、ドッ
トマトリクス状の画像データにおける各画素単位の輝度
相当値について、同輝度相当値を入力して所定の変換処
理を施して出力することにより、入力と出力との関係で
コントラストを強調せしめる変換を行なうにあたり、上
記画像データにおける輝度分布を求めて同輝度分布の広
がり量を算出し、かかる広がり量に基づいて分布密度の
大きい範囲に多くの階調数を与えつつ分布密度の小さい
範囲に少ない階調数を割り当てる構成としてある。
Further, according to the present invention, for the luminance equivalent value for each pixel in the dot matrix image data, the same luminance equivalent value is input, subjected to a predetermined conversion process, and output, whereby the input is achieved. In performing the conversion for enhancing the contrast based on the relationship between the image data and the output, the luminance distribution in the image data is obtained, and the spread amount of the luminance distribution is calculated. The configuration is such that a small number of gradations is assigned to a range with a small distribution density while giving a number.

【0042】すなわち、必ずしも実体のある装置に限ら
ず、その方法としても有効であることに相違はない。
That is, there is no difference that the present invention is not necessarily limited to a substantial device but is also effective as a method.

【0043】ところで、このような画像処理装置は単独
で存在する場合もあるし、ある機器に組み込まれた状態
で利用されることもあるなど、発明の思想としては、各
種の態様を含むものである。また、ソフトウェアであっ
たりハードウェアであったりするなど、適宜、変更可能
である。
By the way, such an image processing apparatus may exist alone or may be used in a state of being incorporated in a certain device. The idea of the invention includes various modes. In addition, it can be changed as appropriate, such as software or hardware.

【0044】その一例として、入力されるドットマトリ
クス状の画像データに基づいて印刷インクに対応した画
像データに変換し、所定のカラープリンタに印刷せしめ
るプリンタドライバにおいても、画像データにおける各
画素単位の輝度相当値に基づいて輝度分布を求めつつ同
輝度分布の広がり量を算出し、かかる広がり量に基づい
て分布密度の大きい範囲に多くの階調数を与えつつ分布
密度の小さい範囲に少ない階調数を割り当てる対応関係
となるように、入力と出力と間で変換処理を施してコン
トラストを強調せしめる構成とすることができる。
As one example, a printer driver that converts input dot matrix image data into image data corresponding to printing ink and prints the image data on a predetermined color printer is also used for each pixel in the image data. The spread amount of the luminance distribution is calculated while obtaining the luminance distribution based on the equivalent value, and based on the spread amount, a large number of gradations are given to a range where the distribution density is large and a small number of gradations are given to a range where the distribution density is small. Can be configured so as to enhance the contrast by performing a conversion process between the input and the output so that the correspondence is assigned.

【0045】すなわち、プリンタドライバは入力された
画像データを印刷インクに対応して変換するが、このと
きに画像データにおける各画素単位の輝度相当値に基づ
いて輝度分布を求めつつ同輝度分布の広がり量を算出
し、かかる広がり量に基づいて分布密度の大きい範囲に
多くの階調数を与えつつ分布密度の小さい範囲に少ない
階調数を割り当てる対応関係となるように、入力と出力
と間で変換処理を施してコントラストを強調せしめるよ
うに入力画像を変換し、印刷させる。
That is, the printer driver converts the input image data in accordance with the printing ink. At this time, the printer driver obtains a luminance distribution based on the luminance equivalent value of each pixel in the image data, and expands the luminance distribution. Between the input and the output so that there is a correspondence relationship that calculates the amount and assigns a large number of gradations to a range with a high distribution density while assigning a small number of gradations to a range with a small distribution density based on the spread amount. The input image is converted so as to enhance the contrast by performing a conversion process, and the input image is printed.

【0046】発明の思想の具現化例として画像処理装置
のソフトウェアとなる場合には、かかるソフトウェアを
記録した記録媒体上においても当然に存在し、利用され
るといわざるをえない。むろん、その記録媒体は、磁気
記録媒体であってもよいし光磁気記録媒体であってもよ
いし、今後開発されるいかなる記録媒体においても全く
同様に考えることができる。また、一次複製品、二次複
製品などの複製段階については全く問う余地無く同等で
ある。その他、供給方法として通信回線を利用して行な
う場合でも本発明が利用されていることにはかわりな
い。
When the software of the image processing apparatus is realized as an example of realizing the idea of the present invention, the software naturally exists on a recording medium on which such software is recorded, and it cannot be said that the software is used. Of course, the recording medium may be a magnetic recording medium or a magneto-optical recording medium, and any recording medium to be developed in the future can be considered in the same manner. Also, the duplication stages of the primary duplicated product, the secondary duplicated product, and the like are equivalent without any question. In addition, the present invention is not limited to the case where the present invention is used even when the supply is performed using a communication line.

【0047】さらに、一部がソフトウェアであって、一
部がハードウェアで実現されている場合においても発明
の思想において全く異なるものはなく、一部を記録媒体
上に記憶しておいて必要に応じて適宜読み込まれるよう
な形態のものとしてあってもよい。さらには、カラーフ
ァクシミリ機やカラーコピー機などの画像処理装置にお
いても適用可能であることはいうまでもない。
Further, even when a part is implemented by software and a part is implemented by hardware, there is no difference in the concept of the invention, and it is necessary to store a part on a recording medium. It may be in a form that is appropriately read in accordance with it. Further, it is needless to say that the present invention can be applied to an image processing apparatus such as a color facsimile machine and a color copier.

【0048】[0048]

【発明の効果】以上説明したように本発明は、輝度分布
の広がり量から自動的にコントラストの強調程度を判断
するため、非熟練者でも容易にコントラストを適正量だ
け強調せしめることが可能な画像処理装置を提供するこ
とができる。
As described above, according to the present invention, the degree of contrast enhancement is automatically determined from the spread amount of the luminance distribution, so that even an unskilled person can easily enhance the contrast by an appropriate amount. A processing device can be provided.

【0049】また、請求項2にかかる発明によれば、よ
く知られている標準偏差に基づいて入出力比を定めるだ
けであり、構成が容易となる。
According to the second aspect of the present invention, the input / output ratio is simply determined based on the well-known standard deviation, and the configuration is simplified.

【0050】さらに、請求項3にかかる発明によれば、
γ補正による変換であるので、構成が容易となる。
Further, according to the third aspect of the present invention,
Since the conversion is performed by the γ correction, the configuration is simplified.

【0051】さらに、請求項4にかかる発明によれば、
輝度分布の概略中心位置を基準とした概略S字カーブの
対応関係で輝度変換することによりコントラストを強調
したい場合に効率よく分散した変換が可能となる。
Further, according to the invention of claim 4,
By performing luminance conversion based on the correspondence relationship of the approximate S-shaped curve with reference to the approximate center position of the luminance distribution, it is possible to perform efficient distributed conversion when it is desired to enhance contrast.

【0052】さらに、請求項5にかかる発明によれば、
変換を容易にすることができる。
Further, according to the invention of claim 5,
Conversion can be facilitated.

【0053】さらに、請求項6にかかる発明によれば、
必要十分な程度の正確さで輝度を容易に求めることがで
きるようになる。
Further, according to the invention according to claim 6,
The luminance can be easily obtained with a necessary and sufficient degree of accuracy.

【0054】さらに、請求項7にかかる発明によれば、
処理量を減らすことができる。
Further, according to the seventh aspect of the present invention,
The processing amount can be reduced.

【0055】さらに、請求項8にかかる発明によれば、
画像の抽出点の偏りを無くして輝度分布が正確になりや
すくなる。
Further, according to the invention of claim 8,
The bias of the extraction points of the image is eliminated, and the luminance distribution is likely to be accurate.

【0056】さらに、請求項9にかかる発明によれば、
コントラストを強調しすぎて画像の雰囲気を変えてしま
わないようにすることができる。
Further, according to the ninth aspect of the present invention,
It is possible to prevent the contrast of the image from being excessively enhanced and changing the atmosphere of the image.

【0057】さらに、請求項10にかかる発明によれ
ば、コントラスト強調の不要な条件を容易に判定して強
調を行わないようにすることができるし、さらに、請求
項11にかかる発明によれば、頻度の多い白黒画像を効
率よく判定することができる。
Further, according to the tenth aspect of the present invention, it is possible to easily determine an unnecessary condition for contrast enhancement so as not to perform the enhancement. Further, according to the eleventh aspect of the present invention, In addition, a frequently-used black and white image can be efficiently determined.

【0058】さらに、請求項12にかかる発明によれ
ば、画像に表れがちな枠部の輝度によって処理が不正確
になるのを防止することができ、さらに、請求項13に
かかる発明によれば、頻度の多い白黒の枠部を容易に判
定することができる。
Further, according to the twelfth aspect of the present invention, it is possible to prevent the processing from becoming inaccurate due to the brightness of the frame portion which tends to appear in the image. The frequently used black and white frame portion can be easily determined.

【0059】さらに、請求項14にかかる発明によれ
ば、コントラストの強調が必要な自然画の場合にだけ行
うようにすることができ、さらに、請求項15にかかる
発明によれば、自然画か否かを容易に判定することがで
きる。
Further, according to the fourteenth aspect of the present invention, it is possible to perform the processing only in the case of a natural image for which contrast enhancement is necessary. Can be easily determined.

【0060】さらに、請求項16にかかる発明によれ
ば、輝度分布の広がり量から自動的にコントラストの強
調程度を判断するため、非熟練者でも容易にコントラス
トを適正量だけ強調せしめることが可能な画像処理方法
を提供することができる。
Further, according to the invention of claim 16, since the degree of contrast enhancement is automatically determined from the spread amount of the luminance distribution, even an unskilled person can easily emphasize the contrast by an appropriate amount. An image processing method can be provided.

【0061】[0061]

【発明の実施の形態】以下、図面にもとづいて本発明の
実施形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0062】図1は、本発明の一実施形態にかかる画像
処理システムをブロック図により示しており、図2は具
体的ハードウェア構成例をブロック図により示してい
る。
FIG. 1 is a block diagram showing an image processing system according to an embodiment of the present invention, and FIG. 2 is a block diagram showing an example of a specific hardware configuration.

【0063】同図において、画像入力装置10は画像を
撮像するなどして画像データを画像処理装置20へ出力
し、同画像処理装置20は所定のコントラスト強調など
の画像処理を行なって画像出力装置30に出力し、同画
像出力装置30はコントラストを強調された画像を表示
する。
In the figure, an image input device 10 outputs image data to an image processing device 20 by taking an image or the like, and the image processing device 20 performs image processing such as predetermined contrast enhancement and performs image processing. 30 and the image output device 30 displays an image with enhanced contrast.

【0064】ここにおいて、画像入力装置10の具体例
はスキャナ11やデジタルスチルカメラ12あるいはビ
デオカメラ14などが該当し、画像処理装置20の具体
例はコンピュータ21とハードディスク22などからな
るコンピュータシステムが該当し、画像出力装置30の
具体例はプリンタ31やディスプレイ32等が該当す
る。むろん、これら以外にもカラーコピー機やカラーフ
ァクシミリ機などにも適用可能である。
Here, a specific example of the image input device 10 corresponds to the scanner 11, the digital still camera 12, or the video camera 14, and a specific example of the image processing device 20 corresponds to a computer system including the computer 21 and the hard disk 22. A specific example of the image output device 30 corresponds to the printer 31, the display 32, or the like. Of course, other than these, the present invention can be applied to a color copying machine, a color facsimile machine, and the like.

【0065】本画像処理システムにおいては、コントラ
ストの弱い画像に対して最適なコントラストを与えよう
としているものであるから、画像入力装置10としての
スキャナ11で写真を撮像した画像データであるとか、
デジタルスチルカメラ12で撮影したコントラストの弱
い画像データであるとか、ビデオカメラ14で撮影した
動画画像などが処理の対象となり、画像処理装置20と
してのコンピュータシステムに入力される。なお、ビデ
オカメラ14の入力画像については、演算速度が間に合
わないこともあり得る。そのような場合には演算時間を
要する最初の条件設定を撮影のシーンごとに行ってお
き、撮影中は同じ条件設定のもとで各フレームの画像変
換だけを行なうということによって対処可能である。
In the present image processing system, an image having low contrast is provided with an optimum contrast. Therefore, image data obtained by taking a photograph with the scanner 11 as the image input device 10 may be used.
For example, image data having low contrast captured by the digital still camera 12 or a moving image captured by the video camera 14 is to be processed and input to the computer system as the image processing device 20. The calculation speed of the input image of the video camera 14 may not be enough. In such a case, it is possible to deal with this by setting the first condition that requires a calculation time for each shooting scene and performing only image conversion of each frame under the same condition setting during shooting.

【0066】本画像処理装置20は、少なくとも、輝度
の分布を抽出する輝度分布検出手段と、この検出された
輝度分布に基づいて先ず輝度分布の広がり量を検出する
輝度分布広がり量検出手段と、この広がり量に基づいて
分布密度の大きい範囲に多くの階調数を与えつつ分布密
度の小さい範囲に少ない階調数を割り当てる階調数割当
手段と、割り当てられた輝度の階調に基づいて画像デー
タを変換する画像データ変換手段とを構成する。むろ
ん、本画像処理装置20は、この他にも機種毎による色
の違いを補正する色変換手段であったり、機種毎に対応
した解像度を変換する解像度変換手段などを構成してい
ても構わない。この例では、コンピュータ21はRAM
などを使用しながら、内部のROMやハードディスク2
2に保存されている各画像処理のプログラムを実行して
いく。
The image processing apparatus 20 includes at least a luminance distribution detecting means for extracting a luminance distribution, a luminance distribution spread amount detecting means for first detecting a spread amount of the luminance distribution based on the detected luminance distribution, A tone number assigning means for assigning a large number of tones to a range with a high distribution density and assigning a small number of tones to a range with a small distribution density based on the spread amount; And image data conversion means for converting data. Needless to say, the image processing apparatus 20 may be configured as a color conversion unit that corrects a difference in color between models or a resolution conversion unit that converts a resolution corresponding to each model. . In this example, the computer 21 has a RAM
While using the internal ROM and hard disk 2
2 is executed.

【0067】この画像処理のプログラムの実行結果は後
述するようにコントラストを強調した画像データとして
得られ、得られた画像データに基づいて画像出力装置3
0であるプリンタ31で印刷したり、同じ画像出力装置
30であるディスプレイ32に表示する。なお、この画
像データは、より具体的にはRGB(緑、青、赤)の階
調データとなっており、また、画像は縦方向(heig
ht)と横方向(width)に格子状に並ぶドットマ
トリクスデータとして構成されている。
The execution result of the image processing program is obtained as contrast-enhanced image data as will be described later, and the image output device 3 is executed based on the obtained image data.
The image is printed by the printer 31 which is 0 or displayed on the display 32 which is the same image output device 30. This image data is more specifically RGB (green, blue, red) gradation data, and the image is displayed in the vertical direction (heig).
ht) and dot matrix data arranged in a grid in the horizontal direction (width).

【0068】本実施形態においては、画像の入出力装置
の間にコンピュータシステムを組み込んで画像処理を行
うようにしているが、必ずしもかかるコンピュータシス
テムを必要とする訳ではなく、図3に示すようにデジタ
ルスチルカメラ12a内にコントラストを強調する意味
での画像処理装置を組み込み、変換した画像データを用
いてディスプレイ32aに表示させたりプリンタ31a
に印字させるようなシステムであっても良い。また、図
4に示すように、コンピュータシステムを介することな
く画像データを入力して印刷するプリンタ31bにおい
ては、スキャナ11bやデジタルスチルカメラ12bあ
るいはモデム13b等を介して入力される画像データを
自動的にコントラスト強調するように構成することも可
能である。
In the present embodiment, a computer system is incorporated between image input / output devices to perform image processing. However, such a computer system is not always required, and as shown in FIG. An image processing device for enhancing contrast is incorporated in the digital still camera 12a, and the digital still camera 12a displays the converted image data on the display 32a or the printer 31a.
May be a system that prints the data. As shown in FIG. 4, in a printer 31b that inputs and prints image data without using a computer system, image data input via a scanner 11b, a digital still camera 12b, a modem 13b, or the like is automatically converted. It is also possible to configure so that contrast is enhanced.

【0069】コンピュータ21にて実行する画像処理の
内、輝度分布検出手段と輝度分布広がり量検出手段とに
相当する輝度の分布検出処理を図5に示しており、階調
数割当手段と画像データ変換手段とに相当する輝度変換
処理を図6に示している。
FIG. 5 shows a luminance distribution detecting process corresponding to the luminance distribution detecting means and the luminance distribution spread amount detecting means among the image processing executed by the computer 21. FIG. 6 shows a luminance conversion process corresponding to the conversion means.

【0070】図5は主に輝度の分布検出処理に該当して
おり、まず、この輝度の分布検出処理について説明す
る。
FIG. 5 mainly corresponds to the luminance distribution detection processing. First, the luminance distribution detection processing will be described.

【0071】輝度をいかにして表すかについて説明する
前に、分布対象となる画素について説明する。図5のス
テップS102で示すように対象となる画素を間引く間
引き処理を実行する。図7に示すように、ビットマップ
の画像であれば、縦方向に所定ドットと横方向に所定ド
ットからなる二次元のドットマトリクスとして成り立っ
ており、正確な輝度の分布を求めるのであれば全画素に
ついて輝度を調べる必要がある。しかしながら、この分
布抽出処理は輝度分布の広がり量を求めることを目的と
しており、必ずしも正確である必要はない。従って、あ
る誤差の範囲内となる程度に間引きを行うことが可能で
ある。統計的誤差によれば、サンプル数Nに対する誤差
は概ね1/(N**(1/2))と表せる。ただし、**は
累乗を表している。従って、1%程度の誤差で処理を行
うためにはN=10000となる。
Before explaining how to represent luminance, pixels to be distributed will be described. As shown in step S102 of FIG. 5, a thinning process for thinning out target pixels is executed. As shown in FIG. 7, in the case of a bitmap image, a two-dimensional dot matrix including predetermined dots in the vertical direction and predetermined dots in the horizontal direction is established. It is necessary to check the brightness for. However, this distribution extraction processing is aimed at obtaining the spread amount of the luminance distribution, and does not necessarily need to be accurate. Therefore, it is possible to perform the thinning to the extent that it falls within a certain error range. According to the statistical error, the error with respect to the number N of samples can be approximately expressed as 1 / (N ** (1/2)). Here, ** indicates a power. Therefore, in order to perform processing with an error of about 1%, N = 10000.

【0072】ここにおいて、図7に示すビットマップ画
面は(width)×(height)の画素数とな
り、サンプリング周期ratioは、 ratio=min(width,height)/A+1 …(1) とする。このmin(width,height)はw
idthとheightのいずれか小さい方であり、A
は定数とする。また、ここでいうサンプリング周期ra
tioは何画素ごとにサンプリングするかを表してお
り、図8の○印の画素はサンプリング周期ratio=
2の場合を示している。すなわち、縦方向及び横方向に
二画素ごとに一画素のサンプリングであり、一画素おき
にサンプリングしている。A=200としたときの1ラ
イン中のサンプリング画素数は図9に示すようになる。
Here, the bitmap screen shown in FIG. 7 has the number of pixels of (width) × (height), and the sampling period ratio is ratio = min (width, height) / A + 1 (1). This min (width, height) is w
the smaller of height and height, A
Is a constant. In addition, the sampling period ra
tio indicates how many pixels are sampled. Pixels marked with a circle in FIG.
2 is shown. In other words, one pixel is sampled every two pixels in the vertical direction and the horizontal direction, and sampling is performed every other pixel. When A = 200, the number of sampling pixels in one line is as shown in FIG.

【0073】同図から明らかなように、サンプリングし
ないことになるサンプリング周期ratio=1の場合
を除いて、200画素以上の幅があるときには最低でも
サンプル数は100画素以上となることが分かる。従っ
て、縦方向と横方向について200画素以上の場合には
(100画素)×(100画素)=(10000画素)
が確保され、誤差を1%以下にできる。
As can be seen from the figure, except for the case where the sampling period ratio = 1 where sampling is not performed, when the width is 200 pixels or more, the number of samples is at least 100 pixels or more. Therefore, when the number of pixels is 200 or more in the vertical and horizontal directions, (100 pixels) × (100 pixels) = (10000 pixels)
Is ensured, and the error can be reduced to 1% or less.

【0074】ここにおいてmin(width,hei
ght)を基準としているのは次のような理由による。
例えば、図10(a)に示すビットマップ画像のよう
に、width>>heightであるとすると、長い
方のwidthでサンプリング周期ratioを決めて
しまった場合には、同図(b)に示すように、縦方向に
は上端と下端の2ラインしか画素を抽出されないといっ
たことが起こりかねない。しかしながら、min(wi
dth,height)として、小さい方に基づいてサ
ンプリング周期ratioを決めるようにすれば同図
(c)に示すように少ない方の縦方向においても中間部
を含むような間引きを行うことができるようになる。
Here, min (width, hei)
(ght) is based on the following reason.
For example, assuming width >> height as in the bitmap image shown in FIG. 10A, if the sampling cycle ratio is determined by the longer width, as shown in FIG. In addition, it may happen that only two lines, the upper and lower lines, are extracted in the vertical direction. However, min (wi
(dth, height), if the sampling period ratio is determined based on the smaller one, it is possible to perform the thinning including the intermediate part even in the smaller vertical direction as shown in FIG. Become.

【0075】なお、この例では、縦方向と横方向の画素
について正確なサンプリング周期で間引きを行うように
している。これは、逐次入力される画素について間引き
しながら処理する場合に好適である。しかし、全画素が
入力されている場合には縦方向や横方向についてランダ
ムに座標を指定して画素を選択するようにしても良い。
このようにすれば、10000画素というような必要最
低限の画素数が決まっている場合に10000画素とな
るまでランダムに抽出する処理を繰り返し、10000
画素となった時点で抽出を止めればよくなる。
In this example, thinning is performed at an accurate sampling cycle for pixels in the vertical and horizontal directions. This is suitable when processing is performed while thinning out sequentially input pixels. However, when all pixels have been input, pixels may be selected by randomly designating coordinates in the vertical direction and the horizontal direction.
In this way, when the minimum required number of pixels, such as 10,000 pixels, is determined, the process of randomly extracting until 10,000 pixels is repeated is repeated.
It suffices to stop the extraction at the time of the pixel.

【0076】このように選択した画素についての画素デ
ータがその成分要素として輝度を持っていればその輝度
値を用いて分布を求めることが可能である。しかしなが
ら、輝度値が直接の成分値となっていない画像データの
場合でも、間接的には輝度を表す成分値を備えている。
従って、輝度値が直接の成分値となっていない表色空間
から輝度値が直接の成分値となっている表色空間への変
換を行えば輝度値を得ることができる。
If the pixel data of the selected pixel has a luminance as a component element, the distribution can be obtained by using the luminance value. However, even in the case of image data whose luminance value is not a direct component value, the image data has a component value representing luminance indirectly.
Therefore, a luminance value can be obtained by converting from a color space in which the luminance value is not a direct component value to a color space in which the luminance value is a direct component value.

【0077】このような異なる表色空間の間での色変換
は変換式によって一義的に定まるものではなく、それぞ
れの成分値を座標とする色空間について相互に対応関係
を求めておき、この対応関係を記憶した色変換テーブル
を参照して逐次変換する必要がある。テーブルとする関
係上、成分値は階調値として表され、三次元の座標軸を
備えている256階調の場合には、約1670万個(2
56×256×256)の要素の色変換テーブルを持た
なければならない。効率的な記憶資源の利用を考えた結
果、すべての座標値についての対応関係を用意しておく
のではなく、通常は適当なとびとびの格子点について対
応関係を用意しておき、補間演算を併用するようにして
いる。この補間演算はいくつかの乗算や加算を経て可能
となるものであるため、演算処理量は膨大となってく
る。
The color conversion between these different color spaces is not uniquely determined by the conversion formula, but a correspondence is obtained between the color spaces having the respective component values as coordinates. It is necessary to sequentially perform conversion by referring to a color conversion table that stores the relationship. In relation to a table, the component values are represented as gradation values. In the case of 256 gradations having three-dimensional coordinate axes, about 16.7 million (2
It must have a color conversion table of 56 × 256 × 256) elements. As a result of considering efficient use of storage resources, instead of preparing correspondences for all coordinate values, usually prepare correspondences for appropriate discrete grid points and use interpolation together I am trying to do it. Since this interpolation calculation can be performed through several multiplications and additions, the amount of calculation processing becomes enormous.

【0078】すなわち、フルサイズの色変換テーブルを
使用するのであれば処理量としては少なくなるもののテ
ーブルサイズが非現実的な問題となり、テーブルサイズ
を現実的なサイズにすれば演算処理量が非現実的となる
ことが多い。
That is, if a full-size color conversion table is used, the amount of processing is reduced, but the table size becomes an unrealistic problem. Often becomes the target.

【0079】このような状況に鑑み、本実施形態におい
ては、テレビジョンなどの場合に利用されているよう
に、RGBの三原色から輝度を求める次式の変換式を採
用している。すなわち、P点での輝度yp についてはR
GBの成分値(Rp,Gp,Bp )から、 yp=0.30Rp+0.59Gp+0.11Bp …(2) とする。このようにすれば、三回の乗算と二回の加算だ
けで輝度値を求めることができるようになる。そして、
全階調分に相当する配列の変数領域を利用して度数分布
を求める。
In view of such a situation, the present embodiment employs the following conversion formula for obtaining luminance from the three primary colors of RGB as used in a television or the like. That is, the luminance yp at the point P is R
From the GB component values (Rp, Gp, Bp), yp = 0.30Rp + 0.59Gp + 0.11Bp (2) In this way, a luminance value can be obtained only by three multiplications and two additions. And
A frequency distribution is obtained using a variable area of an array corresponding to all gradations.

【0080】本実施形態においては、RGBの表色空間
を対象としている結果、このような変換式を採用してい
るが、その背景には各成分値が色の明るさを示している
ので、それぞれの成分値を単独で見た場合に輝度に線形
に対応しているという性質がある。従って、よりおおざ
っぱに言えばそれぞれの加算割合を考慮することなく単
に yp=(Rp+Gp+Bp)/3 …(3) というように簡略化することも不可能ではないし、さら
には、 yp=Gp …(4) というように、(3)式においても最も割合の大きい緑
の成分値を輝度値としてしまうことも可能である。
In the present embodiment, as a result of targeting the RGB color space, such a conversion formula is employed. However, since each component value indicates the brightness of the color in the background, There is a property that when each component value is viewed independently, it linearly corresponds to luminance. Therefore, more simply, it is not possible to simply simplify to yp = (Rp + Gp + Bp) / 3 (3) without considering each addition ratio, and furthermore, yp = Gp (4) As described above, it is also possible to use the green component value having the largest ratio in the equation (3) as the luminance value.

【0081】間引き処理では、選択した画素についてR
GBの画像データから同時に輝度を求めて分布をとる。
最終的にはステップS114にてこの分布に基づいてそ
の広がり量に対応する標準偏差を求めることになるが、
その前に考慮しておく事項がある。
In the thinning-out process, R
The luminance is simultaneously obtained from the GB image data to obtain a distribution.
Finally, in step S114, a standard deviation corresponding to the spread amount is obtained based on this distribution.
Before that, there is something to consider.

【0082】一つ目は画像が白黒画像のような二値画像
である場合である。白黒画像を含めて二値画像であれば
コントラストの強調という概念は不適切である。図11
に示すような白黒画像があったとすると、この画像に対
する輝度分布は図12に示すように階調数の割り当て範
囲内で両端に集中する。それも、基本的には階調「0」
と階調「255」に集中する。
The first is a case where the image is a binary image such as a black and white image. For a binary image including a black-and-white image, the concept of enhancing contrast is inappropriate. FIG.
Assuming that there is a black-and-white image as shown in FIG. 12, the luminance distribution for this image is concentrated at both ends within the range of assignment of the number of gradations as shown in FIG. Basically, the gradation is "0"
And the gradation “255”.

【0083】従って、ステップS104で白黒チェック
を行う場合には、階調「0」と階調「255」の画素数
の和が、間引いて選択した画素数と一致するか否かで判
断できる。そして、白黒画像の場合であれば以下の処理
を実行することなく処理を中断するためにステップS1
06にて非拡大処理を実行する。本実施形態においては
分布抽出処理と輝度変換処理とを大きく分けているの
で、この非拡大処理では後段の輝度変換処理も実行しな
いようなフラグを立てて当該分布抽出処理を終了してい
る。
Therefore, when performing a black-and-white check in step S104, it can be determined whether or not the sum of the number of pixels of the gradation "0" and the gradation "255" matches the number of pixels selected by thinning. Then, in the case of a monochrome image, step S1 is executed to interrupt the processing without executing the following processing.
At 06, non-enlargement processing is executed. In the present embodiment, since the distribution extraction processing and the luminance conversion processing are largely divided, in the non-enlargement processing, a flag is set so that the subsequent luminance conversion processing is not executed, and the distribution extraction processing ends.

【0084】二値データは白黒だけに限らず、色の付い
た二値データもあり得る。このような場合も同様にコン
トラストの強調を図る処理は不要であり、分布状態を調
べて二つの値(一方は概ね「0」)にしか分布が集中し
ていなければ二値データとして処理の中断を図ればよ
い。
The binary data is not limited to black and white, but may be colored binary data. In such a case as well, it is not necessary to perform processing for enhancing the contrast. If the distribution state is examined and the distribution is concentrated only on two values (one is approximately “0”), the processing is interrupted as binary data. What should I do?

【0085】二つ目は画像がビジネスグラフのようなも
のか写真のような自然画であるか否かを考慮する。自然
画においてはコントラストの強調という処理が要求され
る場合があるものの、ビジネスグラフであるとか絵画の
ようなものではコントラストの強調を図らない方が好ま
れる場合が多い。従って、ステップS108では自然画
か否かのチェックを行う。
The second is to consider whether the image is like a business graph or a natural image such as a photograph. Although a process of enhancing contrast may be required in a natural image, it is often preferred not to enhance contrast in a business graph or a painting. Therefore, in step S108, it is checked whether the image is a natural image.

【0086】自然画では陰影を含めて色数が極めて多い
がビジネスグラフやドロー系などのある種の絵画では色
数が限られていることが多い。従って、色数が少なけれ
ば自然画ではないと判断することが可能である。色数を
正確に判断しようとすれば上述したように1670万色
のうちの何色を使用しているかを判別する必要がある
が、現実的ではない。一方、ビジネスグラフのような極
めて色数が少ない場合には異なる色であって同じ輝度に
なる確率は低い。すなわち、輝度によって概ねの色数を
判断できる。色数が少なければ輝度の分布もまばらであ
り、ビジネスグラフのようなものでは線スペクトル状に
表れる。このようなことから、ステップS108では2
56階調の輝度のうち分布数が「0」でない輝度値がい
くつ表れているかカウントする。そして、概ね1/4と
なる「64」色(階調)以下であれば自然画でないと判
断し、二値データの場合と同様、ステップS106にて
非拡大処理を実行する。むろん、しきい値となる「6
4」色(階調)以下か否かについては適宜変更可能であ
る。
[0086] A natural image has a very large number of colors including shadows, but a certain number of paintings such as business graphs and draw systems often have a limited number of colors. Therefore, if the number of colors is small, it can be determined that the image is not a natural image. To accurately determine the number of colors, it is necessary to determine how many of the 16.7 million colors are used as described above, but this is not practical. On the other hand, when the number of colors is extremely small, as in a business graph, the probability of different colors and the same luminance is low. That is, the approximate number of colors can be determined based on the luminance. If the number of colors is small, the distribution of luminance is sparse, and in a business graph, it appears in a linear spectrum. Therefore, in step S108, 2
The number of luminance values whose distribution number is not “0” among the 56 gradation luminances is counted. Then, if it is equal to or less than the "64" color (gradation) which is approximately 1/4, it is determined that the image is not a natural image, and the non-enlargement process is executed in step S106, as in the case of binary data. Of course, the threshold "6
Whether or not the color is equal to or less than the "4" color (gradation) can be appropriately changed.

【0087】また、分布が線スペクトル状か否かは分布
数が「0」でない輝度値の隣接割合で判断することも可
能である。すなわち、分布数が「0」でない輝度値であ
って隣接する輝度値に分布数があるか否かを判断する。
隣接する二つの輝度値のうち少なくとも一方で隣接して
いれば何もせず、両方で隣接していない場合にカウント
を行い、その結果、「0」でない輝度値の数とカウント
値との割合で判断すればよい。例えば、「0」でない輝
度値の数が「64」であって、隣接しないものの数が
「64」であれば線スペクトル状に分布していることが
分かる。
It is also possible to determine whether or not the distribution is in the form of a linear spectrum based on the adjacency ratio of luminance values whose distribution number is not “0”. That is, it is determined whether or not the number of distributions is a luminance value other than “0” and the number of distributions is adjacent luminance values.
If at least one of the two adjacent luminance values is adjacent, nothing is performed, and if both are not adjacent, counting is performed, and as a result, the ratio between the number of non-zero luminance values and the count value Judge it. For example, if the number of luminance values other than “0” is “64” and the number of non-adjacent luminance values is “64”, it is understood that the luminance values are distributed in a linear spectrum.

【0088】さらに、オペレーティングシステムを介し
て画像処理プログラムが実行されているような場合に
は、画像ファイルの拡張子で判断することも可能であ
る。ビットマップファイルのうち、特に写真画像などで
はファイル圧縮がなされ、その圧縮方法を表すために暗
示の拡張子が利用されることが多い。例えば、「JP
G」という拡張子であれば、JPEGフォーマットで圧
縮されていることが分かる。オペレーティングシステム
がファイル名を管理していることから、プリンタドライ
バなどの側からオペレーティングシステムに問い合わせ
を出せば、同ファイルの拡張子が回答されることになる
ため、その拡張子に基づいて自然画であると判断してコ
ントラストの強調を行うようにすればよい。また、「X
LS」というようなビジネスグラフに特有の拡張子であ
ればコントラストの強調を行わないと判断することもで
きる。
Further, when the image processing program is executed via the operating system, the determination can be made by the extension of the image file. Of the bitmap files, especially for photographic images and the like, file compression is performed, and an implied extension is often used to indicate the compression method. For example, "JP
If the extension is "G", it is understood that the file is compressed in the JPEG format. Since the operating system manages the file name, if the printer driver etc. sends an inquiry to the operating system, the extension of the file will be answered. It may be determined that there is, and the contrast may be enhanced. Also, "X
If the extension is unique to the business graph such as “LS”, it can be determined that contrast enhancement is not performed.

【0089】三つ目に考慮することは、図13に示すよ
うに画像の周りに枠部があるか否かである。このような
枠部が白色または黒色であれば、その輝度分布は図14
に示すように、階調数の割り当て範囲内における両端に
線スペクトル状に表れるとともに、内部の自然画に対応
して両端以外の内側に滑らかな輝度分布としても表れ
る。
The third consideration is whether there is a frame around the image as shown in FIG. If such a frame portion is white or black, the luminance distribution is as shown in FIG.
As shown in (1), a linear luminance profile appears at both ends within the range of the number of gradations, and a smooth luminance distribution also appears inside other than both ends corresponding to the internal natural image.

【0090】むろん、枠部を輝度分布の考慮に入れない
方が適切であるため、ステップS108の枠部のチェッ
クでは階調「0」と階調「255」の画素数の和が十分
に大きく、かつ、間引いて選択した画素数とは一致しな
いかを判断し、肯定的ならば枠部があると判定してステ
ップS112にて枠部処理を実施する。この枠部処理で
は、枠部を無視するために輝度分布のうち階調「0」と
階調「255」の画素数を「0」にセットする。これに
より、以下の処理では枠部がないものと同様に扱うこと
ができる。
Needless to say, since it is more appropriate not to take the frame portion into consideration of the luminance distribution, the sum of the number of pixels of the gradation “0” and the gradation “255” is sufficiently large in the check of the frame portion in step S108. Then, it is determined whether the number of pixels does not match the number of pixels selected by thinning out, and if affirmative, it is determined that there is a frame portion, and the frame portion process is performed in step S112. In the frame processing, the number of pixels of the gradation “0” and the gradation “255” in the luminance distribution is set to “0” in order to ignore the frame. As a result, in the following processing, it can be handled in the same manner as the case without the frame portion.

【0091】この例では白色または黒色の枠部を対象と
しているが、特定の色の枠がある場合も考えられる。こ
のような場合、輝度分布が描く本来の滑らかなカーブの
中で突出する線スペクトル状のものが表れる。従って、
隣接する輝度値の間で大きく差が生じている線スペクト
ル状のものについては枠部として考えて輝度分布の対象
としないようにすればよい。この場合、枠部以外でその
色を使用していることがあり得るので、両隣の輝度値の
平均を割り当てるようにしても良い。
In this example, a white or black frame portion is targeted, but a frame of a specific color may be present. In such a case, a line spectrum shape protruding from the original smooth curve drawn by the luminance distribution appears. Therefore,
A line spectrum having a large difference between adjacent luminance values may be considered as a frame part and not subjected to luminance distribution. In this case, since the color may be used in a portion other than the frame portion, the average of the brightness values on both sides may be assigned.

【0092】以上のような考慮を経た上で、コントラス
トの強調を行う場合にはステップS114で輝度分布の
標準偏差を求めるとともに、後段の輝度変換処理のため
にメジアンyMeを求めておく。標準偏差については二つ
の考え方があるが本実施形態においては、次式に基づい
て演算する。
In consideration of the above considerations, when enhancing the contrast, the standard deviation of the luminance distribution is obtained in step S114, and the median yMe is obtained for the luminance conversion processing in the subsequent stage. Although there are two ways of thinking about the standard deviation, in the present embodiment, it is calculated based on the following equation.

【0093】[0093]

【数1】 (Equation 1)

【0094】標準偏差は輝度分布の広がり量に対応する
ものであるが、広がり量を表す意味では分散を利用して
もよい。
Although the standard deviation corresponds to the spread of the luminance distribution, variance may be used to represent the spread.

【0095】以上の処理が分布検出処理に該当し、次
に、このようにして求めた輝度分布の広がり量である標
準偏差σに基づいて画像データの変換を行なう輝度変換
処理について説明する。なお、上述したようにステップ
S106にて非拡大処理を実行した場合には、ステップ
S202にて所定のフラグを参照してそれを検知し、以
下の処理を行うことなく当該画像処理を終了する。
The above processing corresponds to the distribution detection processing. Next, the luminance conversion processing for converting the image data based on the standard deviation σ which is the spread amount of the luminance distribution obtained in this manner will be described. When the non-enlargement process is performed in step S106 as described above, the process refers to a predetermined flag in step S202, detects the flag, and ends the image processing without performing the following process.

【0096】輝度変換処理では、輝度分布の広がり量に
基づいて分布密度の大きい範囲に多くの階調数を与えつ
つ分布密度の小さい範囲に少ない階調数を割り当てる。
ここで、分布密度の大きい範囲に多くの階調数を与えつ
つ分布密度の小さい範囲に少ない階調数を割り当てるパ
ターンについて説明する。変換前の輝度y(入力)と変
換先の輝度Y(出力)が、 Y=y …(6) というように正比例の関係にある場合、図15に示すよ
うに、再現可能範囲内の中央部分を基準として、変換前
に割り当てられている階調範囲r0と変換後に割り当て
られる階調範囲R0 は一致している。しかしながら、図
16に示すように入出力の対応関係がいわゆるS字カー
ブとなると変換前に割り当てられている階調範囲r0 に
対して変換後に割り当てられる階調範囲R1 ,R2 は大
きくなり、割り当てられた階調数が多くなったことにな
る。一方、入力における低輝度側と高輝度側における階
調範囲r0を外れた範囲についていえば、変換後に割り
当てられる階調範囲は少なくなったことになる。
In the luminance conversion process, a small number of gradations is assigned to a range with a small distribution density while giving a large number of gradations to a range with a large distribution density based on the spread amount of the luminance distribution.
Here, a description will be given of a pattern in which a large number of gradations are assigned to a range with a high distribution density and a small number of gradations are assigned to a range with a small distribution density. When the luminance y (input) before the conversion and the luminance Y (output) at the conversion destination are in a directly proportional relationship as Y = y (6), as shown in FIG. , The gradation range r0 assigned before the conversion and the gradation range R0 assigned after the conversion match. However, as shown in FIG. 16, when the input / output correspondence becomes a so-called S-shaped curve, the gradation ranges R1 and R2 assigned after the conversion become larger than the gradation range r0 assigned before the conversion. That is, the number of gray levels increased. On the other hand, regarding the range outside the gradation range r0 on the low-luminance side and the high-luminance side in the input, the gradation range assigned after conversion is reduced.

【0097】すなわち、このような対応関係こそ、分布
密度の大きい範囲に多くの階調数を与えつつ分布密度の
小さい範囲に少ない階調数を割り当てることを意味す
る。ここにおいて、この対応関係を実現する具体的な割
り当て手法は各種のものが可能である。図17は階調範
囲の中心位置ymid から高輝度側の階調範囲上端までの
領域に対してγ<1のγ補正を施したものであり、変換
前の中心位置ymid から上方側四分点yq3までの階調範
囲rに対する変換後の階調範囲Rは拡大している。同様
に図18は階調範囲の中心位置ymid から低輝度側の階
調範囲下端までの領域に対してγ>1のγ補正を施した
ものであり、変換前の中心位置ymid から下方側四分点
yq1までの階調範囲rに対する変換後の階調範囲Rは拡
大している。
That is, such a correspondence means that a small number of gradations is assigned to a range where the distribution density is small while a large number of gradations is given to a range where the distribution density is large. Here, various specific assignment methods for realizing this correspondence relationship are possible. FIG. 17 shows the result of performing γ correction of γ <1 for the region from the center position ymid of the gradation range to the upper end of the gradation range on the high luminance side, and the upper quadrant from the center position ymid before conversion. The converted gradation range R for the gradation range r up to yq3 is expanded. Similarly, FIG. 18 shows a region from the center position ymid of the gradation range to the lower end of the gradation range on the low luminance side where γ correction of γ> 1 is performed. The converted gradation range R for the gradation range r up to the dividing point yq1 is expanded.

【0098】一方、これらの場合において、変換前の階
調範囲rに対する変換後の階調範囲Rの比はγの与え方
によって変化してくる。本実施形態においては、かかる
比を輝度分布の広がり量である標準偏差σに基づいて制
御している。すなわち、階調範囲の中心位置ymid を
「128」として、この中心位置ymid 以下ではγ1を
与えるとともに、中心位置ymid より大きい範囲ではγ
2を与えるものとすると、y≦128では、 γ1=(σstd_limit/σ)**a …(7) y>128では、 γ2=(σ/σstd_limit)**a …(8) とし、ステップS204にてこれらのパラメータ演算を
実行する。なお、上述したようにこのパラメータ演算こ
そ階調数割当手段を構成する。ここにおいて、σstd_li
mitとaは変換結果を考慮して実験的に求めて与えたパ
ラメータであり、本実施形態においてはσstd_limitを
「128」とするとともにaを「0.1」としている。
標準偏差σは概して「128」よりも小さな値となるか
らこれらの関係式では標準偏差σが大きいと、γ2とγ
1はそれぞれ「1」に近づくことになり、S字カーブの
傾斜は緩やかになる。これは、広がり量が大きいときに
中心位置ymid を中心とする階調範囲rに対して変換先
の階調範囲Rはさほど広くならないことを意味してお
り、より具体的には画像データの輝度が広く分布してい
るときには輝度範囲を拡大するような変換を行わないこ
とを意味する。これに対して、標準偏差σが小さいと、
γ2とγ1はそれぞれ「1」から離れることになり、S
字カーブの傾斜は急になる。これは、広がり量が小さい
ときに中心位置ymid を中心とする階調範囲rに対して
変換先の階調範囲Rが広く拡大されることを意味してお
り、より具体的には画像データの輝度が狭い範囲にしか
分布していないときには輝度範囲を拡大させる変換を行
なうことを意味する。
On the other hand, in these cases, the ratio of the converted gradation range R to the pre-conversion gradation range r changes depending on how γ is given. In the present embodiment, the ratio is controlled based on the standard deviation σ, which is the spread amount of the luminance distribution. That is, assuming that the center position ymid of the gradation range is “128”, γ1 is given below this center position ymid, and γ1 is given above the center position ymid.
When y ≦ 128, γ1 = (σstd_limit / σ) ** a (7) When y> 128, γ2 = (σ / σstd_limit) ** a (8), and in step S204 To perform these parameter calculations. Note that, as described above, this parameter calculation constitutes the number-of-gradations assigning means. Where σstd_li
mit and a are parameters obtained experimentally in consideration of the conversion result. In the present embodiment, σstd_limit is set to “128” and a is set to “0.1”.
Since the standard deviation σ is generally smaller than “128”, if the standard deviation σ is large in these relational expressions, γ2 and γ
1 each approaches “1”, and the slope of the S-shaped curve becomes gentle. This means that when the spread amount is large, the gradation range R of the conversion destination does not become so large with respect to the gradation range r centered on the center position ymid, and more specifically, the luminance of the image data. Is widely distributed, it means that conversion for expanding the luminance range is not performed. On the other hand, if the standard deviation σ is small,
γ2 and γ1 are respectively apart from “1”, and S
The slope of the curve becomes steep. This means that, when the spread amount is small, the gradation range R of the conversion destination is expanded widely with respect to the gradation range r centered on the center position ymid. When the luminance is distributed only in a narrow range, it means that conversion for expanding the luminance range is performed.

【0099】この例のように、階調範囲を低輝度側と高
輝度側との二つに分けるとともにそれぞれにγ補正を掛
けるにあたり、γが互いに逆数となる関係を与えるよう
にすると、低輝度側と高輝度側との接続点で滑らかに接
続することになり、良好なS字カーブを与えることがで
きる。むろん、低輝度側と高輝度側とによってγ補正の
極性を変えること自体がS字カーブの対応関係を形成
し、変換前の輝度yに対して変換後の輝度Yを大きく変
化させることができるようになる。
As shown in this example, when the gradation range is divided into a low-luminance side and a high-luminance side, and γ correction is applied to each of them, a relationship in which γ is the inverse of each other is given. The connection is made smoothly at the connection point between the side and the high luminance side, and a good S-shaped curve can be given. Of course, changing the polarity of the γ correction between the low luminance side and the high luminance side itself forms the correspondence of the S-shaped curve, and can greatly change the luminance Y after conversion with respect to the luminance y before conversion. Become like

【0100】本実施形態においては、S字カーブの対応
関係をγ補正によって成立させているが、図19には階
調範囲の中心位置ymid の前後においてY=f・y+g
なる線形の対応関係で実現する例を示している。この例
では下方側四分点yq1以下と上方側四分点yq3以上の領
域で再び線形の対応関係を形成している。この例におい
ても標準偏差σが大きいときに傾斜fを「1」に近づ
け、標準偏差σが小さいときに傾斜fを「1」よりも大
きくなるように対応づければよい。むろん、この場合に
おいては対応関係の急激な変化を防止するため、図20
に示すように二つの対応直線を滑らかに接続するように
しても良い。
In the present embodiment, the correspondence between the S-shaped curves is established by γ correction, but FIG. 19 shows that Y = f · y + g before and after the center position ymid of the gradation range.
An example is shown in which a linear correspondence relationship is realized. In this example, a linear correspondence is formed again in the region below the lower quadrant yq1 and above the upper quadrant yq3. Also in this example, when the standard deviation σ is large, the slope f may be made closer to “1”, and when the standard deviation σ is small, the slope f may be made larger than “1”. Of course, in this case, in order to prevent a sudden change in the correspondence, FIG.
As shown in (2), two corresponding straight lines may be connected smoothly.

【0101】一方、輝度分布が階調範囲の中心に収まっ
ている場合は上述したようなγ1,γ2の設定だけで良
好な輝度変換が可能となるが、図21に示すように、輝
度分布のメジアンyMeがやや低輝度側に寄っていたり、
図22に示すように、輝度分布のメジアンyMeがやや高
輝度側に寄っていたりする場合もある。
On the other hand, when the luminance distribution falls within the center of the gradation range, good luminance conversion can be performed only by setting γ1 and γ2 as described above. However, as shown in FIG. The median yMe is slightly closer to the low brightness side,
As shown in FIG. 22, the median yMe of the luminance distribution may be slightly shifted to the higher luminance side.

【0102】これに対し、図23に示す例では全範囲に
対してγ<1のγ補正を施しており、この場合は変換前
の低輝度側の階調範囲rに対する変換後の階調範囲Rは
拡大しているし、図24に示す例では全範囲に対してγ
>1のγ補正を施しており、この場合は変換前の高輝度
側の階調範囲rに対する変換後の階調範囲Rは拡大して
いる。
On the other hand, in the example shown in FIG. 23, the entire range is subjected to γ correction of γ <1, and in this case, the gradation range r on the low luminance side before the conversion and the gradation range after the conversion R is enlarged, and in the example shown in FIG.
> 1 is applied, and in this case, the gradation range R after conversion with respect to the gradation range r on the high luminance side before conversion is expanded.

【0103】従って、ステップS114にて求めたメジ
アンyMeと階調範囲の中央位置である「128」との大
小関係を比較し、図21に示すようにメジアンyMeが低
輝度側の領域に偏っているようであれば、図23に示す
ような全範囲に対してγ<1のγ補正を施すことによ
り、変換前に分布密度の高かった低輝度側の階調範囲r
が拡大することになる。また、図22に示すようにメジ
アンyMeが高輝度側の領域に偏っているようであれば、
図24に示すような全範囲に対してγ>1のγ補正を施
すことにより、変換前に分布密度の高かった高輝度側の
階調範囲rが拡大することになる。このようにして必ず
しもS字カーブの対応関係とすることなく階調数の割り
当ての拡大や縮小は可能である。むろん、これらの場合
においても、γはγ<1とするかγ>1とするかに応じ
て(7)式や(8)式に基づいて決定すればよい。
Therefore, the magnitude relation between the median yMe obtained in step S114 and “128”, which is the center position of the gradation range, is compared, and as shown in FIG. 21, the median yMe is biased toward the region on the low luminance side. If so, by performing γ correction of γ <1 on the entire range as shown in FIG. 23, the gradation range r on the low luminance side where the distribution density was high before conversion is obtained.
Will expand. Further, as shown in FIG. 22, if the median yMe is biased toward the high-luminance area,
By performing the γ correction of γ> 1 on the entire range as shown in FIG. 24, the gradation range r on the high luminance side where the distribution density was high before the conversion is expanded. In this way, it is possible to expand or reduce the assignment of the number of gradations without necessarily having the correspondence relationship of the S-shaped curve. Of course, in these cases, γ may be determined based on the equations (7) and (8) depending on whether γ <1 or γ> 1.

【0104】さらには、図25に示す例では、階調
「0」、下方側四分点yq1、中心位置ymid 、上方側四
分点yq3、階調「255」という五点を基準点としつ
つ、階調「0」と中心位置ymid と階調「255」に対
してはY=yとしつつ、下方側四分点yq1と上方側四分
点yq3における変換点を標準偏差に基づいて決定する。
そして、これらの五点を結ぶ対応関係をスプライン補間
演算やニュートン補間で求めるようにしてもよい。むろ
ん、中心位置ymid から下方側の三点や上方側の三点を
それぞれスプライン補間演算やニュートン補間で求める
ようにしてもよい。
Further, in the example shown in FIG. 25, five points of gradation "0", lower quadrant yq1, center position ymid, upper quadrant yq3, and gradation "255" are used as reference points. The conversion points at the lower quadrant yq1 and the upper quadrant yq3 are determined based on the standard deviation while setting Y = y for the gradation "0", the center position ymid, and the gradation "255". .
Then, the correspondence between these five points may be obtained by spline interpolation calculation or Newton interpolation. Of course, three points on the lower side and three points on the upper side from the center position ymid may be obtained by spline interpolation calculation or Newton interpolation, respectively.

【0105】ところで、変換前の階調範囲に対して余り
にも大きな階調範囲を割り当てるとすると、却って好ま
しくないことになる場合もある。夕方のような薄暮の状
態では最も明るい部分から暗い部分までのコントラスト
の幅が狭くて当然であるのに、この画像についてコント
ラストを大きく拡大しようとする結果、昼間の画像のよ
うに変換されてしまいかねない。このような変換は希望
されないので、拡大率には制限を設けていおき、γ1,
γ2ともに制限する。例えば、γ2<0.7となって
も、γ2=0.7とし、γ1>1.3となっても、γ1
=1.3とする。
By the way, if an excessively large gradation range is assigned to the gradation range before the conversion, it may be rather undesirable. In dusk conditions such as the evening, the contrast range from the brightest to the darkest is naturally narrow, but as a result of trying to greatly increase the contrast of this image, it is converted like a daytime image. Maybe. Since such a conversion is not desired, a limit is set for the enlargement ratio, and γ1,
Both γ2 are restricted. For example, even if γ2 <0.7, γ2 = 0.7, and γ1> 1.3, γ1
= 1.3.

【0106】以上のようにして、本実施形態ではパラメ
ータγ1,γ2を得ることができ、ステップS204を
終了する。なお、このような階調数の割り当ての変更
は、言葉を換えると量子化ビット数の割り当てを変更す
るともいえる。
As described above, in the present embodiment, the parameters γ1 and γ2 can be obtained, and step S204 ends. In addition, it can be said that such a change in the assignment of the number of gradations changes the assignment of the number of quantization bits, in other words.

【0107】ところで、輝度の変換時に、毎回、γ補正
による演算を実行するのは非合理的である。というの
は、輝度yの取りうる範囲が「0」〜「255」でしか
あり得ないため、予め輝度yが取りうる全ての値に対応
して変換後の輝度Yを求めておくことも可能だからであ
る。従って、ステップS206にてこの対応関係を求
め、図26に示すようなテーブルとして記憶しておく。
By the way, it is irrational to execute the calculation by the γ correction every time the luminance is converted. That is, since the range of the luminance y can be only "0" to "255", the luminance Y after conversion can be obtained in advance for all possible values of the luminance y. That's why. Therefore, this correspondence is obtained in step S206 and stored as a table as shown in FIG.

【0108】ここにおいて、対応関係の具体的な演算は
次のようにする。
Here, a specific calculation of the correspondence is as follows.

【0109】y≦128では、 Y=128*(y/128)**γ1 …(9) y>128では、 Y=128*{(y−128)/128}**γ2+128 …(10) しかしながら、メジアンyMeに基づいてγ補正の変換点
を変えることも可能である。すなわち、y≦yMeでは、 Y=yMe*(y/yMe)**γ1 …(11) y>yMeでは、 Y=yMe*{(y−yMe)/yMe}**γ2+yMe …(12) とすれば、メジアンyMeを中心として高輝度側と低輝度
側とで輝度変換の極性を反転させたS字カーブとなり分
布密度の高い辺りを中心に両側に階調数を多く割り当て
ることができ、全体の明るさにさほど影響を与えること
なく変換することができるようになるなどの効果があ
る。
When y ≦ 128, Y = 128 * (y / 128) ** γ1 (9) When y> 128, Y = 128 * {(y−128) / 128} ** γ2 + 128 (10) , The conversion point of the γ correction can be changed based on the median yMe. That is, when y ≦ yMe, Y = yMe * (y / yMe) ** γ1 (11) When y> yMe, Y = yMe * {(y−yMe) / yMe} ** γ2 + yMe (12) For example, it becomes an S-shaped curve in which the polarity of the luminance conversion is inverted between the high luminance side and the low luminance side around the median yMe, and a large number of gradations can be assigned to both sides around the high distribution density, There is an effect that conversion can be performed without significantly affecting brightness.

【0110】このようにして演算した変換テーブルが形
成されたところで画像データを変更することが可能にな
る。
When the calculated conversion table is formed, the image data can be changed.

【0111】最後に、ステップS208にて画像データ
の変換を行う。ここまでは輝度を変換するための対応関
係を求めてきており、例えば、RGB座標軸における成
分値(Rp,Gp,Bp )についての変換関係ではなかっ
た。しかしながら、(2)式の変換式は、このRGBの
成分値(Rp,Gp,Bp )との対応関係においても当ては
めることができる。また、輝度y,Yが階調「0」〜階
調「255」であるのに対応してRGBの各成分値
(r,g,b),(R,G,B )も同じ範囲となってお
り、上述した輝度y,Yの変換テーブルをそのまま利用
すればよいといえる。
Finally, the image data is converted in step S208. Up to this point, the correspondence relationship for converting the luminance has been obtained, and for example, the conversion relationship is not the component value (Rp, Gp, Bp) on the RGB coordinate axis. However, the conversion equation of equation (2) can also be applied in the correspondence relationship with the RGB component values (Rp, Gp, Bp). Further, corresponding to the luminances y and Y of the gradation “0” to the gradation “255”, the RGB component values (r, g, b) and (R, G, B) are in the same range. Therefore, it can be said that the conversion table of the luminances y and Y described above may be used as it is.

【0112】従って、ステップS208では全画素の画
像データ(r,g,b)について図26に示す変換テー
ブルを参照し、変換後の画像データ(R,G,B )を得
るという処理を繰り返すことになる。
Accordingly, in step S208, the process of obtaining the converted image data (R, G, B) is repeated by referring to the conversion table shown in FIG. 26 for the image data (r, g, b) of all pixels. become.

【0113】次に、上記構成からなる本実施形態の動作
を順を追って説明する。
Next, the operation of this embodiment having the above configuration will be described step by step.

【0114】スキャナ11などで写真を撮像したとする
と、同写真をRGBの階調データで表した画像データが
コンピュータ21に取り込まれ、CPUは図5及び図6
に示す画像処理のプログラムを実行して画像データのコ
ントラストを強調する処理を実行する。
Assuming that a photograph is taken by the scanner 11 or the like, image data representing the photograph in the form of RGB gradation data is taken into the computer 21, and the CPU operates as shown in FIGS.
Is executed to enhance the contrast of the image data.

【0115】まず、ステップS102では画像データを
所定の誤差内となる範囲で間引き、選択した画素につい
ての輝度yを求めて分布を取る。このままの分布を使用
することはできず、まず、画像が白黒のような二値画像
でないかステップS104にて判断するとともに、ステ
ップS108では自然画か否かを判断する。二値画像で
ある場合や自然画でない場合などを除き、ステップS1
10では画像データに枠部がないか判断し、枠部があれ
ば除いて得られた輝度分布についてステップS114に
て標準偏差σを求める。本実施形態においては、標準偏
差σを求めるだけでもよいが、γ補正の極性変換点を輝
度分布に合わせて変更する場合にはメジアンyMeを求め
ておく。
First, in step S102, the image data is thinned out within a predetermined error range, and the luminance y of the selected pixel is obtained to obtain a distribution. The distribution cannot be used as it is. First, it is determined in step S104 whether the image is a binary image such as black and white, and in step S108, it is determined whether the image is a natural image. Unless the image is a binary image or a non-natural image, step S1
In step 10, it is determined whether or not there is a frame in the image data. If there is a frame, the standard deviation σ is obtained in step S114 for the luminance distribution obtained by removing the frame. In the present embodiment, the standard deviation σ may be simply obtained, but when the polarity conversion point of the γ correction is changed in accordance with the luminance distribution, the median yMe is obtained.

【0116】輝度分布の標準偏差σが得られたら、y≦
128では、 γ1=(σstd_limit/σ)**a …(7) Y=128*(y/128)**γ1 …(9) y>128では、 γ2(σ/σstd_limit)**a …(8) Y=128*{(y−128)/128}**γ2+128 …(10) なる関係式より、ステップS204にてパラメータγ
1,γ2を求めるとともに、ステップS206では輝度
yから輝度Yへの変換関係をテーブルに記憶する。そし
て、ステップS208にて完成した変換テーブルを参照
して全画素についての画像データを変換する。
When the standard deviation σ of the luminance distribution is obtained, y ≦
For 128, γ1 = (σstd_limit / σ) ** a (7) Y = 128 * (y / 128) ** γ1 (9) For y> 128, γ2 (σ / σstd_limit) ** a (8) ) Y = 128 * {(y−128) / 128} ** γ2 + 128 (10) From the relational expression, the parameter γ is determined in step S204.
At step S206, the conversion relationship from the luminance y to the luminance Y is stored in a table. Then, image data for all pixels is converted with reference to the conversion table completed in step S208.

【0117】むろん、上述したように二値画像や自然画
でない場合においてはかかる画像処理は行われないが、
本発明の画像処理が行われた場合には、写真の状態では
非常にコントラストが弱かったにもかかわらず、輝度の
範囲を広げるように補正することにより、明暗がはっき
りして鮮明な画像を得られるようになる。
Of course, as described above, when the image is not a binary image or a natural image, such image processing is not performed.
When the image processing of the present invention is performed, a bright and dark image is obtained by correcting the brightness so as to be widened even though the contrast is very low in the state of the photograph. Will be able to

【0118】なお、上述した実施形態においては、γ1
やγ2を求める際のパラメータσstd_limit,aを一定
としているが、コンピュータ21上では所定のGUIを
介してユーザーが選択できるようにしても良い。また、
ユーザーが画像データの一部を指定して当該範囲内での
みかかるコントラストの強調処理を実行するようにする
ことも可能である。
In the above embodiment, γ1
Although the parameter σstd_limit, a for obtaining γ2 and γ2 is fixed, the user may select the parameter on the computer 21 via a predetermined GUI. Also,
It is also possible for the user to designate a part of the image data and execute such contrast enhancement processing only within the range.

【0119】このように、ステップS102で間引きす
るなどしながら画像データの画素について輝度yの分布
を求めた後、ステップS114にてその輝度分布の広が
り量に対応する標準偏差σを求め、同標準偏差σに基づ
いてステップS204にてS字カーブの対応関係を形成
するためのγ補正のパラメータ(γ1,γ2)を演算す
るようにしているため、ステップS208にて画像デー
タ変換して変換元の輝度yにおける分布密度の高い領域
には多くの階調数を割り当てるとともに分布密度の少な
い領域には少ない階調数を割り当てるといった作業を自
動化し、非熟練者でも容易にコントラストの強調を行う
ことができるようになる。
In this way, after obtaining the distribution of the luminance y for the pixels of the image data while thinning out in step S102, the standard deviation σ corresponding to the spread amount of the luminance distribution is obtained in step S114, and the standard deviation σ is obtained. Since the parameters (γ1, γ2) of γ correction for forming the correspondence of the S-curve are calculated in step S204 based on the deviation σ, the image data is converted in step S208 and Automating the task of assigning a large number of tones to a region with a high distribution density at luminance y and assigning a small number of tones to a region with a low distribution density makes it possible for even unskilled persons to easily emphasize contrast. become able to.

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

【図1】本発明の一実施形態にかかる画像処理装置が適
用される画像処理システムのブロック図である。
FIG. 1 is a block diagram of an image processing system to which an image processing apparatus according to an embodiment of the present invention is applied.

【図2】同画像処理装置の具体的ハードウェア構成例を
示すブロック図である。
FIG. 2 is a block diagram illustrating a specific hardware configuration example of the image processing apparatus.

【図3】本発明の画像処理装置の他の適用例を示す概略
ブロック図である。
FIG. 3 is a schematic block diagram illustrating another application example of the image processing apparatus of the present invention.

【図4】本発明の画像処理装置の他の適用例を示す概略
ブロック図である。
FIG. 4 is a schematic block diagram illustrating another application example of the image processing apparatus of the present invention.

【図5】本発明の画像処理装置における輝度の分布検出
処理部分を示すフローチャートである。
FIG. 5 is a flowchart showing a luminance distribution detection processing portion in the image processing apparatus of the present invention.

【図6】本発明の画像処理装置における輝度変換処理部
分を示すフローチャートである。
FIG. 6 is a flowchart showing a luminance conversion processing part in the image processing apparatus of the present invention.

【図7】変換元の画像における座標を示す図である。FIG. 7 is a diagram illustrating coordinates in a conversion source image.

【図8】サンプリング周期を示す図である。FIG. 8 is a diagram showing a sampling cycle.

【図9】サンプリング画素数を示す図である。FIG. 9 is a diagram showing the number of sampling pixels.

【図10】変換元の画像とサンプリングされる画素の関
係を示す図である。
FIG. 10 is a diagram illustrating a relationship between a conversion source image and pixels to be sampled.

【図11】白黒の画像を示す図である。FIG. 11 is a diagram showing a black and white image.

【図12】白黒の画像の輝度分布を示す図である。FIG. 12 is a diagram illustrating a luminance distribution of a black-and-white image.

【図13】枠部のある画像を示す図である。FIG. 13 is a diagram showing an image having a frame portion.

【図14】枠部のある画像の輝度分布を示す図である。FIG. 14 is a diagram illustrating a luminance distribution of an image having a frame portion.

【図15】階調数の割り当てを変更しない場合の変換前
の輝度と変換後の輝度との関係を示すグラフである。
FIG. 15 is a graph showing a relationship between luminance before conversion and luminance after conversion when the assignment of the number of gradations is not changed.

【図16】変換前の輝度と変換後の輝度とがγ補正によ
ってS字カーブの対応関係となるグラフである。
FIG. 16 is a graph in which the luminance before the conversion and the luminance after the conversion correspond to the S-shaped curve by the γ correction.

【図17】高輝度側の領域でγ<1のγ補正をかけた場
合のグラフである。
FIG. 17 is a graph in a case where γ correction of γ <1 is performed in a high-luminance area.

【図18】低輝度側の領域でγ>1のγ補正をかけた場
合のグラフである。
FIG. 18 is a graph in the case where γ correction of γ> 1 is applied in a region on the low luminance side.

【図19】変換前の輝度と変換後の輝度とが線形の変換
でS字カーブの対応関係となるグラフである。
FIG. 19 is a graph in which the luminance before conversion and the luminance after conversion are in linear conversion and correspond to an S-shaped curve.

【図20】同対応関係で変換特性の変換点で滑らかに変
換されるようにする場合の変形例である。
FIG. 20 is a modified example in which the conversion is performed smoothly at the conversion point of the conversion characteristic in the same correspondence.

【図21】メジアンが低輝度側に寄っている場合の輝度
分布を示す図である。
FIG. 21 is a diagram illustrating a luminance distribution when a median is shifted to a low luminance side.

【図22】メジアンが高輝度側に寄っている場合の輝度
分布を示す図である。
FIG. 22 is a diagram illustrating a luminance distribution when a median is shifted to a high luminance side.

【図23】全領域でγ<1のγ補正をかけた場合のグラ
フである。
FIG. 23 is a graph in the case where γ correction of γ <1 is applied in all regions.

【図24】全領域でγ>1のγ補正をかけた場合のグラ
フである。
FIG. 24 is a graph in the case where γ correction of γ> 1 is applied in all regions.

【図25】特定した変換点を補間法で接続する場合のグ
ラフである。
FIG. 25 is a graph in a case where specified conversion points are connected by an interpolation method.

【図26】輝度分布を拡大する際の変換テーブルを示す
図である。
FIG. 26 is a diagram illustrating a conversion table when expanding a luminance distribution.

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

10…画像入力装置 11…スキャナ 11b…スキャナ 12…デジタルスチルカメラ 12a…デジタルスチルカメラ 12b…デジタルスチルカメラ 13b…モデム 20…画像処理装置 21…コンピュータ 22…ハードディスク 30…画像出力装置 31…プリンタ 31a…プリンタ 31b…プリンタ 32…ディスプレイ 32a…ディスプレイ DESCRIPTION OF SYMBOLS 10 ... Image input device 11 ... Scanner 11b ... Scanner 12 ... Digital still camera 12a ... Digital still camera 12b ... Digital still camera 13b ... Modem 20 ... Image processing device 21 ... Computer 22 ... Hard disk 30 ... Image output device 31 ... Printer 31a ... Printer 31b ... Printer 32 ... Display 32a ... Display

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 ドットマトリクス状の画像データにおけ
る各画素単位の所定階調の輝度相当値について、同輝度
相当値を入力して所定の変換処理を施して出力すること
により、入力と出力との関係でコントラストを強調せし
める変換が行われるようにした画像処理装置であって、 上記画像データにおける輝度分布を求めて同輝度分布の
広がり量を算出し、かかる広がり量に基づいて分布密度
の大きい範囲に多くの階調数を与えつつ分布密度の小さ
い範囲に少ない階調数を割り当てることを特徴とする画
像処理装置。
An image processing apparatus according to claim 1, wherein the luminance equivalent value of a predetermined gradation in each pixel unit in the dot matrix image data is inputted, subjected to a predetermined conversion process, and outputted, so that the input and the output are equivalent. An image processing apparatus that performs conversion for enhancing contrast in a relation, wherein a range of a large distribution density is calculated based on the spread amount of the brightness distribution by obtaining a brightness distribution in the image data. An image processing apparatus, wherein a small number of gradations are assigned to a range where the distribution density is small while giving a large number of gradations to the image.
【請求項2】 上記請求項1に記載の画像処理装置にお
いて、上記輝度分布の広がり量は標準偏差に対応する値
を利用し、輝度分布の標準偏差が大きいときに入出力比
を小さくして階調数の割り当てを均一化するとともに、
標準偏差が小さいときに入出力比を大きくして階調数の
割り当て変化を拡大化することを特徴とする画像処理装
置。
2. The image processing apparatus according to claim 1, wherein the spread amount of the luminance distribution uses a value corresponding to a standard deviation, and the input / output ratio is reduced when the standard deviation of the luminance distribution is large. While making the number of gradations uniform,
An image processing apparatus characterized in that when the standard deviation is small, the input / output ratio is increased to enlarge the change in the assignment of the number of gradations.
【請求項3】 上記請求項2に記載の画像処理装置にお
いて、輝度分布にγ補正を行うとともに標準偏差が大き
いときにγ補正による変化量が小さくなるようにγの値
を設定し、標準偏差が小さいときにγ補正の変化量が大
きくなるようにγの値を設定することを特徴とする画像
処理装置。
3. The image processing apparatus according to claim 2, wherein a value of γ is set so as to perform γ correction on the luminance distribution and reduce a change amount due to γ correction when the standard deviation is large. An image processing apparatus characterized in that the value of γ is set so that the amount of change in γ correction becomes large when is small.
【請求項4】 上記請求項3に記載の画像処理装置にお
いて、輝度分布の概略中心位置を求めるとともに、この
概略中心位置を基準として高輝度側と低輝度側とで輝度
変換の極性を反転させることにより入力と出力との関係
で概略S字カーブの輝度変換を行うことを特徴とする画
像処理装置。
4. The image processing apparatus according to claim 3, wherein the approximate center position of the luminance distribution is determined, and the polarity of the luminance conversion is inverted between the high luminance side and the low luminance side based on the approximate central position. An image processing apparatus for performing approximate luminance conversion of an S-shaped curve based on a relationship between an input and an output.
【請求項5】 上記請求項1〜請求項4に記載の画像処
理装置において、変換元の輝度の取りうる範囲内で変換
先の輝度を演算して記憶しておき、変換時にはこの対応
関係を呼び起こして変換することを特徴とする画像処理
装置。
5. The image processing apparatus according to claim 1, wherein the luminance of the conversion destination is calculated and stored within the range of the luminance of the conversion source, and this correspondence relation is determined at the time of conversion. An image processing apparatus for awakening and converting.
【請求項6】 上記請求項1〜請求項5に記載の画像処
理装置において、画像データが輝度に対応した複数の成
分値で表される場合において、輝度の演算を同成分値の
線形加算で求めることを特徴とする画像処理装置。
6. The image processing apparatus according to claim 1, wherein, when the image data is represented by a plurality of component values corresponding to the luminance, the luminance calculation is performed by linear addition of the same component values. An image processing apparatus characterized in that it is obtained.
【請求項7】 上記請求項1〜請求項6に記載の画像処
理装置において、画像データについて所定の抽出率に対
応した間引きを行って輝度分布を求めることを特徴とす
る画像処理装置。
7. The image processing apparatus according to claim 1, wherein a luminance distribution is obtained by performing thinning-out corresponding to a predetermined extraction rate on the image data.
【請求項8】 上記請求項7に記載の画像処理装置にお
いて、縦方向と横方向の範囲での短い側において所定の
抽出数が確保されるようにすることを特徴とする画像処
理装置。
8. The image processing apparatus according to claim 7, wherein a predetermined number of extractions is secured on a shorter side in the vertical and horizontal directions.
【請求項9】 上記請求項1〜請求項8に記載の画像処
理装置において、コントラストの強調程度に制限を設定
することを特徴とする画像処理装置。
9. The image processing apparatus according to claim 1, wherein a limit is set on a degree of enhancement of contrast.
【請求項10】 上記請求項1〜請求項9に記載の画像
処理装置において、輝度分布に基づいて二値画像データ
を判定するとともに、二値画像データであればコントラ
ストの強調を行わないことを特徴とする画像処理装置。
10. The image processing apparatus according to claim 1, wherein the binary image data is determined based on the luminance distribution, and the contrast is not enhanced if the binary image data is binary image data. Characteristic image processing device.
【請求項11】 上記請求項10に記載の画像処理装置
において、再現可能な範囲内の両端に輝度分布が集中し
ているときに白黒の二値画像データであると判断するこ
とを特徴とする画像処理装置。
11. The image processing apparatus according to claim 10, wherein when the luminance distribution is concentrated at both ends within a reproducible range, the image data is determined to be monochrome binary image data. Image processing device.
【請求項12】 上記請求項1〜請求項11に記載の画
像処理装置において、突出する輝度分布に基づいて画像
データの枠部を判定するとともに、枠部があれば枠部の
データをコントラストの強調に利用しないことを特徴と
する画像処理装置。
12. The image processing apparatus according to claim 1, wherein a frame portion of the image data is determined based on a prominent luminance distribution, and if there is a frame portion, the data of the frame portion is converted into a contrast data. An image processing apparatus characterized in that it is not used for enhancement.
【請求項13】 上記請求項12に記載の画像処理装置
において、再現可能な範囲内での端部に集中している輝
度分布が枠部であると判定することを特徴とする画像処
理装置。
13. The image processing apparatus according to claim 12, wherein a luminance distribution concentrated on an end portion within a reproducible range is determined to be a frame portion.
【請求項14】 上記請求項1〜請求項13に記載の画
像処理装置において、画像データが自然画でない場合に
コントラストの強調を行わないことを特徴とする画像処
理装置。
14. The image processing apparatus according to claim 1, wherein contrast enhancement is not performed when the image data is not a natural image.
【請求項15】 上記請求項14に記載の画像処理装置
において、輝度分布がスペクトル状に存在する場合に上
記画像データが自然画でないと判定する自然画判定手段
を備えることを特徴とする画像処理装置。
15. The image processing apparatus according to claim 14, further comprising a natural image determining unit that determines that the image data is not a natural image when the luminance distribution exists in a spectrum. apparatus.
【請求項16】 ドットマトリクス状の画像データにお
ける各画素単位の輝度相当値について、同輝度相当値を
入力して所定の変換処理を施して出力することにより、
入力と出力との関係で概略S字カーブ状の変換を行なう
にあたり、上記画像データにおける輝度分布を求めて同
輝度分布の広がり量を算出し、かかる広がり量に基づい
て分布密度の大きい範囲に多くの階調数を与えつつ分布
密度の小さい範囲に少ない階調数を割り当てることを特
徴とする画像処理方法。
16. With respect to a luminance equivalent value of each pixel in dot matrix image data, the same luminance equivalent value is input, subjected to a predetermined conversion process, and output.
In performing the approximate S-curve conversion based on the relationship between input and output, the luminance distribution in the image data is obtained and the spread amount of the luminance distribution is calculated. An image processing method characterized by assigning a small number of gradations to a range where the distribution density is small while giving the number of gradations.
JP9006898A 1997-01-17 1997-01-17 Processor and method for image processing Pending JPH10208034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9006898A JPH10208034A (en) 1997-01-17 1997-01-17 Processor and method for image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9006898A JPH10208034A (en) 1997-01-17 1997-01-17 Processor and method for image processing

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2002186044A Division JP3972192B2 (en) 2002-06-26 2002-06-26 Image processing apparatus and image processing method

Publications (1)

Publication Number Publication Date
JPH10208034A true JPH10208034A (en) 1998-08-07

Family

ID=11651053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9006898A Pending JPH10208034A (en) 1997-01-17 1997-01-17 Processor and method for image processing

Country Status (1)

Country Link
JP (1) JPH10208034A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001343957A (en) * 2000-03-27 2001-12-14 Hitachi Ltd Liquid crystal display device
JP2003051944A (en) * 2001-08-07 2003-02-21 Canon Inc Image processing method, image processing system, program and storage medium
US6839460B2 (en) 2000-06-09 2005-01-04 Ricoh Company, Ltd. Image processing method, image processing apparatus and recording medium
US7081918B2 (en) 2000-04-28 2006-07-25 Fuji Photo Film Co., Ltd. Image processing method, image processing apparatus and recording medium storing program therefor
WO2007122966A1 (en) * 2006-04-19 2007-11-01 Panasonic Corporation Visual processing device, visual processing method, program, display device, and integrated circuit
US7508543B2 (en) 2003-04-10 2009-03-24 Seiko Epson Corporation Image processor, image processing method, and recording medium on which image processing program is recorded
JP2009124578A (en) * 2007-11-16 2009-06-04 Casio Hitachi Mobile Communications Co Ltd Video signal processing apparatus, contrast control method and program
JP2009541811A (en) * 2006-07-04 2009-11-26 サムスン エレクトロニクス カンパニー リミテッド Image compensation apparatus and method
JP2010063042A (en) * 2008-09-05 2010-03-18 Seiko Epson Corp Image processor
US7751644B2 (en) 2003-09-09 2010-07-06 Seiko Epson Corporation Generation of image quality adjustment information and image quality adjustment with image quality adjustment information
US7768681B2 (en) 2003-09-09 2010-08-03 Seiko Epson Corporation Image processing device and method of image processing
US7881549B2 (en) 2005-10-12 2011-02-01 Panasonic Corporaiton Visual processing device, display device, visual processing method, program, and integrated circuit
US7881550B2 (en) 2006-04-28 2011-02-01 Panasonic Corporation Visual processing apparatus, visual processing method, program, recording medium, display device, and integrated circuit
JP2012079306A (en) * 2010-09-30 2012-04-19 Ricoh Co Ltd Method, device, and system for adjusting image on whiteboard
CN106297631A (en) * 2016-08-30 2017-01-04 南京巨鲨显示科技有限公司 A kind of display with curve data error correction and error correction method thereof

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001343957A (en) * 2000-03-27 2001-12-14 Hitachi Ltd Liquid crystal display device
US7081918B2 (en) 2000-04-28 2006-07-25 Fuji Photo Film Co., Ltd. Image processing method, image processing apparatus and recording medium storing program therefor
US6839460B2 (en) 2000-06-09 2005-01-04 Ricoh Company, Ltd. Image processing method, image processing apparatus and recording medium
US7362896B2 (en) 2000-06-09 2008-04-22 Ricoh Company, Ltd. Image processing method, image processing apparatus and recording medium
JP2003051944A (en) * 2001-08-07 2003-02-21 Canon Inc Image processing method, image processing system, program and storage medium
US7508543B2 (en) 2003-04-10 2009-03-24 Seiko Epson Corporation Image processor, image processing method, and recording medium on which image processing program is recorded
US7751644B2 (en) 2003-09-09 2010-07-06 Seiko Epson Corporation Generation of image quality adjustment information and image quality adjustment with image quality adjustment information
US7768681B2 (en) 2003-09-09 2010-08-03 Seiko Epson Corporation Image processing device and method of image processing
US8311357B2 (en) 2005-10-12 2012-11-13 Panasonic Corporation Visual processing device, display device, visual processing method, program, and integrated circuit
US7881549B2 (en) 2005-10-12 2011-02-01 Panasonic Corporaiton Visual processing device, display device, visual processing method, program, and integrated circuit
US8406547B2 (en) 2006-04-19 2013-03-26 Panasonic Corporation Visual processing device, visual processing method, program, display device, and integrated circuit
WO2007122966A1 (en) * 2006-04-19 2007-11-01 Panasonic Corporation Visual processing device, visual processing method, program, display device, and integrated circuit
US7894684B2 (en) 2006-04-19 2011-02-22 Panasonic Corporation Visual processing device, visual processing method, program, display device, and integrated circuit
KR101314453B1 (en) * 2006-04-19 2013-10-07 파나소닉 주식회사 Visual processing device, visual processing method, program, display device, and integrated circuit
CN102438097B (en) * 2006-04-19 2015-06-03 松下电器(美国)知识产权公司 Visual processing device, visual processing method
US7881550B2 (en) 2006-04-28 2011-02-01 Panasonic Corporation Visual processing apparatus, visual processing method, program, recording medium, display device, and integrated circuit
US7903898B2 (en) 2006-04-28 2011-03-08 Panasonic Corporation Visual processing apparatus, visual processing method, program, recording medium, display device, and integrated circuit
US8401324B2 (en) 2006-04-28 2013-03-19 Panasonic Corporation Visual processing apparatus, visual processing method, program, recording medium, display device, and integrated circuit
JP2009541811A (en) * 2006-07-04 2009-11-26 サムスン エレクトロニクス カンパニー リミテッド Image compensation apparatus and method
JP2009124578A (en) * 2007-11-16 2009-06-04 Casio Hitachi Mobile Communications Co Ltd Video signal processing apparatus, contrast control method and program
JP2010063042A (en) * 2008-09-05 2010-03-18 Seiko Epson Corp Image processor
JP2012079306A (en) * 2010-09-30 2012-04-19 Ricoh Co Ltd Method, device, and system for adjusting image on whiteboard
CN106297631A (en) * 2016-08-30 2017-01-04 南京巨鲨显示科技有限公司 A kind of display with curve data error correction and error correction method thereof

Similar Documents

Publication Publication Date Title
JP3792739B2 (en) Image contrast improvement method
JP4069333B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JPH10208034A (en) Processor and method for image processing
JP3673092B2 (en) Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program
JP4993028B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP3972192B2 (en) Image processing apparatus and image processing method
JP3693086B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP2003051947A5 (en)
JP3698205B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP3664395B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP3596614B2 (en) Image processing apparatus, image processing method, and medium recording image processing program
JP4123387B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP4123385B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP3682872B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP4182365B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP3985147B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
JP4228243B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium recording program
JP2003115998A (en) Image processor, image processing method, and medium recorded with image processing control program
JP2003125213A5 (en)
JP2003092687A5 (en)
JP2003092687A (en) Image processing apparatus, image processing method and medium for recording image processing program
JP2003085552A5 (en)

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040116

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060510

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061018

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061215

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070124