JP2000306088A - Image correcting device and recording medium storing image correcting program - Google Patents

Image correcting device and recording medium storing image correcting program

Info

Publication number
JP2000306088A
JP2000306088A JP2000046709A JP2000046709A JP2000306088A JP 2000306088 A JP2000306088 A JP 2000306088A JP 2000046709 A JP2000046709 A JP 2000046709A JP 2000046709 A JP2000046709 A JP 2000046709A JP 2000306088 A JP2000306088 A JP 2000306088A
Authority
JP
Japan
Prior art keywords
gradation
image
histogram
pixels
ratio
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.)
Granted
Application number
JP2000046709A
Other languages
Japanese (ja)
Other versions
JP4507338B2 (en
Inventor
Kikuhei Yo
菊平 楊
Yukio Nakagawa
由紀夫 中川
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2000046709A priority Critical patent/JP4507338B2/en
Publication of JP2000306088A publication Critical patent/JP2000306088A/en
Application granted granted Critical
Publication of JP4507338B2 publication Critical patent/JP4507338B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To suitably correct an image which is photographed under adverse conditions and an image which has deteriorated by correcting the gradation width of a histogram by comparing the rates of the numbers of pixels by the gradations of the histogram with a threshold based upon user's specification. SOLUTION: A CPU calculates the numbers of pixels by the gradations of image data from the image data and calculates the rates Fi of the numbers of pixels of the gradations to the total number of pixels by the gradations. Then the rates Fi of the number of pixels are compared with the threshold S. The threshold S is previously calculated according to the specification input of a threshold done previously by a user. When the rates Fi of the numbers of pixels of successive gradations are both less than the threshold S, the integral value of those rates Fi of the numbers of pixels is regarded as the rate of the number of pixels of the gradations at the time of the generation of a histogram in an intermediate stage of correction when exceeding the threshold S. Consequently, a correct image holds gradation data of an uncorrected image below the threshold S in proportion to the rate Fi of the number of pixels and the data are not completely lost, so that characteristics of the original image are taken over.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像の階調特性を
補正する画像補正装置、特に固体撮像素子を用いた電子
カメラ、または銀塩フィルムを用いたカメラ等での撮像
時の照明条件、露出条件等に起因して悪化した画像の画
像補正装置、及び画像補正プログラムを記録した機械読
み取り可能な記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image correction apparatus for correcting gradation characteristics of an image, and more particularly, to an illumination condition for capturing an image with an electronic camera using a solid-state image sensor or a camera using a silver halide film, The present invention relates to an image correction device for an image deteriorated due to an exposure condition and the like, and a machine-readable recording medium storing an image correction program.

【0002】[0002]

【従来の技術】一般に、カメラにより撮像された画像
は、白黒画像、カラー画像共に、画素毎の階調(明度)
により評価される。ここで、階調は、白黒画像に対して
は白黒の階調が、カラー画像に対してはR(赤)、G
(緑)、B(青)の、またはC(シアン)、M(マゼン
タ)、Y(イエロー)等の各成分の階調が適用される。
これらの画像は、撮影条件、退色、等の理由で悪化する
ことがあり、様々な方法で画像補正が行われている。
2. Description of the Related Art Generally, an image picked up by a camera includes a gray scale (brightness) for each pixel for both a monochrome image and a color image.
Is evaluated by Here, the gradation is black and white gradation for a black and white image, R (red) and G for a color image.
(Green), B (blue), or the gradation of each component such as C (cyan), M (magenta), and Y (yellow) is applied.
These images may be deteriorated due to photographing conditions, fading, etc., and image correction is performed by various methods.

【0003】その画像補正の有力な方法が階調補正であ
り、従来、階調度数分布を示すヒストグラムを利用する
方法が取られている。このヒストグラムは次のように算
出される。画像を構成する個々の画素の階調をそれぞれ
検出し、たとえば256階調のそれぞれの階調を示す画
素の個数(頻度)を算出する。この各階調に対する画素
数(度数)をプロットしたものがヒストグラムである。
A prominent method of image correction is gradation correction, and conventionally, a method using a histogram showing a gradation frequency distribution has been adopted. This histogram is calculated as follows. The gradation of each pixel constituting the image is detected, and the number (frequency) of pixels showing each gradation of, for example, 256 gradations is calculated. A histogram is obtained by plotting the number of pixels (frequency) for each gradation.

【0004】画像の補正に当たっては、従来、ヒストグ
ラムの上端(最大階調)と下端(最小階調)の各々か
ら、ユーザが閾値として指定した画素数に相当する階調
までを削除し、式1の変換式によりヒストグラムを変換
することによって画像の階調分布を補正していた。 C(x)=n(x−a)/(b−a) 式1 ここで、xは補正前の階調、aは補正前の階調の最小
値、bは補正前の階調の最大値、C(x)は補正後の階
調、nは補正後の画像の最大階調と最小階調との差であ
り、通常は8ビットデータの最大値、255とされる。
In correcting an image, conventionally, from each of an upper end (maximum gradation) and a lower end (minimum gradation) of a histogram, a gradation corresponding to the number of pixels specified by the user as a threshold is deleted, and the following equation 1 is used. The tone distribution of the image is corrected by converting the histogram according to the above conversion formula. C (x) = n (x−a) / (ba) Equation 1 where x is the gradation before correction, a is the minimum value of the gradation before correction, and b is the maximum of the gradation before correction. The value, C (x), is the corrected gradation, and n is the difference between the maximum gradation and the minimum gradation of the corrected image, and is normally set to the maximum value of 8-bit data, 255.

【0005】式1の変換式による補正によって行われて
いることは、容易に理解できるように、悪化した画像の
階調の幅を8ビット(256階調)まで引き伸ばす作業
である。
What is performed by the correction using the conversion formula of Expression 1 is, as can be easily understood, a work of extending the width of the gradation of the deteriorated image to 8 bits (256 gradations).

【0006】[0006]

【発明が解決すべき課題】このような従来の技術では、
図4のようなヒストグラムを呈する、コントラストが低
下した画像については、ヒストグラムを補正すると図5
で示すヒストグラムになるので、画像は充分に画像補正
されることになる。換言すると、従来の技術では、ヒス
トグラムに大きなくびれがない場合には有効であった。
In such a conventional technique,
For an image with a reduced contrast that exhibits a histogram as shown in FIG.
, The image is sufficiently image-corrected. In other words, the conventional technique is effective when there is no large constriction in the histogram.

【0007】しかしながら、撮影される照明条件や露出
条件によっては従来の画像補正方法では画像が補正しき
れないことがあった。例えば、逆光で人物写真を撮る場
合、人物像が黒く潰れ、背景が白く色とびする現象は良
く起こる。このような画像のヒストグラムはたとえば図
6に示される。図6から、低階調、高階調と較べて、中
間階調の画素数が極度に低下していることが分かる。こ
の画像を従来の式1で十分に補正できないことは、この
画像の階調幅が既に殆ど256階調近くであることから
も理解できるだろう。人物像が黒く潰れ、背景が白く色
とびする問題は殆ど改善されない。
However, depending on the lighting conditions and exposure conditions to be photographed, the conventional image correction method may not be able to correct the image. For example, when photographing a portrait in backlight, the phenomenon that the portrait is crushed black and the background is white and color jumps often occurs. A histogram of such an image is shown, for example, in FIG. From FIG. 6, it can be seen that the number of pixels of the intermediate gradation is extremely reduced as compared with the low gradation and the high gradation. The fact that this image cannot be sufficiently corrected by the conventional formula 1 can be understood from the fact that the gradation width of this image is already almost 256 gradations. The problem that the human image is crushed black and the background is white and jumps is hardly improved.

【0008】更に、図7に示すように、ヒストグラムの
下端(一般には上下端)に画素数が少ない階調領域が広
く拡がっている場合にも、十分な補正が難しかった。す
なわち、ヒストグラムの上端(最大階調)と下端(最小
階調)の各々から、ユーザが閾値として指定した画素数
に相当する階調までを削除する方法では、画素数の比率
の設定が低いとき、たとえば図7の(L1)に相当する
階調までの比率を設定した場合には、充分な画像補正効
果が得られない。また、画素数比率の設定が高いとき、
たとえば図7の(L2)に相当する階調までの比率を設
定した場合には、元画像の階調情報の多くの部分が失わ
れる問題がある。このように、従来の方法では適正な閾
値を指定することができないことがあった。
Further, as shown in FIG. 7, it is difficult to perform a sufficient correction even when a gradation region having a small number of pixels is widely spread at the lower end (generally, the upper and lower ends) of the histogram. That is, in the method of deleting from the upper end (maximum gradation) and the lower end (minimum gradation) of the histogram to the gradation corresponding to the number of pixels specified by the user as the threshold value, when the setting of the ratio of the number of pixels is low, For example, when the ratio up to the gradation corresponding to (L1) in FIG. 7 is set, a sufficient image correction effect cannot be obtained. Also, when the setting of the pixel number ratio is high,
For example, when the ratio up to the gradation corresponding to (L2) in FIG. 7 is set, there is a problem that a large part of the gradation information of the original image is lost. As described above, in some cases, an appropriate threshold value cannot be specified by the conventional method.

【0009】本発明の目的は、以上のような、従来の画
像補正方法では補正できなかった画像を補正する画像補
正装置、及び画像補正プログラムを記録した機械読み取
り可能な記録媒体を提供することにある。
An object of the present invention is to provide an image correction apparatus for correcting an image which cannot be corrected by the conventional image correction method as described above, and a machine-readable recording medium storing an image correction program. is there.

【0010】[0010]

【課題を解決する為の手段】上記課題を解決するため、
従来の画像補正法では、ヒストグラムをカットオフする
閾値を、総画素数に対する、ヒストグラムの上端または
下端からの各階調の画素数を累積した数の比率によって
指定していた。これに対して、本発明は、1階調当たり
の画素数の総画素数に対する比率で閾値を指定し、この
閾値とヒストグラムの階調との比較に基づいて画像を補
正した。
Means for Solving the Problems To solve the above problems,
In the conventional image correction method, the threshold for cutting off the histogram is specified by the ratio of the cumulative number of pixels of each gradation from the top or bottom of the histogram to the total number of pixels. On the other hand, in the present invention, a threshold is designated by the ratio of the number of pixels per gradation to the total number of pixels, and the image is corrected based on a comparison between the threshold and the gradation of the histogram.

【0011】そこで、本発明による画像補正装置は、外
部から画像データを取得する画像取得部と、画像データ
から階調毎に総画素数に対する画素数比率を算出しヒス
トグラムを作成するヒストグラム作成部と、ユーザの指
定に基づいて決定される1階調当たりの画素数比率の閾
値とヒストグラムの各階調毎の画素数比率との比較に基
づいてヒストグラムの階調幅を補正する階調補正部とを
具えることにより、上記目的を達成する。
Therefore, an image correction device according to the present invention comprises an image acquisition unit for acquiring image data from outside, and a histogram creation unit for calculating a ratio of the number of pixels to the total number of pixels for each gradation from the image data to create a histogram. A gradation correction unit that corrects a gradation width of a histogram based on a comparison between a threshold value of a pixel number ratio per gradation determined based on a user's designation and a pixel number ratio of each gradation in the histogram. By achieving the above, the above object is achieved.

【0012】階調補正部は、ヒストグラムに於ける、画
素数比率が閾値未満である階調の幅を圧縮することによ
り、ヒストグラムの階調幅を補正することができる。こ
こで、画素数比率が閾値未満である階調を削除して階調
幅を圧縮できる。画素数比率に逆比例した圧縮率で階調
の幅を圧縮することができる。画素数比率が閾値未満で
ある階調の幅を最小の階調幅である1まで圧縮してもよ
い。すなわち、画素数比率が閾値未満である階調が連続
して複数ある場合には、これらの画素数の積分値をまと
めて1階調の度数としてもよい。
The gradation correcting section can correct the gradation width of the histogram by compressing the width of the gradation in the histogram in which the ratio of the number of pixels is less than the threshold value. Here, the gradation width can be compressed by deleting the gradation whose pixel number ratio is less than the threshold value. The gradation width can be compressed at a compression ratio inversely proportional to the pixel number ratio. The width of the gray scale in which the ratio of the number of pixels is less than the threshold may be compressed to 1, which is the minimum gray scale width. That is, when there are a plurality of consecutive gray scales whose pixel number ratios are less than the threshold value, the integrated value of these pixel numbers may be combined into a frequency of one gray scale.

【0013】上記閾値を階調(i)の関数(S(i))
としてもよい。この場合、ヒストグラムの各階調の画像
数比率が閾値S(i)と行われる。これは、閾値(S)
を階調(i)に応じて変更することを意味する。たとえ
ば、中間階調を重視する画像であれば、中央部分につい
ては閾値(S)を小さくし、低階調と高階調については
閾値(S)を大きくすればよい。
[0013] The threshold value is a function of gradation (i) (S (i)).
It may be. In this case, the ratio of the number of images of each gradation of the histogram is set to the threshold value S (i). This is the threshold (S)
Is changed in accordance with the gradation (i). For example, in the case of an image where importance is placed on the intermediate gradation, the threshold (S) may be decreased for the central portion, and the threshold (S) may be increased for the low gradation and the high gradation.

【0014】更に、ヒストグラム全体の階調の幅を拡大
する全階調拡大部を有するようにしてもよい。本発明に
よる画像補正プログラムを記録した機械読み取り可能な
記録媒体には、外部から画像データを取得する画像取得
手順と、画像データから階調毎に総画素数に対する画素
数比率を算出しヒストグラムを作成するヒストグラム作
成手順と、ユーザの指定に基づいて決定される1階調当
たりの画素数比率の閾値とヒストグラムの各階調毎の画
素数比率との比較に基づいてヒストグラムの階調幅を補
正する階調補正手順のプログラムが格納されている。こ
れにより、記録媒体をコンピュータにセットしてプログ
ラムをロードすれば、上記画像補正装置として機能させ
ることができる。
Further, the image processing apparatus may have an all gradation expanding section for expanding the gradation width of the entire histogram. A machine-readable recording medium on which the image correction program according to the present invention is recorded has an image acquisition procedure for acquiring image data from the outside, and a histogram is created by calculating the ratio of the number of pixels to the total number of pixels for each gradation from the image data. And a gradation for correcting the gradation width of the histogram based on a comparison between a histogram creation procedure to be performed and a threshold of the number of pixels per gradation determined based on a user's specification and a ratio of the number of pixels for each gradation of the histogram. A correction procedure program is stored. Thus, if the recording medium is set in the computer and the program is loaded, the computer can function as the image correction device.

【0015】[0015]

【発明の実施の形態】コンピュータを使用した本発明の
一実施形態の画像補正装置は、図3にその全体構成が示
される。図3に於いて、コンピュータ1は、CPU(マ
イクロプロセッサ)2を具える。CPU2には、キーボ
ードやマウスなどから成る入力装置3、ハードディスク
6、メモリ7、画像処理ボード8、及びインターフェー
スボード10が接続される。この画像処理ボード8の画
像出力端子には表示装置9が接続される。インターフェ
ースボード10には、外部記録媒体などの外部機器11
が接続される。CPU2にはCD−ROMドライブ装置
12が接続され、このCD−ROMドライブ装置12に
は、画像補正のプログラム、及びそのインストールプロ
グラムを記録したCD−ROM13が挿入される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 3 shows an overall configuration of an image correction apparatus using a computer according to an embodiment of the present invention. In FIG. 3, a computer 1 includes a CPU (microprocessor) 2. The input device 3 including a keyboard and a mouse, a hard disk 6, a memory 7, an image processing board 8, and an interface board 10 are connected to the CPU 2. A display device 9 is connected to an image output terminal of the image processing board 8. The interface board 10 includes an external device 11 such as an external recording medium.
Is connected. A CD-ROM drive device 12 is connected to the CPU 2, and a CD-ROM 13 in which an image correction program and an installation program thereof are recorded is inserted into the CD-ROM drive device 12.

【0016】このCD−ROM13内のインストールプ
ログラムによって、CPU2はCD−ROM13内の画
像補正プログラムを展開し、ハードディスク6に実行可
能な状態で格納する。 [実施形態1]図1は本発明による画像補正装置の実施形
態1の動作を説明するフローチャートである。以下、図
1のステップ番号を参照して画像補正の動作を説明す
る。
According to the installation program in the CD-ROM 13, the CPU 2 develops the image correction program in the CD-ROM 13 and stores it in the hard disk 6 in an executable state. [First Embodiment] FIG. 1 is a flowchart for explaining the operation of an image correction apparatus according to a first embodiment of the present invention. Hereinafter, the operation of the image correction will be described with reference to the step numbers in FIG.

【0017】先ず、ユーザが画像補正プログラムを起動
すると、CPU2はステップS1において補正対象の画
像ファイルをオープンし画像データを取得し、ステップ
S2に進む。ステップS2では、画像データからその階
調(i)毎に画素数を算出する。本実施形態では階調は
8ビットデータであり、最低値を0、そして最大値を2
55としている。
First, when the user starts the image correction program, the CPU 2 opens an image file to be corrected in step S1 to acquire image data, and proceeds to step S2. In step S2, the number of pixels is calculated for each gradation (i) from the image data. In the present embodiment, the gradation is 8-bit data, and the minimum value is 0 and the maximum value is 2
55.

【0018】ステップS3では、各階調(i)毎にその
階調の画素数の総画素数に対する比率(Fi)を算出す
る。この算出結果のヒストグラムの一例を図8に示す。
図8において、横軸は256段階の階調(i)、縦軸は
画素数比率(Fi)である。ここで、画素数比率(F
i)は式2で表される。 画素数比率(Fi)=階調(i)の画素数/画像の総画素数 式2 ステップS4において、一時メモリの変数TEMPをリ
セットして零にしてステップS5に進む。ステップS5
において、階調i、jを、i=0、且つj=0に設定す
る。階調iは元画像のヒストグラムの階調を示し、階調
jは補正時の中間段階のヒストグラムの階調を示す。ス
テップS6では、フラグFLAGを初期値であるFAL
SEに設定する。
In step S3, a ratio (Fi) of the number of pixels of each gradation (i) to the total number of pixels is calculated. FIG. 8 shows an example of a histogram of this calculation result.
In FIG. 8, the horizontal axis represents 256 levels of gradation (i), and the vertical axis represents the pixel number ratio (Fi). Here, the pixel number ratio (F
i) is represented by Equation 2. Pixel number ratio (Fi) = number of pixels of gradation (i) / total number of images Equation 2 In step S4, the variable TEMP in the temporary memory is reset to zero, and the process proceeds to step S5. Step S5
, The gradations i and j are set to i = 0 and j = 0. The gray scale i indicates the gray scale of the histogram of the original image, and the gray scale j indicates the gray scale of the histogram at the intermediate stage during the correction. In step S6, the flag FLAG is set to FAL which is the initial value.
Set to SE.

【0019】その後、ステップS7において、上記画素
数比率Fiを演算された閾値Sと比較する。あらかじめ
ユーザにより行われる閾値の指定入力(ステップS2
3)に基づいて、閾値Sは演算されている(ステップS
24)。後述するように、たとえば、階調に無関係に閾
値を定数とするか、階調に応じた閾値とするかを指定す
ることができる。定数ならば入力された値を閾値として
設定する。一方、階調に応じた閾値とする場合、閾値S
を階調の関数S(i)と指定し、階調に応じて閾値S
(i)が演算される。
Thereafter, in step S7, the pixel number ratio Fi is compared with the calculated threshold value S. Threshold designation input performed by the user in advance (step S2
The threshold value S is calculated based on 3) (Step S)
24). As will be described later, for example, it is possible to specify whether the threshold is a constant regardless of the gradation or whether the threshold is a threshold corresponding to the gradation. If it is a constant, the input value is set as a threshold. On the other hand, when the threshold value is set according to the gradation, the threshold value S
Is defined as a gradation function S (i), and a threshold S
(I) is calculated.

