JP2000013624A - Image processing method, device and recording medium - Google Patents

Image processing method, device and recording medium

Info

Publication number
JP2000013624A
JP2000013624A JP10177133A JP17713398A JP2000013624A JP 2000013624 A JP2000013624 A JP 2000013624A JP 10177133 A JP10177133 A JP 10177133A JP 17713398 A JP17713398 A JP 17713398A JP 2000013624 A JP2000013624 A JP 2000013624A
Authority
JP
Japan
Prior art keywords
highlight
image
original image
histogram
highlight point
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
JP10177133A
Other languages
Japanese (ja)
Other versions
JP3817371B2 (en
Inventor
Manabu Yamazoe
学 山添
Kentaro Yano
健太郎 矢野
Tetsuya Suwa
徹哉 諏訪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP17713398A priority Critical patent/JP3817371B2/en
Priority to US09/338,424 priority patent/US6694051B1/en
Publication of JP2000013624A publication Critical patent/JP2000013624A/en
Application granted granted Critical
Publication of JP3817371B2 publication Critical patent/JP3817371B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To perform color processing that corresponds to the characteristic of an original image having plural highlight point detecting methods, selecting a highlight point corresponding to the characteristic of the original image and setting a color processing condition to the original image in accordance with the highlight point. SOLUTION: This device has plural highlight point detecting methods, selects a highlight point corresponding to the characteristic of an original image and sets a color processing condition to the original image in accordance with the highlight point. Also, a histogram of the original image is produced, whether or not a peak exists in a high luminance part in the histogram is detected and the highlight point detecting method is changed in accordance with the detected result. In this system, for instance, a printer 105 such as an ink jet printer and a monitor 106 are connected to a host computer 100. Also, the computer 100 has application software 101, a printer driver 103, etc., as software.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ハイライトポイン
トを決定する画像処理方法、装置および記録媒体に関す
る。
[0001] 1. Field of the Invention [0002] The present invention relates to an image processing method, apparatus, and recording medium for determining a highlight point.

【0002】[0002]

【従来の技術】近年パソコンの高速化、メモリーの大容
量化の加速と、デジタルカメラやフィルムスキャナーな
どの普及に伴い、パソコン上でデジタルデータとして写
真調の画像を扱う機会が増えてきた。しかし上記写真調
の入力画像は以下の理由により、色かぶりなどの画像の
劣化要因を付帯している場合が少なくない。
2. Description of the Related Art In recent years, with the increase in the speed of personal computers, the increase in the capacity of memories, and the spread of digital cameras and film scanners, opportunities for handling photographic images as digital data on personal computers have increased. However, the photographic input image often has image deterioration factors such as color cast for the following reasons.

【0003】例えばデジタルカメラを例に取ると、CC
Dカメラで撮影された画像は人間の目には感じられない
赤外光などの波長も取り込んでしまう場合がある。もち
ろん赤外カットフィルタなどの処理もなされているが、
必ずしも完全ではなく色バランスを崩している場合があ
る。
For example, taking a digital camera as an example, CC
An image captured by a D camera may capture wavelengths such as infrared light that cannot be sensed by human eyes. Of course, processing such as infrared cut filter is also performed,
The color balance is not always perfect and may be lost.

【0004】また、光源色の違いを人間は補正(順応)
し対象物を見ることが知られているが、カメラは光源の
違いをそのままフィルムに記録するのでカメラが正確に
測色再現していても結果的に色かぶりしてしまっている
ように見える場合もある。
In addition, humans correct differences in light source colors (adaptation).
It is known to look at the object, but the camera records the difference of the light source on the film as it is, so even if the camera accurately reproduces colorimetry, it seems that the color cast is consequently overcast There is also.

【0005】銀塩カメラで撮影したフィルムをラボでプ
リントする際には、一般に印画紙にプリントする段にお
いて撮影画像の画像解析によりシーンの解析を行い自動
補正する機能が盛り込まれている。本出願人はデジタル
カメラなどパソコン上に取り込まれたデジタルデータに
対する自動補正方法でその基本となるハイライト点とシ
ャドー点の取り方に関する設定方法を提案している。
When a film photographed by a silver halide camera is printed in a laboratory, a function for automatically correcting a scene by image analysis of a photographed image in a stage of printing on a photographic paper is generally incorporated. The present applicant has proposed a method of setting a highlight point and a shadow point, which is a basic method in an automatic correction method for digital data captured on a personal computer such as a digital camera.

【0006】このハイライト点とシャドー点の設定を自
動化する手法として、例えば、特開昭60-87594号公報に
おいては、入力信号の各色信号R,G,Bを重み付け加
算した輝度信号について累積度数ヒストグラムを作成
し、その累積度数ヒストグラムにおいて、あらかじめ設
定した所定の累積度数例えば1%,99%にそれぞれ対応
する輝度信号の上限値(ハイライト点濃度)、下限値
(シャドー点濃度)を求め、これら上限値と下限値とを
各色信号R,G,Bに共通して使用して正規化処理して
いる。
As a method of automating the setting of the highlight point and the shadow point, for example, in Japanese Patent Application Laid-Open No. 60-87594, the cumulative frequency of a luminance signal obtained by weighting and adding each color signal R, G, B of an input signal is disclosed. A histogram is created, and an upper limit value (highlight point density) and a lower limit value (shadow point density) of a luminance signal corresponding to predetermined cumulative frequencies, for example, 1% and 99%, respectively, are obtained from the cumulative frequency histogram. The upper limit value and the lower limit value are used in common for each of the color signals R, G, and B for normalization processing.

【0007】ここで、入力RGB信号が各8ビット情報
(0から255情報)、例えばNTSC方式により輝度
変換を行う場合、 Y(輝度)=0.30R+0.59G+0.11B であるから、輝度信号も同じく8ビット情報となる。す
なわち該ヒストグラムは0から255までの256通り
の輝度信号に対するそれぞれの度数を求めることにな
る。以下は、すべてRGB各色8ビットの256階調の
場合で考える。
Here, when the input RGB signal performs luminance conversion by 8-bit information (0 to 255 information), for example, the NTSC system, Y (luminance) = 0.30R + 0.59G + 0.11B. It becomes 8-bit information. That is, the histogram determines the respective frequencies for 256 luminance signals from 0 to 255. The following description is based on the case of 256 gradations of 8 bits for each RGB color.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、このよ
うに設定した基準濃度点を用いて画像を補正しても十分
に満足のいく結果を得ることができない場合がある。こ
の要因として、人間は自分の記憶色に基づいてものを見
ているという事実があげられる。
However, there are cases where a sufficiently satisfactory result cannot be obtained even when an image is corrected using the reference density points set in this way. This is due to the fact that humans are looking at things based on their memory color.

【0009】そこで記憶色処理、すなわち測色的に一致
させる色再現よりもむしろ、人間の心理的イメージすな
わち記憶色に一致させ、より満足される再現を作る、好
ましい色再現に関しては、青空、緑の草木、人間の肌で
多く行われている。
Therefore, rather than memory color processing, that is, colorimetrically matching color reproduction, it is possible to match human psychological images, that is, memory colors, to produce more satisfactory reproduction. The vegetation is much done on the human skin.

【0010】昼間の太陽光と室内のタングステン光は色
温度が著しく異なる光源であるが、人間の目はどちらの
光源下であってもグレーの物体(あるいは白)を認識で
きる。これは観察者が環境下のグレー(白)を認識し、
そこから光の応答を網膜の三つの錐体で同じになるよう
な感度の補正が自動的に行われるからである。しかしな
がら、カメラは光源の影響をもろに受けてしまうため、
そのまま測色的に忠実に再現しても、必ずしも人間が好
む色再現にはならないという問題点がある。
[0010] Daylight and indoor tungsten light are light sources having significantly different color temperatures, but the human eye can recognize a gray object (or white) under either light source. This allows the observer to perceive gray (white) in the environment,
This is because the sensitivity is automatically corrected so that the light response is the same for the three cones of the retina. However, since the camera is affected by the light source,
There is a problem that even if the colorimetric fidelity is reproduced as it is, the color reproduction which is preferred by humans is not always obtained.

【0011】特に青空を例に取ると、晴天屋外の撮影で
は、青空からの反射光によって、日陰部分の色温度が高
くなり、全体に青みがかかって写ってしまう。その青空
の中に雲がある場合、上に述べたようにこれを白とする
ような自動補正が人間の目でなされるため、人間が記憶
する青空の色と測色的な色ととの間にズレが生じると考
えられる。実際の写真において所望の雲にホワイトバラ
ンスを合わせることで、その青空を人間の記憶色に近づ
けられることが分かった。
In particular, taking the blue sky as an example, when photographing outdoors in fine weather, the color temperature of the shaded portion becomes high due to the reflected light from the blue sky, and the entire image is bluish. If there is a cloud in the blue sky, as described above, automatic correction to make it white is performed by the human eye, so the color of the blue sky memorized by humans and the colorimetric color It is considered that a gap occurs between them. It has been found that by adjusting the white balance to a desired cloud in an actual photograph, the blue sky can be approximated to a human memory color.

【0012】しかしながら、写真中の多くの部分を青空
が占めるような画像の場合、従来のような重み付けによ
る輝度信号のヒストグラムからでは、B信号の重みが低
いため、必ずしも最適なハイライト点が設定できない。
つまり青みがかった雲を白にするような補正をすること
にならない。
However, in the case of an image in which the blue sky occupies a large portion of a photograph, the weight of the B signal is low from the conventional histogram of the luminance signal by weighting, so that the optimum highlight point is not necessarily set. Can not.
In other words, it is not necessary to make a bluish cloud white.

【0013】また、逆光の状態で人物などを撮影すると
主被写体がアンダー気味になり、好ましい階調が得られ
ない。このような画像に対して、従来技術で示したよう
に例えば図10のような累積度数ヒストグラムから例え
ば99%でハイライト点を設定してもほとんど最高輝度に
張り付いており、これに基づいて補正を行ってもほとん
ど補正がかからない。
Further, when a person or the like is photographed in a backlight state, the main subject tends to be underexposed, and a preferable gradation cannot be obtained. Even if a highlight point is set at, for example, 99% from the cumulative frequency histogram as shown in FIG. The correction is hardly applied even if it is corrected.

【0014】本発明は、原画像の特性に応じた色処理を
行えるようにすることを目的とする。
An object of the present invention is to enable color processing according to the characteristics of an original image.

【0015】また、本発明は逆光シーンの原画像を良好
に再現できるようにすることを他の目的とする。
It is another object of the present invention to enable an original image of a backlight scene to be reproduced well.

【0016】[0016]

【課題を解決するための手段】上記目的を達成するため
に、本発明は以下の構成要件を有することを特徴とす
る。
Means for Solving the Problems In order to achieve the above object, the present invention is characterized by having the following components.

【0017】本願第1の発明は、複数のハイライトポイ
ント検出方法を有し、原画像の特性に応じたハイライト
ポイントを選択し、前記ハイライトポイントに応じて前
記原画像に対する色処理条件を設定することを特徴とす
る。
The first invention of the present application has a plurality of highlight point detection methods, selects highlight points according to characteristics of an original image, and sets color processing conditions for the original image according to the highlight points. It is characterized by setting.

【0018】本願第2の発明は、原画像のヒストグラム
を生成し、前記ヒストグラムにおいて高輝度部にピーク
があるか否かを検出し、前記検出結果に応じてハイライ
トポイント検出方法を異ならせることを特徴とする。
According to a second aspect of the present invention, a histogram of an original image is generated, it is detected whether or not a peak is present in a high-luminance portion in the histogram, and a highlight point detection method is changed according to the detection result. It is characterized by.

【0019】本願第3の発明は、原画像のヒストグラム
を生成し、前記ヒストグラムに基づき、原画像が逆光シ
ーンであるか否かを検出し、前記検出結果に応じたハイ
ライトポイント検出方法を用いてハイライトポイントを
検出することを特徴とする。
The third invention of the present application generates a histogram of an original image, detects whether or not the original image is a backlight scene based on the histogram, and uses a highlight point detection method according to the detection result. And detecting a highlight point.

【0020】[0020]

【発明の実施の形態】(実施形態1)以下、図面を参照
して本発明の実施形態を詳細に説明する。
(Embodiment 1) Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.

【0021】本実施形態におけるシステムの概略の1例
を図1に示す。ホストコンピュータ100には、例えば
インクジェットプリンタなどのプリンタ105とモニタ
106が接続されている。ホストコンピュータ100
は、ワープロ、表計算、インターネットブラウザ等のア
プリケーションソフトウエア101と、OS(OperatingS
ystem)102、該アプリケーションによってOS102
に発行される出力画像を示す各種描画命令群(イメージ
描画命令、テキスト描画命令、グラフィックス描画命
令)を処理して印刷データを作成するプリンタドライバ
103、およびアプリケーションが発行する各種描画命
令群を処理してモニタ106に表示を行なうモニタドラ
イバ104をソフトウエアとして持つ。
FIG. 1 shows a schematic example of the system according to the present embodiment. A printer 105 such as an ink jet printer and a monitor 106 are connected to the host computer 100. Host computer 100
Is an application software 101 such as a word processor, a spreadsheet, an Internet browser, etc., and an OS (OperatingS
ystem) 102, depending on the application OS 102
The printer driver 103 that processes various drawing commands (image drawing command, text drawing command, graphics drawing command) indicating an output image issued by the printer driver and creates print data, and processes various drawing commands issued by an application. And a monitor driver 104 for displaying on the monitor 106 as software.

【0022】ホストコンピュータ100は、これらソフ
トウエアが動作可能な各種ハードウエアとして中央演算
処理装置CPU108、ハードディスクドライバHD10
7、ランダムアクセスメモリRAM109、リードオンリ
ーメモリROM110等を備える。
The host computer 100 includes a central processing unit CPU 108 and a hard disk driver HD 10 as various hardware on which the software can operate.
7, a random access memory RAM 109, a read only memory ROM 110, and the like.

【0023】図1で示される実施形態として、例えば一
般的に普及しているIBM ATコンパチのパーソナルコンピ
ュータにMicrosoft Windows95をOSとして使用し、任意
の印刷可能なアプリケーションをインストールし、モニ
タとプリンタを接続した形態が1実施形態として考えら
れる。
As an embodiment shown in FIG. 1, for example, Microsoft Windows 95 is used as an OS on a commonly-used IBM AT compatible personal computer, an arbitrary printable application is installed, and a monitor and a printer are connected. This embodiment is considered as one embodiment.

【0024】ホストコンピュータ100では、モニタに
表示された表示画像にもとづき、アプリケーション10
1で、文字などのテキストに分類されるテキストデー
タ、図形などのグラフィックスに分類されるグラフィッ
クスデータ、自然画などに分類されるイメージ画像デー
タなどを用いて出力画像データを作成する。そして、出
力画像データを印刷出力するときには、アプリケーショ
ン101からOS102に印刷出力要求を行ない、グラフ
ィックスデータ部分はグラフィックス描画命令、イメー
ジ画像データ部分はイメージ描画命令で構成される出力
画像を示す描画命令群をOS102に発行する。OS102
はアプリケーションの出力要求を受け、出力プリンタに
対応するプリンタドライバ103に描画命令群を発行す
る。プリンタドライバ103はOS102から入力した印
刷要求と描画命令群を処理しプリンタ105で印刷可能
な印刷データを作成してプリンタ105に転送する。プ
リンタ105がラスタープリンタである場合は、プリン
タドライバ103では、OSからの描画命令に対して順次
画像補正処理を行い、そして順次RGB24ビットページ
メモリにラスタライズし、全ての描画命令をラスタライ
ズした後にRGB24ビットページメモリの内容をプリンタ
105が印刷可能なデータ形式、例えばCMYKデータに変
換を行ないプリンタに転送する。
In the host computer 100, based on the display image displayed on the monitor, the application 10
In step 1, output image data is created using text data classified as text such as characters, graphics data classified as graphics such as figures, image image data classified as natural images, and the like. When printing out the output image data, the application 101 issues a print output request to the OS 102, and the graphics data portion is a graphics drawing command, and the image image data portion is a drawing command indicating an output image composed of an image drawing command. The group is issued to the OS 102. OS102
Receives an output request from the application and issues a rendering command group to the printer driver 103 corresponding to the output printer. The printer driver 103 processes a print request and a drawing command group input from the OS 102, creates print data printable by the printer 105, and transfers the print data to the printer 105. When the printer 105 is a raster printer, the printer driver 103 sequentially performs image correction processing on a drawing command from the OS, and rasterizes the drawing command sequentially into an RGB 24-bit page memory. The contents of the page memory are converted into a data format printable by the printer 105, for example, CMYK data, and transferred to the printer.

【0025】プリンタドライバ103で行われる処理を
図2を用いて説明する。
The processing performed by the printer driver 103 will be described with reference to FIG.

【0026】プリンタドライバ103は、OS102から入力し
た描画命令群に含まれる色情報に対して、画像補正処理
部120で後述する画像補正処理を行う。プリンタ用補正
処理部121は、まず、画像補正処理された色情報によっ
て描画命令をラスタライズし、RGB24ビットページメモ
リ上にラスター画像を生成する。そして、各画素に対し
てプリンタの色再現性に応じたマスキング処理、ガンマ
補正処理および量子化処理などを行いプリンタ特性に依
存したCMYKデータを生成し、プリンタ105に転送する。
The printer driver 103 performs an image correction process described later in the image correction processing unit 120 on the color information included in the drawing command group input from the OS 102. First, the printer correction processing unit 121 rasterizes a drawing command using the color information subjected to the image correction processing, and generates a raster image on an RGB 24-bit page memory. Then, a masking process, a gamma correction process, a quantization process, and the like according to the color reproducibility of the printer are performed on each pixel to generate CMYK data depending on the printer characteristics, and transfer the CMYK data to the printer 105.

【0027】次に、画像補正処理部120で行われる処理
を図3を用いて説明する。
Next, the processing performed by the image correction processing section 120 will be described with reference to FIG.

【0028】本実施形態の画像補正処理は、原稿画像に
含まれる複数の原画像の各々に対して独立に行われる。
そして、該画像補正処理はヒストグラム作成処理(図3-
S20)とヒストグラムに応じた画像補正処理(図3-S30)
を行う。
The image correction processing of the present embodiment is performed independently for each of a plurality of original images included in a document image.
The image correction process is a histogram creation process (FIG. 3).
S20) and image correction processing according to the histogram (Fig. 3-S30)
I do.