【0020】ステップS7において、画素数比率Fiが
閾値S未満なら、ステップS8において、フラグFLA
GをTRUEに設定し、さらに、ステップS9におい
て、一時メモリの変数TEMPに現在の階調iの画素数
比率Fiを加える。その後、ステップS10において、
変数TEMPと閾値Sとを比較する。ステップS10を
はじめて実行するとき、その判定結果は必ずNOとな
る。
In step S7, if the pixel number ratio Fi is less than the threshold value S, in step S8, the flag FLA
G is set to TRUE, and in step S9, the pixel number ratio Fi of the current gray scale i is added to the variable TEMP in the temporary memory. Then, in step S10,
The variable TEMP is compared with the threshold S. When step S10 is executed for the first time, the determination result is always NO.

【0021】ステップS10が否定判定されるとステッ
プS10Aで変数Gjに変数TEMPを格納してステッ
プS11へ進む。ステップS11において、階調iに1
を加え、ステップS12において、階調iが255以上
であるか否か判定する。ステップS12が否定される
と、ステップS7に戻る。このとき、ステップS7が否
定判定されると、ステップS8、S9、S10、S1
1、S12を繰り返す。
If a negative determination is made in step S10, a variable TEMP is stored in variable Gj in step S10A, and the flow advances to step S11. In step S11, the gradation i is set to 1
In step S12, it is determined whether the gradation i is equal to or greater than 255. If step S12 is denied, the process returns to step S7. At this time, if a negative determination is made in step S7, steps S8, S9, S10, S1 are performed.
1. Repeat S12.

【0022】ステップS10が肯定されると、ステップ
S13において、変数TEMPの値を変数Gjに格納す
る。つまり、連続する複数の階調の画素数比率Fiがと
もに閾値S未満であるときは、ステップS9でそれらの
画素数比率Fiが積分されている。この積分値が閾値S
以上になると、この積分値を、補正時の中間段階のヒス
トグラム作成時の階調jの画素数比率とする。
When step S10 is affirmed, in step S13, the value of the variable TEMP is stored in the variable Gj. That is, when the pixel number ratios Fi of a plurality of continuous gradations are both smaller than the threshold value S, the pixel number ratios Fi are integrated in step S9. This integral value is a threshold value S
Then, this integral value is set as the pixel number ratio of the gradation j at the time of creating the histogram at the intermediate stage during the correction.

【0023】ステップS13からステップS14に進む
と、変数TEMPをリセットして零にし、ステップS1
5で、階調jに1を加える。次に、ステップS22にお
いて、フラグFLAGをFALSEに設定する。その
後、ステップS11、S12を経由して、ステップS7
へ戻る。ステップS7が否定された場合の動作は前に説
明したとおりである。ステップS7が肯定されると、即
ち現在の階調iに対する画素数比率Fiが閾値S以上な
らば、ステップS16において、フラグFLAGがTR
UEであるか否か判定する。
When the process proceeds from step S13 to step S14, the variable TEMP is reset to zero, and the process proceeds to step S1.
At 5, one is added to the gradation j. Next, in step S22, the flag FLAG is set to FALSE. Thereafter, via steps S11 and S12, step S7
Return to The operation when step S7 is denied is as described above. If step S7 is affirmative, that is, if the pixel number ratio Fi with respect to the current gradation i is equal to or larger than the threshold value S, in step S16, the flag FLAG is set to TR.
It is determined whether or not it is a UE.