【0029】ステップS20では、イメージ描画命令で
示される原画像に対して、ヒストグラムを作成する(図
4のステップS1〜ステップS7)。そして、作成された
ヒストグラムに基づき、画像のハイライトポイントおよ
びシャドーポイントを決定する。
In step S20, a histogram is created for the original image indicated by the image drawing command (see FIG.
Steps S1 to S7 of 4). Then, a highlight point and a shadow point of the image are determined based on the created histogram.

【0030】次に、S30において、S20で決定された
ハイライトポイントおよびシャドーポイントに基づいた
画像補正処理を行う。本実施形態では画像補正処理とし
て、原画像の色かぶりを補正する色かぶり補正、原画像
の露出最適化すべく輝度のコントラストを補正する露出
補正を行う。
Next, in S30, an image correction process based on the highlight point and the shadow point determined in S20 is performed. In this embodiment, as the image correction processing, color fogging correction for correcting the color fogging of the original image and exposure correction for correcting the luminance contrast in order to optimize the exposure of the original image are performed.

【0031】(輝度ヒスとグラムの作成)図4は本実施
形態での輝度ヒストグラムを作成するフローチャートで
ある。
(Preparation of Luminance Hiss and Gram) FIG. 4 is a flowchart for preparing a luminance histogram in this embodiment.