【0024】ステップS16では、フラグFLAGがF
ALSEか否かを判定する。このステップは、前回の階
調の画素数比率Fiが閾値S未満であったか、閾値S以
上であったかにより、その後の処理手順を変更するため
に設けられている。すなわち、前回の階調の画素数比率
Fiが閾値S以上であれば、ステップS16が否定判定
され、ステップS17において、現在の階調iの画素数
比率Fiを変数Gjに格納し、ステップS15におい
て、階調jに1を加える。その後、ステップS22、S
11、S12、S7を経由してステップS16が否定判
定された場合の動作は前に説明したとおりである。
In step S16, the flag FLAG is set to F
It is determined whether it is ALSE. This step is provided to change the subsequent processing procedure depending on whether the pixel number ratio Fi of the previous gradation is less than the threshold value S or not less than the threshold value S. That is, if the pixel number ratio Fi of the previous gradation is equal to or larger than the threshold value S, a negative determination is made in step S16. In step S17, the pixel number ratio Fi of the current gradation i is stored in the variable Gj. , 1 to the gradation j. Then, steps S22, S
The operation in the case where a negative determination is made in step S16 via steps S11, S12, and S7 is as described above.

【0025】前回の階調の画素数比率Fiが閾値S未満
であれば、ステップS16が肯定判定され、ステップS
18において、変数TEMPの値を変数Gjに格納す
る。次に、ステップS19に進み、画素数比率Fiの値
を変数Gj+1に格納する。さらに、ステップS20
で、変数TEMPをリセットして零にし、ステップS2
1で階調jに2を加える。そして、ステップS22にお
いてフラグFLAGをFALSEに設定する。ステップ
S11を経由してステップS12が否定判定された場合
の動作はすでに説明した。
If the pixel ratio Fi of the previous gradation is less than the threshold value S, an affirmative determination is made in step S16, and step S16 is determined.
At 18, the value of the variable TEMP is stored in the variable Gj. Next, the process proceeds to step S19, where the value of the pixel number ratio Fi is stored in a variable Gj + 1. Further, step S20
Then, the variable TEMP is reset to zero, and step S2
1 adds 2 to the gradation j. Then, in a step S22, the flag FLAG is set to FALSE. The operation in the case where a negative determination is made in step S12 via step S11 has already been described.

【0026】取得した最後の階調の画素数比率に対して
はステップS12が肯定判定されて処理が終了する。な
お、ステップS10が肯定される前にステップS10
A,S11,S12、S7,S16,S18,S19に
進んだ場合、それ以前に画素比率Fiの積分値が閾値S
を越えていないグループが1つの階調に圧縮される。
An affirmative determination is made in step S12 for the acquired pixel ratio of the last gradation, and the process ends. Note that before step S10 is affirmed, step S10
When the process proceeds to A, S11, S12, S7, S16, S18, and S19, the integrated value of the pixel ratio Fi is set to the threshold value S before that.
Are not compressed into one gradation.

【0027】以上、図1のフローチャートの動作により
補正された画像のヒストグラムを図9に示す。図9にお
いて、横軸は256段階の階調(j)、縦軸は画素数比
率(Fi)である。すなわち、図9は、図1のフローチ
ャートにより取得された変数Giに基づいて作成され
る。このヒストグラムからわかるように、上述した処理
により、画素数の比率Fiが閾値Sに満たない階調のデ
ータは圧縮されている。従って、最大階調と最小階調の
幅が256に満たないので、次に、このヒストグラムを
最大幅256まで拡大する。その拡大の変換式は、式1
と同様な公知の式3である。
FIG. 9 shows a histogram of an image corrected by the operation of the flowchart of FIG. In FIG. 9, the horizontal axis represents 256 levels of gradation (j), and the vertical axis represents the pixel number ratio (Fi). That is, FIG. 9 is created based on the variable Gi obtained according to the flowchart of FIG. As can be seen from this histogram, by the above-described processing, the data of the gradation in which the ratio Fi of the number of pixels is less than the threshold value S is compressed. Accordingly, since the width between the maximum gradation and the minimum gradation is less than 256, this histogram is expanded to the maximum width 256 next. The conversion formula for the expansion is:
Is a known formula 3 similar to

【0028】 C(x)=n(x−a)/(b−a) 式3 ここで、xは図1の動作により補正された変換前の階
調、C(x)は変換後の階調、aは図1の動作により補
正された階調の最小値、bは図1の動作により補正され
た階調の最大値のヒストグラムを、nは変換後の画像の
最大階調と最小階調との差であり、ここでは8ビットデ
ータの最大値、255である。
C (x) = n (x−a) / (ba) Equation 3 where x is the gradation before conversion corrected by the operation in FIG. 1, and C (x) is the gradation after conversion. 1, a is the minimum value of the gradation corrected by the operation of FIG. 1, b is the histogram of the maximum value of the gradation corrected by the operation of FIG. 1, and n is the maximum gradation and the minimum gradation of the converted image. This is the maximum value of the 8-bit data, which is 255 here.

【0029】以上のように、前記フローチャートで示さ
れる方法により、階調iとjとの関係から階調に対する
圧縮方法が確立される。更に上記公知の式3により、階
調を最大幅まで拡張する方法が確立される。この圧縮と
拡張の二つの方法を組み合わせた補正処理を図8のヒス
トグラムに対して行った場合は補正結果として図10の
ヒストグラムが得られ、階調を有効に使う補正が行われ
ることが確かめられる。図10において、横軸は256
段階の階調(i)、縦軸は画素数比率(Fi)である。
この圧縮と拡張の二つの方法を組み合わせた補正処理を
原画像に対して行うことによって、階調を有効に使う補
正された画像データが得られ、この画像データを新規フ
ァイルとして格納する。
As described above, according to the method shown in the flowchart, a compression method for the gradation is established from the relationship between the gradations i and j. Furthermore, a method for extending the gradation to the maximum width is established by the above-mentioned known formula 3. When the correction processing combining the two methods of compression and expansion is performed on the histogram of FIG. 8, the histogram of FIG. 10 is obtained as a correction result, and it can be confirmed that the correction that effectively uses the gradation is performed. . In FIG. 10, the horizontal axis is 256
The gradation (i) of the stage and the vertical axis represent the pixel number ratio (Fi).
By performing a correction process combining the two methods of compression and expansion on the original image, corrected image data that effectively uses gradation is obtained, and this image data is stored as a new file.

【0030】画像表示に当たって、CPU2は補正され
た画像データファイルを開き、画像処理ボード8を経て
表示装置9に表示する。なお、時々、補正前の画像と補
正後の画像とが表示装置9に相並べて表示される。以
上、本発明の実施形態1を説明したが、以上の方法の他
に、画素数比率が閾値よりも低い階調の幅を、その幅の
間での画素数比率の積分値に逆比例した圧縮率で圧縮す
るのも好ましい処理である。すなわち、画素比率が閾値
よりも低い階調の幅を単純に求めて、その幅をまとめて
その間での画素数比率の積分値に逆比例する1つの圧縮
率で圧縮する方法である。
In displaying an image, the CPU 2 opens the corrected image data file and displays it on the display device 9 via the image processing board 8. The image before the correction and the image after the correction are sometimes displayed side by side on the display device 9. Although the first embodiment of the present invention has been described above, in addition to the above-described method, the width of the gray scale in which the pixel number ratio is lower than the threshold is inversely proportional to the integral value of the pixel number ratio between the widths. Compressing at a compression ratio is also a preferable process. In other words, this method is a method of simply obtaining the width of the gradation in which the pixel ratio is lower than the threshold value, compressing the width, and compressing the width with a single compression ratio that is inversely proportional to the integral value of the ratio of the number of pixels therebetween.

【0031】従来の補正処理では、補正前の画像のヒス
トグラムの上端と下端の階調データが画像補正によって
完全に失われてしまうが、本実施形態で補正された画像
は、補正前の画像の閾値以下の階調データを画素数比率
の大きさに比例して保有していて完全には失われず、よ
り一層原画像の特性を受け継ぎながら、階調補正が出来
るという特徴がある。 [実施形態2]図2は本発明による画像補正装置の実施
形態2の動作を説明するフローチャートである。以下、
図2のステップ番号を参照して画像補正の動作を説明す
る。図2において図1と同様なステップには同一の符号
を付す。図1と説明が重複する部分も含めて実施形態2
の動作をすべて説明する。
In the conventional correction processing, the gradation data at the upper end and the lower end of the histogram of the image before correction are completely lost by the image correction. However, the image corrected in this embodiment is the same as the image before correction. There is a feature that tone data equal to or less than the threshold value is retained in proportion to the ratio of the number of pixels, is not completely lost, and tone correction can be performed while further inheriting the characteristics of the original image. [Second Embodiment] FIG. 2 is a flowchart for explaining the operation of the second embodiment of the image correction apparatus according to the present invention. Less than,
The operation of the image correction will be described with reference to the step numbers in FIG. In FIG. 2, steps similar to those in FIG. 1 are denoted by the same reference numerals. Embodiment 2 Including the portion overlapping with FIG.
Will be described.

【0032】先ず、ユーザが画像補正プログラムを起動
すると、CPU2はステップS1において補正対象の画
像ファイルをオープンし画像データを取得し、ステップ
S2に進む。ステップS2では、画像データからその階
調(i)毎に画素数を算出する。本実施形態では階調は
8ビットデータであり、最低値を0、そして最大値を2
55としている。
First, when the user starts the image correction program, the CPU 2 opens an image file to be corrected in step S1 to acquire image data, and proceeds to step S2. In step S2, the number of pixels is calculated for each gradation (i) from the image data. In the present embodiment, the gradation is 8-bit data, and the minimum value is 0 and the maximum value is 2
55.

【0033】ステップS3では、各階調(i)毎にその
階調の画素数の比率(Fi)を算出する。この算出結果
のヒストグラムの例を図8に示す。次にステップS4に
おいて、一時メモリの変数TEMPをリセットして零に
してステップS5に進む。ステップS5において、階調
i、jを、i=0、且つj=0に設定し、ステップS6
に進んで、フラグFLAGをFALSEに設定する。そ
の後、ステップS7において、上記画素数比率Fiを演
算された閾値Sと比較する。あらかじめユーザにより行
われる閾値の指定入力(ステップS23)に基づいて、
閾値Sは演算されている(ステップS24)。
In step S3, a ratio (Fi) of the number of pixels of each gradation (i) is calculated. FIG. 8 shows an example of a histogram of this calculation result. Next, in step S4, the variable TEMP in the temporary memory is reset to zero, and the process proceeds to step S5. In step S5, the gradations i and j are set to i = 0 and j = 0, and in step S6
To set the flag FLAG to FALSE. Then, in step S7, the pixel number ratio Fi is compared with the calculated threshold value S. Based on the designation input of the threshold value (Step S23) performed by the user in advance,
The threshold value S has been calculated (step S24).