【0032】図4において、S1で原画像の輝度ヒスト
グラム作成のルーチンに入ると、S2で原画像の画素か
ら輝度ヒストグラムの作成に用いる画素の選択比率を決
定する。本実施形態では35万画素のデータの場合に全
画素を対象(選択比率100%)に輝度ヒストグラムを
作成する事とし、35万画素以上の画素数の原画像が入
力された場合には総画素数の比率に応じて画素選択(サ
ンプリング)を行う。即ち350万画素の原画像が入力
された場合には10画素に1画素(選択比率10%)の
割合で輝度ヒストグラムを作成する。本実施形態ではn
は次式により求める。
In FIG. 4, when a routine for creating a luminance histogram of an original image is entered in S1, a selection ratio of pixels used for creating a luminance histogram is determined from pixels of the original image in S2. In the present embodiment, in the case of data of 350,000 pixels, a luminance histogram is created for all the pixels (selection ratio 100%), and when an original image having more than 350,000 pixels is input, the total number of pixels is calculated. Pixel selection (sampling) is performed according to the ratio of numbers. That is, when an original image of 3.5 million pixels is input, a luminance histogram is created at a rate of one pixel per 10 pixels (selection ratio 10%). In the present embodiment, n
Is determined by the following equation.

【0033】 n=int(原画像の総画素数/基準画素数35万) (但し、n<1の時はn=1、nは整数) 続いてS3でラスター番号を管理するカウンターをリセ
ット/セットし、S4で該カウンターをインクリメント
する。
N = int (total number of pixels in the original image / reference pixel number 350,000) (however, when n <1, n = 1, n is an integer) Then, in S3, the counter for managing the raster number is reset / The counter is set, and the counter is incremented in S4.

【0034】本実施形態では画素の間引き(サンプリン
グ)はラスター単位で行うので、前記の選択比率10%
の場合には、ラスター番号を10で割ったときの余りが
0の場合にそのラスターに属する画素を対象に処理を行
う(S5)。
In this embodiment, since the pixel thinning (sampling) is performed in units of rasters, the selection ratio is 10%.
In the case of, if the remainder obtained by dividing the raster number by 10 is 0, the process is performed on the pixels belonging to the raster (S5).

【0035】〔if(ラスター番号Mod n)=0対
象ラスター else非対象ラスター〕 処理ラスターが前記非対象ラスターの場合にはS4に戻
る。対象ラスターの場合にはS6に進み該ラスターに属
する夫々の画素に対して輝度変換、色度変換を処理を行
う。本実施形態における輝度変換、色度変換は以下の式
により行う。なお、輝度、色度変換は以下の式に限らず
従来の技術で示したように様々な式を用いることが可能
である。
[If (raster number Mod n) = 0 target raster else non-target raster] If the processing raster is the non-target raster, the process returns to S4. In the case of the target raster, the process proceeds to S6, where luminance conversion and chromaticity conversion are performed on each pixel belonging to the raster. The luminance conversion and the chromaticity conversion in the present embodiment are performed by the following equations. Note that the luminance and chromaticity conversions are not limited to the following equations, and various equations can be used as shown in the related art.

【0036】Y (輝度)=int(0.30R+0.
59G+0.11B)、(Yは整数) C1(色度)=R−Y C2(色度)=B−Y
Y (luminance) = int (0.30R + 0.
59G + 0.11B), (Y is an integer) C1 (chromaticity) = RY C2 (chromaticity) = BY

【0037】また本実施形態では白位置(ハイライトポ
イント)、黒位置(シャドーポイント)の検出精度を向
上させるために次式により彩度の計算を行い、予め定め
た彩度値(Sconst)より大きいか否かを判断する
(S7)。高彩度の画素の情報は輝度ヒストグラムに反
映させない。
In this embodiment, in order to improve the detection accuracy of the white position (highlight point) and the black position (shadow point), the saturation is calculated by the following equation, and is calculated from a predetermined saturation value (Sconst). It is determined whether it is larger (S7). The information of the high-saturation pixels is not reflected on the luminance histogram.

【0038】彩度S=sqrt(C1^2+C2^2) 即ち、(S>Sconst)の場合にはS6に戻り該画
素のデータは以後の処理に反映させない。この処理の効
果を具体例を挙げて説明する。例えばイエローの画素
(R=G=255、B=0)は無彩色の画素がイエロー
に色かぶりしたと判断するよりも元々イエローの色相の
色であると判断した方が多くの場合間違えが少ない。し
かし上記計算式で該画素の輝度を求めると輝度値は「2
26」であり、極めて高輝度の画素であることがわか
る。よって該画素を輝度ヒストグラムの作成に含めてし
まうと白位置検出時に誤差を生じてしまう場合がある。
Saturation S = sqrt (C1 ^ 2 + C2 ^ 2) That is, in the case of (S> Sconst), the process returns to S6, and the data of the pixel is not reflected in the subsequent processing. The effect of this processing will be described with a specific example. For example, in many cases, it is less likely that a yellow pixel (R = G = 255, B = 0) is determined to have a yellow hue color than to determine that an achromatic pixel is colored yellow. . However, when the brightness of the pixel is obtained by the above calculation formula, the brightness value becomes “2
26 ", which means that the pixel has extremely high luminance. Therefore, if the pixel is included in the creation of the luminance histogram, an error may occur when the white position is detected.

【0039】該画素の彩度は上記計算式によれば「22
7」を示し十分に彩度の高い色である事が分かる。よっ
て本実施形態では既定の彩度(Sconst)を定め、
該既定の彩度以上の画素は輝度ヒストグラムに含めな
い。
According to the above equation, the saturation of the pixel is “22”
7 "indicates that the color is sufficiently high in color. Therefore, in the present embodiment, a predetermined saturation (Sconst) is determined,
Pixels with the predetermined saturation or higher are not included in the luminance histogram.

【0040】よって、該画素により白位置検出に誤差が
生じることを防ぐことができ、白位置検出の精度を向上
させることができる。
Therefore, it is possible to prevent an error from occurring in the white position detection due to the pixel, and to improve the accuracy of the white position detection.

【0041】上記S7の判断の後、条件を満たした画素
(S<Sconst)について輝度ヒストグラムを作成
していく(S8)。ここで本実施形態で扱う画素データ
RGBは各8ビット(256階調)データであるので輝
度Yも256の深さに変換される。よって輝度ヒストグ
ラムは0から255までの256の輝度値の画素が夫々
何度数あるかを計算する事となる。
After the determination in S7, a luminance histogram is created for pixels satisfying the condition (S <Sconst) (S8). Here, since the pixel data RGB handled in this embodiment is 8-bit (256 gradation) data, the luminance Y is also converted to a depth of 256. Therefore, the luminance histogram calculates how many pixels having 256 luminance values from 0 to 255 exist.

【0042】またC1、C2の計算値は後の色かぶり補
正時に各輝度値に属する画素の平均色度を算出するデー
タとして用いるので本実施形態では次のようにデータ保
持を行う。0から255の構造体配列変数の形式で、度
数、C1累積値、C2累積値の3メンバーを設定し、各
画素ごとの演算結果を各メンバーに反映していく。
Since the calculated values of C1 and C2 are used as data for calculating the average chromaticity of the pixels belonging to each luminance value at the time of color cast correction later, the data is held as follows in this embodiment. In the form of a structure array variable from 0 to 255, three members of frequency, C1 cumulative value, and C2 cumulative value are set, and the calculation result for each pixel is reflected in each member.

【0043】対象ラスターの全画素の処理が終了したか
どうかを判断し(S9)、ラスター内に未処理画素が残
っている場合にはS6に戻りS6以降の処理を繰り返
す。ラスター内の全画素の処理が終了したらS10で未
処理のラスターが残っているかを判断し、全ラスター終
了であればS11で終了し、未処理のラスターが残って
いればS4に戻り上記処理を繰り返す。
It is determined whether or not the processing of all the pixels of the target raster has been completed (S9). If any unprocessed pixels remain in the raster, the process returns to S6 to repeat the processing from S6. When the processing of all the pixels in the raster is completed, it is determined in S10 whether an unprocessed raster remains. If the processing is completed for all the rasters, the processing ends in S11. If the unprocessed raster remains, the processing returns to S4 to repeat the above processing. repeat.

【0044】以上の様に原画像の画素を選択しながら輝
度ヒストグラムを作成する事により、必要最小限の画素
数で、且つ後の白位置、黒位置検出時の精度の向上も考
慮した輝度ヒストグラムの作成を行う事が出来る。
As described above, by creating a luminance histogram while selecting pixels of the original image, a luminance histogram with a minimum necessary number of pixels and taking into account the improvement of the accuracy in detecting white and black positions later. Can be created.

【0045】(ハイライトポイント、シャドーポイント
の決定)輝度信号に基づくヒストグラムを作成し、あら
かじめ設定した所定の累積度数例えば1%、99%にそれ
ぞれ対応する輝度信号の上限値(ハイライトHL1)、
下限値(シャドーポイントSD)を検出する。
(Determination of Highlight Point and Shadow Point) A histogram based on the luminance signal is created, and the upper limit value (highlight HL1) of the luminance signal corresponding to a predetermined cumulative frequency, for example, 1% or 99%, respectively,
The lower limit (shadow point SD) is detected.

【0046】さらに、本実施形態では、フォト画像領域
の大部分を青空であるような場合を考慮して、輝度と比
較して青色に対する重みが大きいRGB信号の単純平均
に基づくヒストグラムを生成し、ハイライトHL2を検
出する。ここでは、単純平均値を単に明度と呼び、これ
によって構成されるヒストグラムを明度ヒストグラムと
呼ぶ。
Further, in the present embodiment, taking into consideration the case where most of the photo image area is blue sky, a histogram is generated based on a simple average of RGB signals having a larger weight for blue compared to luminance. The highlight HL2 is detected. Here, the simple average value is simply called lightness, and the histogram formed by this is called a lightness histogram.

【0047】「晴れた青空」がシーンの多くを占めるよ
うな場合の明度ヒストグラムでは、図5のように0から
255の中間よりやや高明度側にピークが現れる。そこ
で、このピークの高明度側の裾野に相当する輝度をHL
2として検出する。
In the brightness histogram in the case where “sunny blue sky” occupies most of the scene, as shown in FIG. 5, a peak appears on the slightly higher brightness side than the middle between 0 and 255. Therefore, the luminance corresponding to the high-light side of this peak is represented by HL.
Detected as 2.

【0048】本実施形態では、厳密な意味で輝度と単純
平均は異なるから、明度ヒストグラムに累積する際に、
256個のテーブルを用意し、それぞれの明度に対応づ
けたテーブルにそのときの輝度値を格納し、インクリメ
ントしていく。そして最終的に各明度の合計値をそこに
格納された個数で割り、平均値を計算する。
In this embodiment, the luminance and the simple average are strictly different from each other.
256 tables are prepared, and the luminance value at that time is stored in a table corresponding to each brightness, and is incremented. Finally, the total value of each lightness is divided by the number stored therein to calculate an average value.

【0049】ついで、図5に示したような、高明度側か
らの第1のピークを検出し、その裾野に相当する明度に
関して、該テーブルに格納されている輝度値をHL2と
する。第1のピークは、ヒストグラムに対して平滑化処
理した後に、高明度側からヒストグラムの各明度におけ
る接線の傾きを求め、該傾きが所定値以上になった明度
である。
Next, the first peak from the high lightness side as shown in FIG. 5 is detected, and the brightness value stored in the table is set to HL2 for the lightness corresponding to the bottom thereof. The first peak is the brightness at which the slope of the tangent at each brightness of the histogram is obtained from the high brightness side after the histogram has been smoothed, and the slope has reached a predetermined value or more.

【0050】このように、本実施形態では、輝度ヒスト
グラムおよび明度ヒストグラムという異なる2つのヒス
トグラムの各々からハイライトポイントを検出し、各ハ
イライトポイントの輝度値を求める。
As described above, in this embodiment, a highlight point is detected from each of two different histograms, a luminance histogram and a brightness histogram, and the luminance value of each highlight point is obtained.

【0051】つぎに、求めた2つのハイライトポイント
(HL1、HL2)を比較し、原画像に適したハイライト
ポイントを決定する。
Next, the obtained two highlight points (HL1 and HL2) are compared to determine a highlight point suitable for the original image.

【0052】2つのハイライトポイントを比較した結果
が、 HL2<HL1 であるならばHL2をハイライトポイントとして決定す
る。ただし、HL2>150などある程度の制限は必要と
なる。通常青空のシーンのヒストグラムでは青空部部が
しめるヒストグラムは中間よりもやや高信号側になる
(あらかじめ実験的に情報を得る)のでこれより低信号
側にHL2が設定されないようにこのしきい値をあらか
じめ設定しておく。
If the result of comparing the two highlight points is that HL2 <HL1, HL2 is determined as the highlight point. However, some restrictions such as HL2> 150 are required. Normally, in the histogram of a blue sky scene, the histogram indicated by the blue sky part is slightly higher than the middle signal side (information is obtained experimentally in advance). Therefore, this threshold value is set so that HL2 is not set on the lower signal side. Set in advance.

【0053】これに対して、2つのハイライトポイント
を比較した結果が上記条件を満たさない場合は、HL1
をハイライトポイントとして決定する。
On the other hand, if the result of comparing the two highlight points does not satisfy the above condition, HL1
Is determined as a highlight point.

【0054】なお、シャドーポイントは、輝度ヒストグ
ラムで求められたシャドーポイントを採用する。
As the shadow point, a shadow point obtained from the luminance histogram is used.

【0055】本実施形態によれば、ハイライト点をシー
ンの特性によって変更することで、従来の設定方法によ
る画像補正よりもさらに好適な結果を得ることができ
る。すなわち、晴れた青空がシーンの中に含まれるよう
な画像に対して、ハイライトポイントとして青空以外の
ポイントを設定することができる。したがって、例え
ば、青空の中に雲がある場合は、人間の目と同様に雲
(青空より明度が高い白で示される)をハイライトポイ
ントと設定することができる。よって、人間の記憶色に
近い青空の色を再現することができる。
According to the present embodiment, by changing the highlight point according to the characteristics of the scene, it is possible to obtain a more favorable result than the image correction by the conventional setting method. That is, a point other than the blue sky can be set as a highlight point for an image in which a clear blue sky is included in the scene. Therefore, for example, when there is a cloud in the blue sky, a cloud (indicated by white having a higher brightness than the blue sky) can be set as a highlight point like the human eye. Therefore, it is possible to reproduce the color of the blue sky that is close to the memory color of humans.