【0034】ステップS7において、画素数比率Fiが
閾値S未満なら、ステップS8において、フラグFLA
GをTRUEに設定し、さらに、ステップS9におい
て、一時メモリの変数TEMPに画素数比率Fiを加え
る。次いで、ステップS9Aに進み、変数Gjに変数T
EMPを代入してステップS11へ進む。ステップS1
1において、階調iに1を加え、ステップS12におい
て、階調iが255以上であるか否か判定する。ステッ
プS12が否定されると、ステップS7に戻る。
If the pixel number ratio Fi is smaller than the threshold value S in step S7, the flag FLA is set in step S8.
G is set to TRUE, and in step S9, the pixel number ratio Fi is added to the variable TEMP in the temporary memory. Then, the process proceeds to a step S9A, wherein the variable Gj is set to the variable T.
Substitute EMP and go to step S11. Step S1
In step 1, 1 is added to the gradation i, and in step S12, it is determined whether the gradation i is 255 or more. If step S12 is denied, the process returns to step S7.

【0035】ステップS7が肯定されると、即ち画素数
比率Fiが閾値S以上ならば、ステップS16におい
て、フラグFLAGがTRUEであるか否か判定する。
ステップS16が否定判定されると、すなわちフラグF
LAGがFALSEと判定されると、ステップS17に
おいて、画素数比率Fiの値を変数Gjに格納し、ステ
ップS15において、階調jに1を加える。その後、ス
テップS11、S12、S7を経由してステップS16
が否定判定された場合の動作は前に説明したとおりであ
る。
If step S7 is affirmative, that is, if the pixel number ratio Fi is equal to or larger than the threshold value S, it is determined in step S16 whether the flag FLAG is TRUE.
If a negative determination is made in step S16, that is, the flag F
If LAG is determined to be FALSE, the value of the pixel number ratio Fi is stored in the variable Gj in step S17, and 1 is added to the gradation j in step S15. Thereafter, the process goes to step S16 via steps S11, S12, and S7.
Is negative as described above.

【0036】ステップS16が肯定判定されると、すな
わちフラグFLAGがTRUEのとき、ステップS18
において、変数TEMPの値を変数Gjに格納する。次
に、ステップS19に進み、画素数比率Fiの値を変数
Gj+1に格納する。さらに、ステップS20で、変数
TEMPをリセットして零にし、ステップS21で階調
jに2を加える。そして、ステップS22Aにおいてフ
ラグFLAGをFALSEに設定する。ステップS11
を経由してステップS12が否定判定された場合の動作
はすでに説明した。
When the determination in step S16 is affirmative, that is, when the flag FLAG is TRUE, step S18
, The value of the variable TEMP is stored in the variable Gj. Next, the process proceeds to step S19, where the value of the pixel number ratio Fi is stored in a variable Gj + 1. Further, in step S20, the variable TEMP is reset to zero, and in step S21, 2 is added to the gradation j. Then, in step S22A, the flag FLAG is set to FALSE. Step S11
The operation in the case where a negative determination is made in step S12 via is described above.

【0037】取得した最後のデータに対してはステップ
S12が肯定判定されて処理が終了する。以上、図2の
フローチャートの動作により補正された画像のヒストグ
ラムを図11に示す。図11において、横軸は256段
階の階調(j)、縦軸は画素数比率(Fi)である。実
施形態1の場合のように、このヒストグラムは、画素数
の比率が閾値Sに満たない階調のデータが圧縮されてい
るため、最大階調と最小階調の幅が256に満たない。
そこで、このヒストグラムを最大幅256まで拡大す
る。その拡大の変換式は、式3である。
An affirmative decision is made in step S12 for the last data obtained, and the process ends. FIG. 11 shows a histogram of an image corrected by the operation of the flowchart of FIG. In FIG. 11, the horizontal axis represents 256 gradations (j), and the vertical axis represents the pixel number ratio (Fi). As in the case of the first embodiment, in this histogram, since the data of the gradation whose pixel number ratio is less than the threshold value S is compressed, the width of the maximum gradation and the minimum gradation is less than 256.
Therefore, this histogram is expanded to a maximum width 256. The conversion equation for the enlargement is Equation 3.

【0038】この圧縮と拡張の二つの方法を組み合わせ
た補正処理を図8のヒストグラムに対して行った場合は
補正結果として図12のヒストグラムが得られ、階調を
有効に使う補正が行われることが確かめられる。この圧
縮と拡張の二つの方法を組み合わせた補正処理を原画像
に対して行うことによって、階調を有効に使う補正され
た画像データが得られ、この画像データを新規ファイル
として格納する。
When the correction processing combining the two methods of compression and expansion is performed on the histogram of FIG. 8, the histogram of FIG. 12 is obtained as a correction result, and the correction that effectively uses the gradation is performed. Is confirmed. By performing a correction process combining the two methods of compression and expansion on the original image, corrected image data that effectively uses gradation is obtained, and the image data is stored as a new file.

【0039】画像表示に当たって、CPU2は補正され
た画像データファイルを開き、画像処理ボード8を経て
表示装置9に表示する。補正前の画像と補正後の画像と
は表示装置9に相並べて時々表示される。実施形態1と
較べると実施形態2の補正画像は、閾値を越える前まで
の階調の幅すべてを最小の階調幅である1まで圧縮され
るが、閾値よりも高い画素数比率の画素がより有効に階
調を利用できるという特徴がある。
In displaying an image, the CPU 2 opens the corrected image data file and displays it on the display device 9 via the image processing board 8. The image before correction and the image after correction are sometimes displayed side by side on the display device 9. Compared with the first embodiment, the corrected image of the second embodiment compresses all the gradation widths before the threshold value is exceeded to the minimum gradation width of 1. However, pixels having a pixel ratio higher than the threshold value are more likely to be compressed. There is a feature that gradation can be used effectively.

【0040】実施形態1と実施形態2に於いて、画素数
比率の閾値は、上述したように、定数値を指定する場合
と、階調(i)に依存する関数として指定する場合とが
ある。定数値として指定する場合、定数の大きさを変え
るだけで、ユーザは容易に、画像補正の程度を変えるこ
とが出来る。閾値を大きくするほど、画像補正の程度を
強められる。関数として指定する場合、明度が低い部分
を小さく、明度が高い部分を大きくするような関数形を
選ぶことは好ましい実施形態である。その理由は、明度
が低い(階調が低い)画像は、明度が高い(階調が高
い)画像よりも、僅かな階調変化が目立ち易いからであ
る。
In the first and second embodiments, as described above, the threshold value of the pixel number ratio may be specified as a constant value or as a function depending on the gradation (i). . When specifying as a constant value, the user can easily change the degree of image correction only by changing the magnitude of the constant. The larger the threshold value, the stronger the degree of image correction. In the case of designating as a function, it is a preferred embodiment to select a function form in which a portion with low brightness is small and a portion with high brightness is large. The reason is that an image with low brightness (low gradation) has a slight change in gradation more conspicuous than an image with high brightness (high gradation).