【0056】(色かぶり補正)上記の通り原画像の
「Y、C1、C2」色空間における白位置、黒位置が求
められたら、引き続いて色かぶりの補正を行う。
(Color Fogging Correction) As described above, when the white position and the black position of the original image in the "Y, C1, C2" color space are obtained, the color fogging is subsequently corrected.

【0057】もし原画像に色かぶりが無く理想的な画像
であるとすれば、無彩色はR=G=Bであり、白位置、
黒位置の色度の演算値は「C1w=C2w=C1k=C
2k=0」となる。しかし色かぶりがある場合には、か
ぶっている色相方向に、かぶっている程度に比例して、
(Yw,C1w,C2w)と(Yk、C1k、C2k)
を結ぶ直線(色立体軸)に傾きが生じる。色かぶり補正
は該色立体軸とY軸が一致する様に変換する事で達成で
きる。方法は色立体を回転、平行移動させることでも達
成できるし、座標系を変換する事でも達成できる。
If the original image is an ideal image without color cast, the achromatic color is R = G = B, and the white position,
The calculated value of the chromaticity at the black position is “C1w = C2w = C1k = C
2k = 0 ". However, if there is a color cast, in the direction of the hue being covered, in proportion to the degree of the covering,
(Yw, C1w, C2w) and (Yk, C1k, C2k)
Are inclined in the straight line (color solid axis) connecting the two. The color cast correction can be achieved by performing conversion so that the color solid axis and the Y axis coincide. The method can be achieved by rotating and translating the color solid, or by transforming the coordinate system.