【0041】また、実施形態1と実施形態2に於いて、
閾値の指定は(ステップS23)ユーザが処理の都度手
入力で行なってもよいし、予め設定され自動的に呼び出
されることによって行なってもよい。以上、実施形態1
と実施形態2により本発明を説明した。本説明では、ヒ
ストグラムを圧縮してから256階調まで拡大したが、
本発明はこの順序には限られない。一緒に圧縮と拡大を
行っても良いし、逆に先に拡大してから、後で圧縮して
もよい。
In the first and second embodiments,
The designation of the threshold value (step S23) may be performed manually by the user each time the process is performed, or may be performed by being preset and automatically called. As described above, the first embodiment
The present invention has been described with reference to the second embodiment. In this description, the histogram is compressed and then expanded to 256 gradations.
The present invention is not limited to this order. Compression and expansion may be performed together, or conversely, expansion may be performed first, and then compression may be performed later.

【0042】[0042]

【発明の効果】以上の通り、本発明によれば、1階調当
たりの画素数の総画素数に対する比率で閾値を指定し、
この閾値とヒストグラムの階調との比較に基づいて画像
を補正したので、悪条件下、特殊条件下で撮影した画像
のみならず、劣化した画像も好ましく補正できる。
As described above, according to the present invention, the threshold is specified by the ratio of the number of pixels per gradation to the total number of pixels.
Since the image is corrected based on the comparison between the threshold value and the gradation of the histogram, not only an image photographed under a bad condition under a special condition but also a deteriorated image can be preferably corrected.

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

【図1】本発明による画像補正装置の実施形態1の主要
部分のフローチャートである。
FIG. 1 is a flowchart of a main part of Embodiment 1 of an image correction device according to the present invention.

【図2】本発明による画像補正装置の実施形態2の主要
部分のフローチャートである。
FIG. 2 is a flowchart of a main part of a second embodiment of the image correction device according to the present invention.

【図3】本発明のハードウエア構成の概要図である。FIG. 3 is a schematic diagram of a hardware configuration of the present invention.

【図4】画像のヒストグラムの例である。FIG. 4 is an example of a histogram of an image.

【図5】従来方法により補正された図4のヒストグラム
である。
FIG. 5 is a histogram of FIG. 4 corrected by a conventional method.

【図6】従来方法では補正できないヒストグラムの一例
である。
FIG. 6 is an example of a histogram that cannot be corrected by the conventional method.

【図7】従来方法では補正できないヒストグラムの他の
例である。
FIG. 7 is another example of a histogram that cannot be corrected by the conventional method.

【図8】本発明の説明のために用いた補正対象画像(原
画像)の補正前のヒストグラムである。
FIG. 8 is a histogram before correction of an image to be corrected (original image) used for describing the present invention.

【図9】本発明の実施形態1の画像補正装置により補正
された中間段階のヒストグラムである。
FIG. 9 is an intermediate-stage histogram corrected by the image correction device according to the first embodiment of the present invention.

【図10】本発明の実施形態1の画像補正装置により補
正されたヒストグラムである。
FIG. 10 is a histogram corrected by the image correction device according to the first embodiment of the present invention.

【図11】本発明の実施形態2の画像補正装置により補
正された中間段階のヒストグラムである。
FIG. 11 is an intermediate-stage histogram corrected by the image correction device according to the second embodiment of the present invention.

【図12】本発明の実施形態2の画像補正装置により補
正されたヒストグラムである。
FIG. 12 is a histogram corrected by the image correction device according to the second embodiment of the present invention.

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

1 コンピュータ 2 CPU 3 入力装置 7 メモリ 8 画像処理ボード 9 表示装置 10 インターフェースボード 11 外部機器 12 CD−ROMドライブ装置 13 CD−ROM 14 補正前の画像 15 補正後の画像 Reference Signs List 1 computer 2 CPU 3 input device 7 memory 8 image processing board 9 display device 10 interface board 11 external device 12 CD-ROM drive device 13 CD-ROM 14 image before correction 15 image after correction

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification code FI Theme coat ゛ (Reference)

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 外部から画像データを取得する画像取得
部と、 前記画像データから階調毎に総画素数に対する画素数比
率を算出しヒストグラムを作成するヒストグラム作成部
と、 ユーザの指定に基づいて決定される1階調当たりの画素
数比率の閾値と前記ヒストグラムの各階調毎の画素数比
率との比較に基づいて前記ヒストグラムの階調幅を補正
する階調補正部とを具えることを特徴とする画像補正装
置。
An image acquisition unit configured to acquire image data from outside; a histogram creation unit configured to calculate a ratio of the number of pixels to a total number of pixels for each gradation from the image data and create a histogram; A gradation correction unit that corrects the gradation width of the histogram based on a comparison between the determined threshold value of the number of pixels per gradation and the ratio of the number of pixels for each gradation of the histogram. Image correction device.
【請求項2】 前記階調補正部は、前記ヒストグラムに
於ける画素数比率が前記閾値未満である階調の幅を圧縮
することを特徴とする請求項1記載の画像補正装置。
2. The image correction apparatus according to claim 1, wherein the gradation correction unit compresses a gradation width in which a ratio of the number of pixels in the histogram is less than the threshold.
【請求項3】 前記階調補正部は、前記画素数比率に逆
比例した圧縮率で階調の幅を圧縮することを特徴とする
請求項2記載の画像補正装置。
3. The image correction apparatus according to claim 2, wherein the gradation correction unit compresses the gradation width at a compression ratio inversely proportional to the pixel number ratio.
【請求項4】 前記階調補正部は、前記画素数比率が前
記閾値未満である階調の幅を最小の階調幅である1まで
圧縮することを特徴とする請求項2記載の画像補正装
置。
4. The image correction apparatus according to claim 2, wherein the gradation correction unit compresses a gradation width in which the ratio of the number of pixels is less than the threshold value to a minimum gradation width of 1. .
【請求項5】 前記閾値を階調(i)の関数(S
(i))とし、前記ヒストグラムの各階調に於いて閾値
S(i)と画素数比率を比較することを特徴とする請求
項1〜4何れか1項記載の画像補正装置。
5. The method according to claim 5, wherein the threshold value is a function of a gradation (i) (S
The image correction apparatus according to any one of claims 1 to 4, wherein (i)) is set, and a threshold value S (i) is compared with a pixel number ratio at each gradation of the histogram.
【請求項6】 更に、ヒストグラム全体の階調の幅を拡
大する全階調拡大部を有することを特徴とする請求項1
〜5何れか1項記載の画像補正装置。
6. The image processing apparatus according to claim 1, further comprising an all gradation expanding section for expanding a gradation width of the entire histogram.
The image correction device according to any one of claims 1 to 5.
【請求項7】 外部から画像データを取得する画像取得
手順と、 画像データから階調毎に総画素数に対する画素数比率を
算出しヒストグラムを作成するヒストグラム作成手順
と、 ユーザの指定に基づいて決定される1階調当たりの画素
数比率の閾値とヒストグラムの各階調毎の画素数比率と
の比較に基づいてヒストグラムの階調幅を補正する階調
補正手順とからなる画像補正プログラムを記録した記録
媒体。
7. An image acquisition procedure for acquiring image data from outside, a histogram creation procedure for calculating a ratio of the number of pixels to the total number of pixels for each gradation from the image data and creating a histogram, and determining based on a user's designation. A gradation correction procedure for correcting the gradation width of the histogram based on the comparison between the threshold value of the pixel number ratio per gradation and the pixel number ratio for each gradation of the histogram. .
【請求項8】 前記階調補正手順は、前記ヒストグラム
に於ける画素数比率が前記閾値未満である階調の幅を圧
縮することを特徴とする請求項7記載の画像補正プログ
ラムを記録した記録媒体。
8. The recording method according to claim 7, wherein the gradation correction step compresses a gradation width in which a ratio of the number of pixels in the histogram is less than the threshold value. Medium.
【請求項9】 前記階調補正手順は、前記画素数比率に
逆比例した圧縮率で階調の幅を圧縮することを特徴とす
る請求項8記載の画像補正プログラムを記録した記録媒
体。
9. The recording medium according to claim 8, wherein the gradation correction step compresses a gradation width at a compression ratio inversely proportional to the pixel number ratio.
【請求項10】 前記階調補正手順は、前記画素数比率
が前記閾値未満である階調の幅を最小の階調幅である1
まで圧縮することを特徴とする請求項8記載の画像補正
プログラムを記録した記録媒体。
10. The gradation correction step is such that the width of the gradation in which the ratio of the number of pixels is less than the threshold is a minimum gradation width of 1
9. A recording medium on which the image correction program according to claim 8 is compressed.
【請求項11】 前記閾値を階調(i)の関数(S
(i))とし、前記ヒストグラムの各階調に於いて閾値
S(i)と画素数比率を比較することを特徴とする請求
項7〜10何れか1項記載の画像補正プログラムを記録
した記録媒体。
11. The method according to claim 1, wherein the threshold value is a function of a gradation (i) (S
11. The recording medium according to claim 7, wherein a threshold value S (i) and a pixel number ratio are compared for each gradation of the histogram. .
【請求項12】 更に、ヒストグラム全体の階調の幅を
拡大する全階調拡大手順を有することを特徴とする請求
項7〜11何れか1項記載の画像補正プログラムを記録
した記録媒体。
12. The recording medium on which the image correction program according to claim 7, further comprising a whole gradation expanding procedure for expanding a gradation width of the entire histogram.
JP2000046709A 1999-02-19 2000-02-18 Image correction apparatus and recording medium on which image correction program is recorded Expired - Lifetime JP4507338B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000046709A JP4507338B2 (en) 1999-02-19 2000-02-18 Image correction apparatus and recording medium on which image correction program is recorded

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP11-40813 1999-02-19
JP4081399 1999-02-19
JP2000046709A JP4507338B2 (en) 1999-02-19 2000-02-18 Image correction apparatus and recording medium on which image correction program is recorded

Publications (2)

Publication Number Publication Date
JP2000306088A true JP2000306088A (en) 2000-11-02
JP4507338B2 JP4507338B2 (en) 2010-07-21

Family

ID=26380326

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000046709A Expired - Lifetime JP4507338B2 (en) 1999-02-19 2000-02-18 Image correction apparatus and recording medium on which image correction program is recorded

Country Status (1)

Country Link
JP (1) JP4507338B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007259148A (en) * 2006-03-23 2007-10-04 Fujitsu Ltd Frequency threshold setting apparatus and method for histogram projection processing, and recording medium recorded with program therefor
JP2012527705A (en) * 2009-05-19 2012-11-08 ディジマーク コーポレイション Histogram method and system for object recognition
KR101349239B1 (en) 2007-11-26 2014-01-10 삼성전기주식회사 Apparatus and method for compressing image
CN111723763A (en) * 2020-06-29 2020-09-29 深圳市艾为智能有限公司 Scene recognition method based on image information statistics

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07306938A (en) * 1994-05-12 1995-11-21 Ge Yokogawa Medical Syst Ltd Image processing method and device therefor
JPH10294911A (en) * 1997-04-21 1998-11-04 Kawasaki Heavy Ind Ltd Method and device for compressing dynamic range of picture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07306938A (en) * 1994-05-12 1995-11-21 Ge Yokogawa Medical Syst Ltd Image processing method and device therefor
JPH10294911A (en) * 1997-04-21 1998-11-04 Kawasaki Heavy Ind Ltd Method and device for compressing dynamic range of picture

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007259148A (en) * 2006-03-23 2007-10-04 Fujitsu Ltd Frequency threshold setting apparatus and method for histogram projection processing, and recording medium recorded with program therefor
JP4571923B2 (en) * 2006-03-23 2010-10-27 富士通株式会社 Histogram projection processing frequency threshold setting apparatus, method, and recording medium recording the program.
KR101349239B1 (en) 2007-11-26 2014-01-10 삼성전기주식회사 Apparatus and method for compressing image
JP2012527705A (en) * 2009-05-19 2012-11-08 ディジマーク コーポレイション Histogram method and system for object recognition
CN111723763A (en) * 2020-06-29 2020-09-29 深圳市艾为智能有限公司 Scene recognition method based on image information statistics
CN111723763B (en) * 2020-06-29 2024-02-13 深圳市艾为智能有限公司 Scene recognition method based on image information statistics

Also Published As

Publication number Publication date
JP4507338B2 (en) 2010-07-21

Similar Documents

Publication Publication Date Title
JP4167097B2 (en) Image processing method and image processing apparatus
US7580566B2 (en) Image processing device, image processing method, storage medium, and program
US8284271B2 (en) Chroma noise reduction for cameras
EP1819143A1 (en) Color adjusting device and method
US7409083B2 (en) Image processing method and apparatus
US20060119713A1 (en) Digital still camera and image correction method
JP2002262303A (en) Video processing unit, video display device and video processing method used for the same, and its program
JP4850689B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
EP0961487A2 (en) Image processing method and apparatus and recording medium
JP2008283291A (en) Development processor for undeveloped image data, development processing method, and computer program for development processing
US6771815B2 (en) Image correction apparatus and recording medium for storing image correction program
JP2004326082A5 (en)
US7340104B2 (en) Correction parameter determining method, correction parameter determining apparatus, computer program, and recording medium
JP2002281348A (en) Image processor, image processing method and recording medium
JP2004007202A (en) Image processor
JP4507338B2 (en) Image correction apparatus and recording medium on which image correction program is recorded
JP2006237657A (en) Image processing apparatus, image correction program, and recording medium
JP2000092337A (en) Image processing method, its device and recording medium
JP2003223636A (en) Image processor
JP4247621B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP2001045303A (en) Image thresholding method
JP2000209437A (en) Image correction method and storage medium storing image correction program
JP2002094810A (en) Picture processor, picture processing method and memory medium having stored programs for the method
JPH09163164A (en) Image processing method and image processing unit
JP2001184503A (en) Device and method for processing image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091209

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091222

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100222

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100413

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100426

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4507338

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140514

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term