【0058】本実施形態ではまず原画像の色立体におい
て、色立体軸の最低輝度点(下端点)を回転中心、色立
体軸を回転軸としてY軸と平行となる様に回転させる。
次いで前記最低輝度点の位置が(Y′,C1′,C
2′)空間の原点となるように座標系を変換する。
In the present embodiment, first, the color solid of the original image is rotated so that the lowest luminance point (lower end point) of the color solid axis is the center of rotation and the color solid axis is the axis of rotation so as to be parallel to the Y axis.
Next, the position of the lowest luminance point is (Y ', C1', C
2 ') Transform the coordinate system to be the origin of space.

【0059】図5(a)の色立体に対して色かぶり補正
を行った結果を図5(b)に示す。
FIG. 5B shows the result of performing color cast correction on the color solid of FIG. 5A.

【0060】以上の処理により、該最低輝度点が原点
で、色立体軸がY軸と一致する変換処理が実現する。
With the above processing, a conversion processing is realized in which the lowest luminance point is the origin and the color solid axis coincides with the Y axis.

【0061】3次元空間上で回転軸と回転角度が決まっ
ている系で、立体を所望の角度で回転させる回転行列を
求める手法は公知の技術であるので詳細な説明は省略す
る。
In a system in which a rotation axis and a rotation angle are determined in a three-dimensional space, a method of obtaining a rotation matrix for rotating a solid at a desired angle is a known technique, and a detailed description thereof will be omitted.

【0062】以上の様に、原画像の各画素を輝度、色度
データ(Y,C1、C2)に変換し、3次元色空間上で
回転、平行移動変換する(Y’、C1’、C2’)事に
より、色かぶりの補正を行う事が可能となる。
As described above, each pixel of the original image is converted into luminance and chromaticity data (Y, C1, C2), and is rotated and translated in a three-dimensional color space (Y ', C1', C2). ') Makes it possible to perform color cast correction.

【0063】(露出、彩度補正)上記の色かぶり補正を
行う事で原画像の色相のずれを補正する事は可能である
が、更に画像レベルを向上する手段として露出補正、彩
度補正を行う。
(Exposure and Saturation Correction) The hue shift of the original image can be corrected by performing the above-described color fogging correction. However, as a means for further improving the image level, exposure correction and saturation correction are performed. Do.

【0064】本実施形態では露出のオーバー、アンダー
を簡易的に判断し、それに応じて輝度信号にγ補正を施
し露出補正を行う。
In this embodiment, over- and under-exposures are easily determined, and γ correction is performed on the luminance signal to perform exposure correction accordingly.

【0065】露出補正は入力輝度値0〜255を出力輝
度値0〜255に変換する1次元LUTにより行う。本
実施形態における該LUTは、黒位置(シャドーポイン
ト)の輝度値「Yk」と白位置(ホワイトポイント)の
輝度値「Yw」とその間に存在する変曲点の輝度値
「T’」の3点を結ぶ2直線として表現できる(図6参
照)。
Exposure correction is performed by a one-dimensional LUT that converts input luminance values 0 to 255 into output luminance values 0 to 255. The LUT according to the present embodiment has a luminance value “Yk” at a black position (shadow point), a luminance value “Yw” at a white position (white point), and a luminance value “T ′” at an inflection point existing therebetween. It can be expressed as two straight lines connecting points (see FIG. 6).

【0066】本実施形態では該黒位置の輝度値「Yk」
を輝度値「10」へ、該白位置の入力輝度値「Yw」を
輝度値「245」に変換する。更に該変曲点の輝度値
「T’」は次の通り定義し変換する。前記色かぶり補正
前の色立体軸とY軸(輝度軸)の最小距離をなす輝度値
をTとした時、該輝度値Tと原画像の色立体の最低輝度
値との差を変曲点の輝度値「T’」とする。該変曲点の
輝度値T’を前記輝度値「T」に変換する。
In the present embodiment, the luminance value “Yk” at the black position
Is converted into a luminance value “10”, and the input luminance value “Yw” at the white position is converted into a luminance value “245”. Further, the luminance value “T ′” of the inflection point is defined and converted as follows. Assuming that a luminance value forming a minimum distance between the color solid axis before color cast correction and the Y axis (luminance axis) is T, the difference between the luminance value T and the minimum luminance value of the color solid of the original image is an inflection point. Is assumed to be “T ′”. The luminance value T 'at the inflection point is converted to the luminance value "T".

【0067】即ち、図3の様に黒位置「Yk」は輝度値
「10」に(a点)、変曲点「T’」は輝度値「T」に
(b点)、白位置「Yw」は輝度値「245」に(c
点)に、夫々変換される。その他の原画像の輝度値は図
3の太線に記すように該「a」と「b」、「b」と
「c」を結んだ直線に沿って夫々変換する。
That is, as shown in FIG. 3, the black position "Yk" has a luminance value of "10" (point a), the inflection point "T '" has a luminance value of "T" (point b), and the white position "Yw". Is changed to a luminance value “245” (c
Point). The luminance values of the other original images are converted along the straight lines connecting “a” and “b” and “b” and “c”, respectively, as indicated by the thick lines in FIG.

【0068】更に、彩度補正は例えば以下のように行う
事が出来る。各原画素の色度C1,C2に対して、 C1“=n*C1‘ C2“=n*C2‘ (但し、nは彩度係数) 該彩度係数「n」を調整する事によって彩度補正を容易
に行う事が可能である。
Further, the saturation correction can be performed, for example, as follows. For the chromaticities C1 and C2 of each original pixel, C1 "= n * C1 'C2" = n * C2' (where n is a saturation coefficient) The saturation is adjusted by adjusting the saturation coefficient "n". Correction can be easily performed.

【0069】以上で本実施形態における各種補正が終了
する。この時点で原画像の各画素は(R、G、B)の色
信号データから(Y“,C1”,C2“)の色空間デー
タに変換された状態にあるので、再度(R‘,G‘,B
‘)の色信号データに逆変換する。該逆変換は以下の式
により行う。
With the above, various corrections in this embodiment are completed. At this point, each pixel of the original image has been converted from the (R, G, B) color signal data to the (Y ", C1", C2 ") color space data. ', B
') Inverse conversion to color signal data. The inverse conversion is performed by the following equation.

【0070】R‘ =Y“+C” G‘ =Y“−(0.3/0.59)*C1”−(0.
11/0.59)*C2“ B‘ =Y“+C2”
R '= Y "+ C"G' = Y "-(0.3 / 0.59) * C1"-(0.
11 / 0.59) * C2 "B '= Y" + C2 "

【0071】なお、サンプリングをラスター単位でなく
カラム単位で行っても構わない。
The sampling may be performed not on a raster basis but on a column basis.

【0072】(実施形態2)実施形態1におけるハイラ
イトポイント決定処理にかかる他の方法を説明する。
(Second Embodiment) Another method relating to the highlight point determination processing in the first embodiment will be described.

【0073】フォト画像で、逆光で撮影したものや、シ
ーンの中に蛍光灯などの光源が入っている場合、例えば
図8のように、主被写体はアンダー気味になり、また、
輝度ヒストグラムの所定の累積度数の輝度値をハイライ
トポイントとして設定してもほとんど255に張り付い
ており、該ハイライトポイントに基づく画像補正処理を
行ってもほとんど補正がかからない。そこでこのような
ケースについてはハイライトを再設定する必要がある。
以下このようなケースをまとめて「逆光シーン」と呼
ぶ。
In the case of a photo image photographed in backlight or a scene including a light source such as a fluorescent lamp, the main subject is under-underlooked as shown in FIG.
Even if a luminance value of a predetermined cumulative frequency of the luminance histogram is set as a highlight point, the luminance value is almost stuck to 255, and even if image correction processing based on the highlight point is performed, little correction is applied. Therefore, it is necessary to reset the highlight in such a case.
Hereinafter, such cases are collectively referred to as a "backlight scene".

【0074】ここで用いるヒストグラムは、輝度・明度
のいずれでもよいが、どちらかといえば、明度ヒストグ
ラムの方がより顕著にその傾向を得ることができる。
The histogram used here may be either luminance or brightness, but if anything, the brightness histogram can obtain the tendency more remarkably.

【0075】逆光シーンにおけるハイライトポイント決
定方法を、以下具体的に説明する。
A method for determining a highlight point in a backlight scene will be specifically described below.

【0076】該ヒストグラムが図8のようになっている
場合、ハイライトポイントを図のような逆光部分がしめ
る分布部の裾野から一定割合の所を設定する。逆行部分
がしめる分布部の裾野は、実施形態1の明度ヒストグラ
ムの裾野の検出方法と同様の方法で検出することができ
る。すなわち、ヒストグラムの接線の傾きの変動具合に
基づき検出することができる。
In the case where the histogram is as shown in FIG. 8, a fixed point is set from the base of the distribution part where the highlight point is as shown in the figure. The tail of the distribution part caused by the backward part can be detected by the same method as the method of detecting the tail of the brightness histogram in the first embodiment. That is, detection can be performed based on the degree of change in the inclination of the tangent line of the histogram.

【0077】あるいは、「逆光シーン」であると判定し
た場合に限り、ハイライトの検出時のスタート地点を2
55ではなく、例えば240などのように所定の値から
始める。
Alternatively, only when it is determined that the scene is a “backlit scene”, the start point when the highlight is detected is set to 2
Instead of 55, start with a predetermined value, for example 240.

【0078】「逆光シーン」の判定は、以下のように行
う。
The judgment of "backlit scene" is performed as follows.

【0079】225〜240の度数の合計数SUM1と241〜255
の度数の合計数SUM2の関係が、 2×SUM1 < SUM2 の関係を満たすような場合は、「逆光シーン」であると
判定する。
The total number of frequencies 225 to 240 SUM1 and 241 to 255
If the relationship of the total number of frequencies SUM2 satisfies the relationship 2 × SUM1 <SUM2, it is determined that the scene is a “backlit scene”.

【0080】原画像が「逆行シーン」であると判定され
た場合は、図3に示すようなスタート地点(例えば、2
40)から1%のところを新たにハイライトとする。こ
こでの加算する範囲や係数はあくまでも経験に基づくも
のであるから、所望のシーンによって実験的に求めれば
よい。
If it is determined that the original image is a “reverse scene”, a start point (for example, 2
40% from 1% is newly highlighted. The ranges and coefficients to be added here are based on experience, and may be obtained experimentally for a desired scene.

【0081】このようにあらかじめ「逆光シーン」であ
ると判定した画像に対しては、ハイライト点の取り方を
変更することで、より好適な画像補正を行えることがで
きる。
As described above, more appropriate image correction can be performed on an image that has been determined to be a “backlight scene” in advance by changing the way of setting highlight points.

【0082】なお、「逆光シーン」と判定された場合
は、上記の様にハイライトポイントを決定するととも
に、以下の様に実施形態1の露出補正を制御することに
より、より高品質の画像を得ることができる。
When it is determined that the scene is a “backlit scene”, a highlight point is determined as described above, and the exposure correction of the first embodiment is controlled as described below, so that a higher quality image can be obtained. Obtainable.

【0083】「逆光シーン」の場合上述したようにハイ
ライトポイントが通常シーンより低く設定される。した
がって、「逆光シーン」の場合は、原画像におけるハイ
ライトポイント以上の輝度を有する画素の割合が通常シ
ーンより大きくなる。
In the case of the "backlit scene", the highlight point is set lower than the normal scene as described above. Therefore, in the case of a “backlit scene”, the proportion of pixels having luminance equal to or higher than the highlight point in the original image is larger than that in the normal scene.

【0084】よって、「逆光シーン」に対して実施形態
1と同様の露出補正を行ってしまうと原画像において白
に変換される画素が多すぎてしまい出力画像の品質が悪
くなる可能性がある。そこで、「逆光シーン」の場合
は、露出補正においてハイライトポイントを変換する輝
度値を通常シーンより暗い例えば「220」に設定す
る。このようにシーンの種類に応じて画像補正条件の設
定方法をかえることにより、「逆光シーン」を良好に再
現することができる。
Therefore, if the same exposure correction as in the first embodiment is performed on the “backlit scene”, too many pixels are converted to white in the original image, and the quality of the output image may be degraded. . Therefore, in the case of the "backlit scene", the luminance value for converting the highlight point in the exposure correction is set to, for example, "220" darker than the normal scene. By changing the setting method of the image correction conditions according to the type of the scene in this manner, the "backlit scene" can be reproduced well.

【0085】「逆光シーン」における変換後の輝度値
は、原画像におけるハイライトポイント以上の画素の割
合に応じて自動的に設定するようにしても構わない。
The luminance value after the conversion in the “backlight scene” may be automatically set according to the ratio of pixels above the highlight point in the original image.

【0086】(実施形態3)実施形態3では、第1およ
び第2の実施形態をとりまとめた形でハイライトポイン
トを設定する際の処理を図9を用いて説明する。
(Embodiment 3) In Embodiment 3, a process for setting a highlight point in a form combining the first and second embodiments will be described with reference to FIG.

【0087】実施形態3によれば、逆光シーンに対して
好適な画像補正を行うことができるとともに、晴れた青
空のシーンを人間の記憶色によりちかく補正することが
できる。
According to the third embodiment, suitable image correction can be performed for a backlight scene, and a scene with a clear blue sky can be corrected more easily with a memory color of a human.

【0088】まず、ステップS12において、原画像が
「逆光シーン」であるか否かを、原画像の輝度ヒストグ
ラムに基づき実施形態3で説明した判定方法を用いて判
定する。
First, in step S12, it is determined whether or not the original image is a “backlit scene” using the determination method described in the third embodiment based on the luminance histogram of the original image.

【0089】原画像が「逆光シーン」であると判定され
た場合は、実施形態1で説明したハイライトポイント決
定方法を用いてハイライトポイントHL、シャドーポイン
トSDを決定する(ステップS13、S14、S15)。
If it is determined that the original image is a “backlit scene”, the highlight point HL and the shadow point SD are determined by using the highlight point determination method described in the first embodiment (steps S13, S14, S13). S15).

【0090】これに対して、ステップS12において、原
画像が「逆光シーン」でないと判定された場合は、実施
形態3で説明したハイライトポイント決定方法を用いて
ハイライトポイントHL、シャドーポイントSPを決定す
る。
On the other hand, if it is determined in step S12 that the original image is not a “backlit scene”, the highlight point HL and the shadow point SP are determined using the highlight point determination method described in the third embodiment. decide.

【0091】ステップS17では、決定されたハイライト
ポイントHLおよびシャドーポイントSDに基づき、実施形
態1で説明した画像補正処理を行う。
In step S17, the image correction processing described in the first embodiment is performed based on the determined highlight point HL and shadow point SD.

【0092】このように、上記各実施形態によれば、画
像補正を行う上で基本となるハイライト点をシーンの特
性によって変更することで、従来の設定方法による画像
補正よりもさらに好適な結果を得ることができる。
As described above, according to each of the above-described embodiments, by changing the highlight point, which is the basis for performing image correction, according to the characteristics of the scene, a more preferable result than the image correction by the conventional setting method is obtained. Can be obtained.

【0093】すなわち、実施形態1および3によれば、
特に晴れた青空がシーンの中に含まれるような画像に対
して、人間の記憶色に近い青空の色を再現することがで
きる。
That is, according to Embodiments 1 and 3,
In particular, for an image in which a clear blue sky is included in the scene, the color of the blue sky that is close to the memory color of humans can be reproduced.

【0094】また、実施形態2および3によれば、逆光
シーンや室内で撮影した際に蛍光灯などがシーンに含ま
れているような画像に関してもより好適な画像補正を行
うことができる。
Further, according to the second and third embodiments, more preferable image correction can be performed for a backlight scene or an image in which a fluorescent light or the like is included in the scene when the image is taken indoors.

【0095】(他の実施形態)上記実施形態では、画像
補正処理において最初に色かぶり補正を行い、その後に
露出のアンダーやオーバーを補正するいわゆるコントラ
スト調整を行ったが、その順序は問われない。また、ハ
イライト/シャドーポイントの決定方法や画像補正に関
するアルゴリズムは上記方法にかぎられず他の多種多様
の方法を用いることができる。
(Other Embodiments) In the above embodiment, in the image correction processing, the color cast is first corrected, and then the so-called contrast adjustment for correcting underexposure or overexposure is performed, but the order is not limited. . Also, the method of determining the highlight / shadow point and the algorithm relating to the image correction are not limited to the above methods, and various other methods can be used.

【0096】また、上記実施形態1では明度ヒストグラ
ムを作成するために単純平均を用いていたが、輝度信号
に比べて多少青色成分に重みをおいて作成した明るさを
しめす色成分に基づきヒストグラムを作成すればよい。
In the first embodiment, the simple average is used to create the brightness histogram. However, the histogram is based on the color component indicating the brightness, which is slightly weighted with respect to the blue component as compared with the luminance signal. Just create it.

【0097】また、上記実施形態1では自動的に、輝度
ヒストグラムに基づくハイライトポイントまたは明度ヒ
ストグラムに基づくハイライトポイントのいずれかを選
択したが、ユーザのマニュアル指示に応じていずれかを
選択するようにしても構わない。
In the first embodiment, either the highlight point based on the luminance histogram or the highlight point based on the brightness histogram is automatically selected, but either one is selected according to a manual instruction from the user. It does not matter.

【0098】例えば、プリンタドライバのユーザインタ
ーフェイス上で、ユーザが青空シーンを対象とする「青
空モード」を選択した場合は明度ヒストグラムに基づく
ハイライトポイントを選択するようにする。「青空モー
ド」が選択されなかった場合は実施形態1のように自動
的にハイライトポイントを選択する。
For example, when the user selects the “blue sky mode” for the blue sky scene on the user interface of the printer driver, a highlight point based on the brightness histogram is selected. If the “blue sky mode” is not selected, a highlight point is automatically selected as in the first embodiment.

【0099】また、「青空シーン」対策だけでなく、他
のシーンに応じて複数の明るさを示す色成分生成方法を
用意し、実施形態1のように原画像の色分布に応じて自
動的にいずれかの色成分に応じたヒストグラムを選択す
るようにしても構わないし、ユーザの指示に基づきヒス
トグラムを選択するようにしても構わない。
In addition to the countermeasures against the “blue sky scene”, a color component generation method showing a plurality of brightness levels according to other scenes is prepared, and automatic generation is performed according to the color distribution of the original image as in the first embodiment. Alternatively, a histogram corresponding to any one of the color components may be selected, or a histogram may be selected based on a user's instruction.

【0100】また前述した実施形態の機能を実現する様
に各種のデバイスを動作させる様に該各種デバイスと接
続された装置あるいはシステム内のコンピュータに、前
記実施形態機能を実現するためのソフトウエアのプログ
ラムコードを供給し、そのシステムあるいは装置のコン
ピュータ(CPUあるいはMPU)を格納されたプログラムに
従って前記各種デバイスを動作させることによって実施
したものも本発明の範疇に含まれる。
The software for realizing the functions of the above-described embodiment is installed in an apparatus or a computer in the system connected to the various devices so as to operate the various devices so as to realize the functions of the above-described embodiment. The present invention also includes a program code supplied and executed by operating a computer (CPU or MPU) of the system or apparatus according to a stored program to operate the various devices.

【0101】またこの場合、前記ソフトウエアのプログ
ラムコード自体が前述した実施形態の機能を実現するこ
とになり、そのプログラムコード自体、及びそのプログ
ラムコードをコンピュータに供給するための手段、例え
ばかかるプログラムコードを格納した記憶媒体は本発明
を構成する。
In this case, the program code itself of the software realizes the functions of the above-described embodiment, and the program code itself and means for supplying the program code to a computer, for example, the program code The storage medium storing the information constitutes the present invention.

【0102】かかるプログラムコードを格納する記憶媒
体としては例えばフロッピーディスク、ハードディス
ク、光ディスク、光磁気ディスク、CD-ROM,、磁気テー
プ、不揮発性のメモリカード、ROM等を用いることが出
来る。
As a storage medium for storing such a program code, for example, a floppy disk, hard disk, optical disk, magneto-optical disk, CD-ROM, magnetic tape, nonvolatile memory card, ROM or the like can be used.

【0103】またコンピュータが供給されたプログラム
コードを実行することにより、前述の実施形態の機能が
実現されるだけではなく、そのプログラムコードがコン
ピュータにおいて稼働しているOS(オペレーティングシ
ステム)、あるいは他のアプリケーションソフト等と共
同して前述の実施形態の機能が実現される場合にもかか
るプログラムコードは本発明の実施形態に含まれること
は言うまでもない。
The functions of the above-described embodiment are not only realized by the computer executing the supplied program code, but also the OS (operating system) running on the computer, or another program. Needless to say, the program code is included in the embodiment of the present invention even when the functions of the above-described embodiment are realized in cooperation with application software or the like.

【0104】更に供給されたプログラムコードが、コン
ピュータの機能拡張ボードやコンピュータに接続された
機能拡張ユニットに備わるメモリに格納された後そのプ
ログラムコードの指示に基づいてその機能拡張ボードや
機能格納ユニットに備わるCPU等が実際の処理の一部ま
たは全部を行い、その処理によって前述した実施形態の
機能が実現される場合も本発明に含まれることは言うま
でもない。
Further, the supplied program code is stored in a memory provided in a function expansion board of a computer or a function expansion unit connected to the computer, and then stored in the function expansion board or the function storage unit based on an instruction of the program code. It is needless to say that the present invention includes a case where a provided CPU or the like performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0105】[0105]

【発明の効果】本発明によれば、原画像の特性に応じた
色処理を行えるようにすることができる。
According to the present invention, it is possible to perform color processing according to the characteristics of an original image.

【0106】また、本発明は逆光シーンの原画像を良好
に再現できるようにすることができる。
Further, according to the present invention, an original image of a backlight scene can be reproduced well.

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

【図1】システム構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of a system configuration.

【図2】プリンタドライバで行う処理を説明する図であ
る。
FIG. 2 is a diagram illustrating processing performed by a printer driver.

【図3】画像補正処理部で行われる処理を説明する図で
ある。
FIG. 3 is a diagram illustrating a process performed by an image correction processing unit.

【図4】輝度ヒストグラム作成処理の流れを示す図であ
る。
FIG. 4 is a diagram showing a flow of a brightness histogram creation process.

【図5】晴れた青空のシーンの明度ヒストグラムの一例
を示す図である。
FIG. 5 is a diagram illustrating an example of a brightness histogram of a clear blue sky scene.

【図6】色かぶり補正を説明する図である。FIG. 6 is a diagram illustrating color cast correction.

【図7】露出補正を行うLUTを説明する図である。FIG. 7 is a diagram illustrating an LUT for performing exposure correction.

【図8】逆光シーンの輝度ヒストグラムの一例を示す図
である。
FIG. 8 is a diagram illustrating an example of a luminance histogram of a backlight scene.

【図9】実施形態3における画像補正処理の流れを示す
図である。
FIG. 9 is a diagram illustrating a flow of an image correction process according to the third embodiment.

【図10】従来の輝度ヒストグラムからハイライトポイ
ント/シャドーポイント決定方法を説明する図である。
FIG. 10 is a diagram illustrating a conventional highlight point / shadow point determination method from a luminance histogram.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 諏訪 徹哉 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内 Fターム(参考) 5B057 CA01 CB01 CE17 CH18 DC19 DC23 DC25 5C077 LL19 MM03 MP08 PP05 PP32 PP33 PP37 PP43 PP52 PP53 PQ08 PQ19 PQ20 TT05 TT06 TT09 5C079 HB01 HB03 LA01 LA31 LB00 LB01 NA03 PA00  ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Tetsuya Suwa 3-30-2 Shimomaruko, Ota-ku, Tokyo F-term in Canon Inc. (reference) 5B057 CA01 CB01 CE17 CH18 DC19 DC23 DC25 5C077 LL19 MM03 MP08 PP05 PP32 PP33 PP37 PP43 PP52 PP53 PQ08 PQ19 PQ20 TT05 TT06 TT09 5C079 HB01 HB03 LA01 LA31 LB00 LB01 NA03 PA00

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 複数のハイライトポイント検出方法を有
し、 原画像の特性に応じたハイライトポイントを選択し、 前記ハイライトポイントに応じて前記原画像に対する色
処理条件を設定することを特徴とする画像処理方法。
A plurality of highlight point detection methods, wherein a highlight point is selected according to characteristics of an original image, and a color processing condition for the original image is set according to the highlight point. Image processing method.
【請求項2】 前記複数のハイライトポイントは、ヒス
トグラムを作成する際に使用する明るさを示す色成分を
求める方法がことなることを特徴とする請求項1記載の
画像処理方法。
2. The image processing method according to claim 1, wherein the plurality of highlight points are obtained by a method of obtaining a color component indicating brightness used when creating a histogram.
【請求項3】 前記色処理条件は、前記原画像の特性に
かかわらず予め設定されているシャドーポイント検出方
法によりシャドーポイントを検出し、 前記選択されたハイライトポイントおよび前記検出され
たシャドーポイントに基づき前記色処理条件を設定する
ことを特徴とする請求項1記載の画像処理方法。
3. The color processing condition includes detecting a shadow point by a preset shadow point detection method irrespective of characteristics of the original image, and setting the selected highlight point and the detected shadow point. 2. The image processing method according to claim 1, wherein the color processing conditions are set based on the color processing conditions.
【請求項4】 前記複数のハイライトポイント検出方法
には、青空シーン用のハイライトポイント検出方法が含
まれていることを特徴とする請求項1記載の画像処理方
法。
4. The image processing method according to claim 1, wherein the plurality of highlight point detection methods include a highlight point detection method for a blue sky scene.
【請求項5】 さらに、ユーザの指示に応じてハイライ
トポイントを選択することを特徴とする請求項1記載の
画像処理方法。
5. The image processing method according to claim 1, further comprising selecting a highlight point according to a user's instruction.
【請求項6】 原画像のヒストグラムを生成し、 前記ヒストグラムにおいて高輝度部にピークがあるか否
かを検出し、 前記検出結果に応じてハイライトポイント検出方法を異
ならせることを特徴とする画像処理方法。
6. An image generating a histogram of an original image, detecting whether a peak is present in a high-luminance portion in the histogram, and making a highlight point detection method different according to the detection result. Processing method.
【請求項7】 原画像のヒストグラムを生成し、 前記ヒストグラムに基づき、原画像が逆光シーンである
か否かを検出し、 前記検出結果に応じたハイライトポイント検出方法を用
いてハイライトポイントを検出することを特徴とする画
像処理方法。
7. A histogram of an original image is generated, and whether or not the original image is a backlight scene is detected based on the histogram, and a highlight point is detected using a highlight point detection method according to the detection result. An image processing method characterized by detecting.
【請求項8】 輝度信号に基づき第1のヒストグラムに
基づき第1のハイライトを求め、 青信号に重きをおいた明るさを示す信号にもとづき第2
のヒストグラムに基づき第2のハイライトを求め、 前記第1と前記第2のハイライトと比較し、 小さい値を有するハイライトを、画像補正に用いるハイ
ライトポイントとして設定し、 前記設定されたハイライトポイントに基づき画像補正を
行うことを特徴とする画像処理方法。
8. A first highlight is obtained based on a first histogram based on a luminance signal, and a second highlight is obtained based on a signal indicating brightness with a weight on a blue signal.
Calculating a second highlight based on the histogram of the above, comparing the first highlight with the second highlight, setting a highlight having a small value as a highlight point used for image correction, An image processing method for performing image correction based on a light point.
【請求項9】 複数のハイライトポイント検出方法を有
する画像処理装置であって、 原画像の特性に応じたハイライトポイントを選択する選
択手段と、 前記ハイライトポイントに応じて前記原画像に対する色
処理条件を設定する設定手段とを有することを特徴とす
る画像処理装置。
9. An image processing apparatus having a plurality of highlight point detection methods, comprising: selecting means for selecting a highlight point according to characteristics of an original image; and a color for the original image according to the highlight point. An image processing apparatus comprising: setting means for setting a processing condition.
【請求項10】 コンピュータが読み取り可能にプログ
ラムを記録する記録媒体であって、 複数のハイライトポイント検出方法により求められる複
数のハイライトポイントから、原画像の特性に応じたハ
イライトポイントを選択し、 前記ハイライトポイントに応じて前記原画像に対する色
処理条件を設定するプログラムを記録することを特徴と
する記録媒体。
10. A recording medium for recording a program readable by a computer, wherein a highlight point according to characteristics of an original image is selected from a plurality of highlight points obtained by a plurality of highlight point detection methods. A recording medium for recording a program for setting color processing conditions for the original image in accordance with the highlight point.
JP17713398A 1998-06-24 1998-06-24 Image processing method, apparatus, and recording medium Expired - Fee Related JP3817371B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP17713398A JP3817371B2 (en) 1998-06-24 1998-06-24 Image processing method, apparatus, and recording medium
US09/338,424 US6694051B1 (en) 1998-06-24 1999-06-23 Image processing method, image processing apparatus and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17713398A JP3817371B2 (en) 1998-06-24 1998-06-24 Image processing method, apparatus, and recording medium

Publications (2)

Publication Number Publication Date
JP2000013624A true JP2000013624A (en) 2000-01-14
JP3817371B2 JP3817371B2 (en) 2006-09-06

Family

ID=16025766

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17713398A Expired - Fee Related JP3817371B2 (en) 1998-06-24 1998-06-24 Image processing method, apparatus, and recording medium

Country Status (1)

Country Link
JP (1) JP3817371B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010073A (en) * 2000-06-19 2002-01-11 Ricoh Co Ltd Image processor and image processing method and recording medium
WO2005057910A1 (en) * 2003-12-12 2005-06-23 Fujitsu Limited Color balance correction program, color balance correction device, and color balance correction method
JP2006295686A (en) * 2005-04-13 2006-10-26 Canon Inc Image processing method
JP2016081427A (en) * 2014-10-21 2016-05-16 キヤノン株式会社 Image processor, image processing method and program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010073A (en) * 2000-06-19 2002-01-11 Ricoh Co Ltd Image processor and image processing method and recording medium
WO2005057910A1 (en) * 2003-12-12 2005-06-23 Fujitsu Limited Color balance correction program, color balance correction device, and color balance correction method
EP1694053A1 (en) * 2003-12-12 2006-08-23 Fujitsu Limited Color balance correction program, color balance correction device, and color balance correction method
EP1694053A4 (en) * 2003-12-12 2007-08-22 Fujitsu Ltd Color balance correction program, color balance correction device, and color balance correction method
US7664319B2 (en) 2003-12-12 2010-02-16 Fujitsu Limited Method and device for color balance correction, and computer product
JP2006295686A (en) * 2005-04-13 2006-10-26 Canon Inc Image processing method
JP2016081427A (en) * 2014-10-21 2016-05-16 キヤノン株式会社 Image processor, image processing method and program

Also Published As

Publication number Publication date
JP3817371B2 (en) 2006-09-06

Similar Documents

Publication Publication Date Title
JP4194133B2 (en) Image processing method and apparatus, and storage medium
US6608926B1 (en) Image processing method, image processing apparatus and recording medium
US7583403B2 (en) Image processing device
US7929761B2 (en) Image processing method and apparatus and storage medium
US6694051B1 (en) Image processing method, image processing apparatus and recording medium
JP2003274427A (en) Image processing apparatus, image processing system, image processing method, storage medium, and program
JP2003339057A (en) Image processing apparatus, image processing system, image processing method, storage medium, and program
JP2001186365A (en) Picture processing method, picture processor and recording medium
JP2002051231A (en) Method for reproducing color image of scene by using preferential color mapping and scene-dependent tone scale constitution
JP2005210370A (en) Image processor, photographic device, image processing method, image processing program
JP3950551B2 (en) Image processing method, apparatus, and recording medium
JP3817371B2 (en) Image processing method, apparatus, and recording medium
JP2001189863A (en) Image processing method and image processing device
JP2000013625A (en) Image processing method, device and recording medium
JP4402041B2 (en) Image processing method and apparatus, and storage medium
JP2002094810A (en) Picture processor, picture processing method and memory medium having stored programs for the method
JP2000013595A (en) Image processing method, device and recording medium
JP4909308B2 (en) Image processing method and apparatus
JP4818459B2 (en) Image processing method and apparatus
JP4909428B2 (en) Image processing method and apparatus
JP4208889B2 (en) Image processing method, apparatus, and recording medium
JP2000011152A (en) Method and device for processing image and recording medium
JPH11220619A (en) Image processing method and device therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040608

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051024

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051228

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060407

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20060424

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: 20060606

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060612

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100616

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110616

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120616

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120616

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130616

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees