JP2002135587A - Image processing apparatus and its method - Google Patents

Image processing apparatus and its method

Info

Publication number
JP2002135587A
JP2002135587A JP2000325587A JP2000325587A JP2002135587A JP 2002135587 A JP2002135587 A JP 2002135587A JP 2000325587 A JP2000325587 A JP 2000325587A JP 2000325587 A JP2000325587 A JP 2000325587A JP 2002135587 A JP2002135587 A JP 2002135587A
Authority
JP
Japan
Prior art keywords
image
data
correction
correction data
correcting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2000325587A
Other languages
Japanese (ja)
Inventor
Osamu Yamada
修 山田
Takahiro Matsuura
貴洋 松浦
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 JP2000325587A priority Critical patent/JP2002135587A/en
Publication of JP2002135587A publication Critical patent/JP2002135587A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To overcome the problem of a conventional image processing unit that has obtained a correction result of an image where a portrait part gets very dark because the conventional image processing unit discriminates it to be overexposure when correcting the image with an entirely high luminance level such as a photo in which a person is photographed against a background of a white wall so as to apply proper correction only to the white wall part. SOLUTION: A mask data/weight data generating section 14 acquires image attribute information from a user via an instruction input section 13, reads an image detection condition on the basis of the image attribute from a storage section to generate mask data. A histogram generating section 6 generates a histogram on the basis of image data and mask data stored in an image buffer 3. A lookup table generating section 7 calculates a parameter required for correction on the basis of the generated histogram to generate a lookup table. The mask data/weight data generating section 14 generates weight data on the basis of the mask data. An image correction section 9 uses the generated lookup table and the weight data to correct the image data stored in the image buffer 3.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は画像処理装置および
その方法に関し、例えば、画像データに階調補正を施す
画像処理装置およびその方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus and method, and more particularly, to an image processing apparatus and method for performing gradation correction on image data.

【0002】[0002]

【従来の技術】多値画像を処理する画像処理装置におい
て、画像中の最も明るいハイライト部分、または、最も
暗いシャドウ部分の輝度値を調整することで、コントラ
ストがより鮮明な画像を得ることを目的とするホワイト
バランス調整が行われる。このような画像処理装置にお
いて、ホワイトバランスを調整する際は、画像内の、輝
度が高い方から数%の範囲である高輝度領域において、
輝度が所定値以上の画素を除く画素のRGB値の平均値を
算出し、その平均値に基づき各画素を補正する。
2. Description of the Related Art In an image processing apparatus for processing a multi-valued image, it is possible to obtain a clearer image by adjusting the brightness value of the brightest highlight portion or the darkest shadow portion in the image. The target white balance adjustment is performed. In such an image processing apparatus, when adjusting the white balance, in the image, in a high-luminance region which is a range of several% from the higher luminance,
The average value of the RGB values of the pixels excluding the pixels whose luminance is equal to or more than a predetermined value is calculated, and each pixel is corrected based on the average value.

【0003】[0003]

【発明が解決しようとする課題】対象画像のシーンにか
かわらず、すなわち画像の特徴を考慮することなく画像
の補正を行うと問題が発生することがある。例えば、白
壁をバックに人物を写した写真など、全体的に輝度レベ
ルの高い画像を補正すると、画像処理装置は露出オーバ
と判断して、白壁部分に適正な補正が施され、人物部分
が非常に暗い補正結果が得られる。
Problems may occur when the image is corrected regardless of the scene of the target image, that is, without considering the characteristics of the image. For example, when correcting an image having a high luminance level as a whole, such as a photograph in which a person is photographed against a white wall, the image processing apparatus determines that the image is overexposed and performs appropriate correction on the white wall portion. , A dark correction result is obtained.

【0004】本発明は、上述の問題を解決するためのも
のであり、画像上の指定領域に応じた補正を画像データ
に施すことを目的とする。
An object of the present invention is to solve the above-mentioned problem, and an object of the present invention is to perform correction according to a designated area on an image to image data.

【0005】また、画像の属性情報に対応する領域およ
び他の領域それぞれに応じた補正を画像データに施すこ
とを他の目的とする。
It is another object of the present invention to perform correction on image data corresponding to an area corresponding to attribute information of an image and other areas.

【0006】[0006]

【課題を解決するための手段】本発明は、前記の目的を
達成する一手段として、以下の構成を備える。
The present invention has the following arrangement as one means for achieving the above object.

【0007】本発明にかかる画像処理装置は、表示され
た画像内の任意領域の指定を受け付ける指定手段と、前
記画像に対応する画像データの輝度分布、および、前記
指定領域の輝度分布を取得する取得手段と、取得される
輝度分布に基づき、前記画像データを補正するための第
一の補正データ、前記指定領域の画像データを補正する
ための第二の補正データ、並びに、前記第一および第二
の補正データを加重平均した第三の補正データを生成す
る生成手段と、前記画像データの各画素に対応する重み
データを作成する作成手段と、前記指定領域を示す情報
および前記重みデータに基づき、前記第一から第三の補
正データの何れかを使用して、前記画像データを補正す
る補正手段とを有することを特徴とする。
An image processing apparatus according to the present invention acquires designation means for accepting designation of an arbitrary region in a displayed image, and acquires a luminance distribution of image data corresponding to the image and a luminance distribution of the designated region. Acquiring means, based on the acquired luminance distribution, first correction data for correcting the image data, second correction data for correcting the image data of the designated area, and the first and second Generating means for generating third correction data obtained by weighted averaging of the two correction data, generating means for generating weight data corresponding to each pixel of the image data, and information indicating the designated area and the weight data And correcting means for correcting the image data by using any of the first to third correction data.

【0008】また、画像の属性情報に基づき画像検出条
件を設定する設定手段と、前記画像に対応する画像デー
タの輝度分布、および、前記画像検出条件にマッチする
領域の輝度分布を取得する取得手段と、取得される輝度
分布に基づき、前記画像データを補正するための第一の
補正データ、前記マッチ領域の画像データを補正するた
めの第二の補正データ、並びに、前記第一および第二の
補正データを加重平均した第三の補正データを生成する
生成手段と、前記画像データの各画素に対応する重みデ
ータを作成する作成手段と、前記マッチ領域を示す情報
および前記重みデータに基づき、前記第一から第三の補
正データの何れかを使用して、前記画像データを補正す
る補正手段とを有することを特徴とする。
A setting unit for setting an image detection condition based on attribute information of the image; an obtaining unit for obtaining a luminance distribution of image data corresponding to the image and a luminance distribution of a region matching the image detection condition; And, based on the obtained luminance distribution, first correction data for correcting the image data, second correction data for correcting the image data of the match area, and the first and second Generating means for generating third correction data weighted average of the correction data, creating means for creating weight data corresponding to each pixel of the image data, based on the information indicating the match area and the weight data, Correction means for correcting the image data by using any one of the first to third correction data.

【0009】本発明にかかる画像処理方法は、表示され
た画像内の任意領域の指定を受け付け、前記画像に対応
する画像データの輝度分布、および、前記指定領域の輝
度分布を取得し、取得される輝度分布に基づき、前記画
像データを補正するための第一の補正データ、前記指定
領域の画像データを補正するための第二の補正データ、
並びに、前記第一および第二の補正データを加重平均し
た第三の補正データを生成し、前記画像データの各画素
に対応する重みデータを作成し、前記指定領域を示す情
報および前記重みデータに基づき、前記第一から第三の
補正データの何れかを使用して、前記画像データを補正
することを特徴とする。
An image processing method according to the present invention receives a designation of an arbitrary region in a displayed image, acquires a luminance distribution of image data corresponding to the image, and acquires a luminance distribution of the designated region. A first correction data for correcting the image data, a second correction data for correcting the image data of the designated area,
And generating third weighted data obtained by weighted averaging the first and second correction data, creating weight data corresponding to each pixel of the image data, and generating information indicating the designated area and the weight data. The image data is corrected using any one of the first to third correction data.

【0010】また、画像の属性情報に基づき画像検出条
件を設定し、前記画像に対応する画像データの輝度分
布、および、前記画像検出条件にマッチする領域の輝度
分布を取得し、取得される輝度分布に基づき、前記画像
データを補正するための第一の補正データ、前記マッチ
領域の画像データを補正するための第二の補正データ、
並びに、前記第一および第二の補正データを加重平均し
た第三の補正データを生成し、前記画像データの各画素
に対応する重みデータを作成し、前記マッチ領域を示す
情報および前記重みデータに基づき、前記第一から第三
の補正データの何れかを使用して、前記画像データを補
正することを特徴とする。
[0010] An image detection condition is set based on the attribute information of the image, and a luminance distribution of image data corresponding to the image and a luminance distribution of an area matching the image detection condition are obtained. Based on the distribution, first correction data for correcting the image data, second correction data for correcting the image data of the match area,
In addition, a third correction data is generated by weighted averaging the first and second correction data, weight data corresponding to each pixel of the image data is created, and information indicating the match area and the weight data are generated. The image data is corrected using any one of the first to third correction data.

【0011】[0011]

【発明の実施の形態】以下、本発明にかかる一実施形態
の画像処理装置を図面を参照して詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.

【0012】以下で説明する本実施形態の画像処理装置
は、複数のルックアップテーブルを用いて、画像補正を
行うものである。そして、本実施形態の画像処理装置
は、例えば、画像処理プログラムをパーソナルコンピュ
ータのようなコンピュータ装置、各種スキャナ、ディジ
タルスチルカメラおよびディジタルビデオカメラなどの
画像入力デバイス、並びに、各種プリンタに供給または
組み込むことによって実現される。つまり、画像編集プ
ログラムやドライバプログラムに、以下で説明する本実
施形態の機能を組み込んだソフトウェアやファームウェ
アは本発明を構成する。
An image processing apparatus according to the present embodiment described below performs image correction using a plurality of lookup tables. The image processing apparatus of the present embodiment supplies or incorporates the image processing program into a computer device such as a personal computer, various scanners, image input devices such as digital still cameras and digital video cameras, and various printers. It is realized by. That is, software and firmware in which the functions of the present embodiment described below are incorporated in an image editing program and a driver program constitute the present invention.

【0013】[0013]

【第1実施形態】[構成]図1は第1実施形態の画像処理
を行う画像補正装置の機能構成の一例を示すブロック図
である。
First Embodiment [Configuration] FIG. 1 is a block diagram showing an example of a functional configuration of an image correction device for performing image processing according to a first embodiment.

【0014】図1において、画像入力部2は、入力画像保
持部1から画像補正を施すべき画像データを読み込み、
その画像データを画像バッファ3に書き込む。
In FIG. 1, an image input unit 2 reads image data to be subjected to image correction from an input image holding unit 1,
The image data is written to the image buffer 3.

【0015】ユーザインタフェイス(UI)部12は、画像バ
ッファ3の内容を図示しないモニタなどに表示し、ユー
ザに指定された領域データ(以下「マスクデータ」と呼
ぶ)を取得し、画像バッファ3に書き込む。従って、画
像バッファ3には、画像データ、マスクデータ、およ
び、後述する重みデータが保持される。
A user interface (UI) unit 12 displays the contents of the image buffer 3 on a monitor (not shown) or the like, acquires area data designated by a user (hereinafter, referred to as "mask data"), and Write to. Therefore, the image buffer 3 holds image data, mask data, and weight data described later.

【0016】ヒストグラム作成部6は、画像バッファ3に
格納された画像データの全体、および、マスクデータに
より指定される領域(以下「マスク領域」と呼ぶ)のヒ
ストグラムを作成し、その結果をヒストグラム保持部4
に格納する。
The histogram creating section 6 creates a histogram of the entire image data stored in the image buffer 3 and an area designated by the mask data (hereinafter referred to as a "mask area"), and stores the result in a histogram. Part 4
To be stored.

【0017】ルックアップテーブル作成部7は、ヒスト
グラム保持部4に格納されたヒストグラムに基づき、補
正に必要なパラメータを算出してルックアップテーブル
を作成し、その結果をルックアップテーブル保持部5に
格納する。
The look-up table creation unit 7 creates a lookup table by calculating parameters required for correction based on the histogram stored in the histogram storage unit 4, and stores the result in the lookup table storage unit 5. I do.

【0018】重みデータ作成部8は、マスクデータに基
づき重みデータを作成し、その結果を画像バッファ3に
格納する。
The weight data creating section 8 creates weight data based on the mask data, and stores the result in the image buffer 3.

【0019】画像補正部9は、ルックアップテーブル保
持部6に格納されたルックアップテーブルおよび画像バ
ッファ3に格納された重みデータを使用して、画像バッ
ファ3に格納された画像データを補正した後、再び画像
バッファ3に格納する。
The image correction unit 9 corrects the image data stored in the image buffer 3 using the look-up table stored in the look-up table holding unit 6 and the weight data stored in the image buffer 3. Are stored in the image buffer 3 again.

【0020】画像出力部10は、画像バッファ3から画像
データを読み出して出力画像保持部11に書き込む。
The image output unit 10 reads out image data from the image buffer 3 and writes the image data into the output image holding unit 11.

【0021】図には示さないが、上記の構成のうち、画
像入力部2、ヒストグラム作成部6、ルックアップテーブ
ル作成部7、重みデータ作成部8、画像補正部9、画像出
力部10およびUI部12などはCPU、RAMなどのワークメモリ
およびプログラムによって構成される。また、画像バッ
ファ3、ヒストグラム保持部4およびルックアップテーブ
ル保持部5はRAMやハードディスクなどのメモリに割り付
けるのが好ましい。
Although not shown in the figure, of the above configuration, the image input unit 2, the histogram creation unit 6, the look-up table creation unit 7, the weight data creation unit 8, the image correction unit 9, the image output unit 10, and the UI The unit 12 and the like are configured by a work memory such as a CPU and a RAM and a program. Further, it is preferable that the image buffer 3, the histogram storage unit 4 and the look-up table storage unit 5 are allocated to a memory such as a RAM or a hard disk.

【0022】[ユーザインタフェイス]図2はUI部12に
よって提供されるユーザインタフェイスの一例を示す図
で、画像表示部と終了ボタンおよびキャンセルボタンが
存在する。また、画像表示部には、画像をブロック分割
した状態の区画を示すセクション画像がオーバレイ表示
される。
[User Interface] FIG. 2 is a diagram showing an example of a user interface provided by the UI unit 12, which includes an image display unit, an end button, and a cancel button. In addition, a section image indicating a section in a state where the image is divided into blocks is overlay-displayed on the image display unit.

【0023】詳細は後述するが、ユーザは、マウスなど
のポインティングデバイスを用いて、画像表示部のブロ
ックをクリックすることで、所望するブロックを指定し
た後、終了ボタンをクリックしてブロックの指定を終了
する。また、キャンセルボタンをクリックすれば指定処
理がキャンセルされる。
Although the details will be described later, the user specifies a desired block by clicking a block in the image display unit using a pointing device such as a mouse, and then clicks an end button to specify the block. finish. Clicking the cancel button cancels the designation process.

【0024】UI部12は、クリックされたブロックを示す
マスクデータを画像バッファに格納する。
The UI unit 12 stores mask data indicating the clicked block in the image buffer.

【0025】なお、ブロック数は、図2に示す5×3に限
らず、7×5や、さらに細かく分割したブロックでもよい
し、画像の縦横比を考慮して適応的に分割数を変えたり
してもよい。勿論、補正対象の画像の特性に合わせてブ
ロック数を設定するのが望ましいので、図2に示すよう
に、ブロックサイズを「拡大する」および「縮小する」
ボタンを用意して、ユーザが適切なブロックサイズを設
定できるようにすることもできる。
The number of blocks is not limited to 5 × 3 shown in FIG. 2, but may be 7 × 5 or a block divided more finely, or the number of blocks may be changed adaptively in consideration of the aspect ratio of the image. May be. Of course, since it is desirable to set the number of blocks according to the characteristics of the image to be corrected, the block size is "enlarged" and "reduced" as shown in FIG.
Buttons can be provided to allow the user to set an appropriate block size.

【0026】また、ブロックの形状は、矩形に限らず、
三角形、六角形または台形でもよい。
The shape of the block is not limited to a rectangle.
It may be triangular, hexagonal or trapezoidal.

【0027】[画像補正手順]図3に第1実施形態におけ
る画像補正手順の概要を示すフローチャートである。
[Image Correction Procedure] FIG. 3 is a flowchart showing an outline of an image correction procedure in the first embodiment.

【0028】ステップS101において、画像入力部2は入
力画像保持部1から画像データを読み込み、画像バッフ
ァ3に格納する。
In step S101, the image input unit 2 reads image data from the input image holding unit 1 and stores it in the image buffer 3.

【0029】ステップS102において、UI部12は画像バッ
ファ3に格納された画像データによって表される画像
を、図2に示すインタフェイスに表示する。
In step S102, the UI unit 12 displays an image represented by the image data stored in the image buffer 3 on the interface shown in FIG.

【0030】ステップS103において、図2に示すインタ
フェイスに対する操作入力を待ち、操作入力があり、ブ
ロックがクリックされた場合はステップS104へ進み、終
了ボタンが押された場合はステップS106へ進み、キャン
セルボタンが押された場合は処理を終了する。
In step S103, an operation input to the interface shown in FIG. 2 is waited. If there is an operation input and the block is clicked, the process proceeds to step S104. If the end button is pressed, the process proceeds to step S106, and the process is canceled. If the button has been pressed, the process ends.

【0031】ブロックがクリックされると、ステップS4
で、マスクデータが画像バッファ3に格納され、ヒスト
グラム保持部4が初期化される。続いて、ステップS105
で画像バッファ3に格納された画像データに後述する画
像補正が施された後、処理はステップS102に戻る。
When the block is clicked, step S4
Then, the mask data is stored in the image buffer 3, and the histogram holding unit 4 is initialized. Subsequently, step S105
After the image data stored in the image buffer 3 is subjected to the image correction described below, the process returns to step S102.

【0032】また、終了ボタンが押されると、ステップ
S106において、画像出力部10により、画像バッファ3か
ら画像データが読み出され、出力画像保持部11に書き込
まれることで、補正後の画像データが出力される。
When the end button is pressed, the step
In S106, the image data is read from the image buffer 3 by the image output unit 10 and written into the output image holding unit 11, whereby the corrected image data is output.

【0033】[画像補正処理]図4は画像補正処理(ス
テップS105)の詳細を示すフローチャートである。
[Image Correction Processing] FIG. 4 is a flowchart showing details of the image correction processing (step S105).

【0034】ステップS2において、ヒストグラム作成部
6は、画像バッファ3に格納された画像データおよびマス
ク領域のヒストグラムを作成し、その結果をヒストグラ
ム保持部4に格納する。
In step S2, a histogram creation unit
6 creates a histogram of the image data and the mask area stored in the image buffer 3 and stores the result in the histogram holding unit 4.

【0035】ステップS3において、ルックアップテーブ
ル作成部7は、ヒストグラム保持部4に格納されたヒスト
グラムに基づき、補正に必要なパラメータを算出し、ル
ックアップテーブルを作成して、その結果をルックアッ
プテーブル保持部5に格納する。
In step S3, the look-up table creating unit 7 calculates parameters necessary for correction based on the histogram stored in the histogram holding unit 4, creates a look-up table, and compares the result with the look-up table. It is stored in the holding unit 5.

【0036】ステップS4において、重みデータ作成部8
は、マスクデータに基づき重みデータを作成し、その結
果を画像バッファ3に格納する。
In step S4, the weight data creating unit 8
Creates weight data based on the mask data, and stores the result in the image buffer 3.

【0037】ステップS5において、画像補正部9は、ル
ックアップテーブル保持部5に格納されたルックアップ
テーブルおよび画像バッファ3に格納された重みデータ
を使用して、画像バッファ3に格納された画像データを
補正した後、再び画像バッファ3に格納する。
In step S5, the image correction unit 9 uses the look-up table stored in the look-up table holding unit 5 and the weight data stored in the image buffer 3 to store the image data stored in the image buffer 3. Is corrected and stored in the image buffer 3 again.

【0038】[ヒストグラムの作成]図5はヒストグラ
ム作成部6におけるヒストグラム作成処理(ステップS
2)の一例を示すフローチャートである。
[Creation of Histogram] FIG. 5 shows a histogram creation process (step S) in the histogram creation unit 6.
It is a flowchart which shows an example of 2).

【0039】ステップS11において、画像バッファ3から
画像データおよびマスクデータを一画素分取り出す。な
お、画像バッファ3にはRGB各色の輝度データが格納され
ているものとする。
In step S11, one pixel of image data and mask data is extracted from the image buffer 3. It is assumed that the image buffer 3 stores the luminance data of each of the RGB colors.

【0040】ステップS12において、RGB値から下の式に
従い当該画素の輝度Lを求める。 L = (3×R + 6×G + 1×B)/10
In step S12, the luminance L of the pixel is obtained from the RGB values according to the following equation. L = (3 x R + 6 x G + 1 x B) / 10

【0041】ステップS13において、ヒストグラム保持
部4に格納されているヒストグラムを更新する。ヒスト
グラム保持部4には、計算された輝度LのヒストグラムHi
stL、並びに、RGBの各値を当該画素の輝度L別に累積す
るヒストグラムHistR、HistGおよびHistBが保持されて
いる。さらに、マスク領域の輝度LのヒストグラムHistL
Mskもヒストグラム保持部4に保持されている。なお、こ
れらのヒストグラムは、その作成開始の初期状態におい
てはすべて零である。また、ヒストグラムの更新は下の
式に従う。 HistR[L] = HistR[L] + R HistG[L] = HistG[L] + G HistB[L] = HistB[L] + B HistL[L] = HistL[L] + 1
In step S13, the histogram stored in the histogram holding unit 4 is updated. The histogram holding unit 4 stores a histogram Hi of the calculated luminance L.
The histograms HistR, HistG, and HistB that accumulate stL and RGB values for each luminance L of the pixel are held. Furthermore, a histogram HistL of the luminance L of the mask area
Msk is also stored in the histogram storage unit 4. Note that these histograms are all zero in the initial state of the creation start. The histogram is updated according to the following equation. HistR [L] = HistR [L] + R HistG [L] = HistG [L] + G HistB [L] = HistB [L] + B HistL [L] = HistL [L] + 1

【0042】ステップS14において、当該画素がマスク
領域に含まれるか否かをマスクデータから判断し、マス
ク領域の画素であればステップS15で、ヒストグラム保
持部4に格納されているマスク領域のヒストグラムHistL
Mskを、下の式に従い更新する。 HistLMsk[L] = HistLMsk[L] + 1
In step S14, it is determined from the mask data whether or not the pixel is included in the mask area. If the pixel is in the mask area, in step S15, the histogram HistL of the mask area stored in the histogram holding unit 4 is determined.
Update Msk according to the formula below. HistLMsk [L] = HistLMsk [L] + 1

【0043】ステップS16において、全画素の処理が終
了したか否かを判定し、未了であればステップS11に戻
る。
In step S16, it is determined whether or not the processing for all pixels has been completed. If the processing has not been completed, the flow returns to step S11.

【0044】図6はこのようにして作成されるヒストグ
ラムHistLの一例を示す図である。
FIG. 6 is a diagram showing an example of the histogram HistL created in this way.

【0045】[パラメータの算出]図7はルックアップ
テーブル作成部10におけるパラメータ算出処理(ステッ
プS3)の一例を示すフローチャートである。
[Calculation of Parameters] FIG. 7 is a flowchart showing an example of a parameter calculation process (step S3) in the lookup table creation unit 10.

【0046】ステップS21において、ヒストグラム保持
部4に格納されたヒストグラムHistLから、画像の最大輝
度を求める。図6に示すヒストグラム例において最大輝
度は252である。
In step S21, the maximum luminance of the image is obtained from the histogram HistL stored in the histogram holding unit 4. In the histogram example shown in FIG. 6, the maximum luminance is 252.

【0047】ステップS22において、輝度255から所定量
(例えば10)を引いていき、得られた最大輝度の方が大
きくなる時の輝度LH'を求める。具体的に説明すると、2
55、245、235、…と値を下げていき、その都度、得られ
た最大輝度と比較する。従って、図6においてはLH'=245
である。続いて、LH'の両側で、所定の割合(例えば総
画素数の1%)の画素を含む領域(図6にハッチングで示
すハイライト領域)を求め、その領域の最小輝度をハイ
ライトポイントLH(図6においてはLH=234)にする。
In step S22, a predetermined amount (for example, 10) is subtracted from the luminance 255, and a luminance LH 'at which the obtained maximum luminance becomes larger is obtained. Specifically, 2
The value is reduced to 55, 245, 235,..., And each time the value is compared with the obtained maximum luminance. Therefore, in FIG. 6, LH ′ = 245
It is. Subsequently, on both sides of LH ′, a region (a highlight region indicated by hatching in FIG. 6) including a predetermined percentage (for example, 1% of the total number of pixels) of pixels is obtained, and the minimum luminance of the region is determined by a highlight point LH. (LH = 234 in FIG. 6).

【0048】そして、ステップS23で、下の式に従い、
輝度がLH以上、LH'以下のハイライト領域のRGBの平均値
RH、GHおよびBHを算出する。 RH = Σm=LH LH'HistR[m]/Σm=LH LH'HistL[m] GH = Σm=LH LH'HistG[m]/Σm=LH LH'HistL[m] BH = Σm=LH LH'HistB[m]/Σm=LH LH'HistL[m]
Then, in step S23, according to the following equation,
Average RGB value in the highlight area where the luminance is LH or more and LH 'or less
Calculate RH, GH and BH. RH = Σ m = LH LH ' HistR [m] / Σ m = LH LH' HistL [m] GH = Σ m = LH LH 'HistG [m] / Σ m = LH LH' HistL [m] BH = Σ m = LH LH ' HistB [m] / Σ m = LH LH' HistL [m]

【0049】ステップS24において、ヒストグラム保持
部4に格納されたヒストグラムHistLから、画像の最小輝
度を求める。図6に示すヒストグラム例において最小輝
度は5である。
In step S24, the minimum luminance of the image is obtained from the histogram HistL stored in the histogram holding unit 4. In the histogram example shown in FIG. 6, the minimum luminance is 5.

【0050】ステップS25において、輝度0から所定量
(例えば10)を加えていき、得られた最小輝度の方が小
さくなる時の輝度LS'を求める。具体的に説明すると、
0、10、20、…と値を上げていき、その都度、得られた
最小輝度と比較する。従って、図6においてはLS'=10で
ある。続いて、LS'の両側で、所定の割合(例えば総画
素数の1%)の画素を含む領域(図6にハッチングで示す
シャドウ領域)を求め、その領域の最大輝度をシャドウ
ポイントLS(図6においてはLS=22)にする。
In step S25, a predetermined amount (for example, 10) is added from the luminance 0, and a luminance LS 'at which the obtained minimum luminance becomes smaller is obtained. Specifically,
The value is increased to 0, 10, 20,..., And each time the value is compared with the obtained minimum luminance. Therefore, in FIG. 6, LS ′ = 10. Subsequently, on both sides of LS ′, an area (shadow area shown by hatching in FIG. 6) including a predetermined percentage (for example, 1% of the total number of pixels) of pixels is obtained, and the maximum luminance of the area is determined by the shadow point LS (FIG. LS = 22 in 6).

【0051】そして、ステップS26で、下の式に従い、
輝度がLS'以上、LS以下のシャドウ領域のRGBの平均値R
S、GSおよびBSを算出する。 RS = Σm=LS' LSHistR[m]/Σm=LS' LSHistL[m] GS = Σm=LS' LSHistG[m]/Σm=LS' LSHistL[m] BS = Σm=LS' LSHistB[m]/Σm=LS' LSHistL[m]
Then, in step S26, according to the following equation,
Average value R of RGB in the shadow area where the luminance is LS 'or more and LS or less
Calculate S, GS and BS. RS = Σ m = LS ' LS HistR [m] / Σ m = LS' LS HistL [m] GS = Σ m = LS ' LS HistG [m] / Σ m = LS' LS HistL [m] BS = Σ m = LS ' LS HistB [m] / Σ m = LS' LS HistL [m]

【0052】ステップS27において、求めたRH、GH、B
H、RS、GSおよびBSからRGBそれぞれのルックアップテー
ブルLUTR、LUTGおよびLUTBを作成する。図8は作成され
るルックアップテーブルの一例を示す図である。そし
て、その作成結果をルックアップテーブル保持部5に格
納する。
In step S27, the obtained RH, GH, B
The lookup tables LUT R , LUT G, and LUT B for RGB are created from H, RS, GS, and BS. FIG. 8 is a diagram showing an example of the created lookup table. Then, the creation result is stored in the lookup table holding unit 5.

【0053】ステップS28において、下の式で輝度LHTmp
およびLSTmpを求め、その結果からHistL補正用のルック
アップテーブルLUTTmpを作成する。 LHTmp = (RH×3 + GH×6 + BH×1)/10 LSTmp = (RS×3 + GS×6 + BS×1)/10
In step S28, the luminance LH Tmp is calculated by the following equation.
And LS Tmp are obtained, and a lookup table LUT Tmp for HistL correction is created from the result. LH Tmp = (RH × 3 + GH × 6 + BH × 1) / 10 LS Tmp = (RS × 3 + GS × 6 + BS × 1) / 10

【0054】ステップS29において、LUTTmpを用いてHis
tLおよびHistLMskを補正する。これらは、後に露出補正
量を算出する際に使用される。
In step S29, His using the LUT Tmp
Correct tL and HistLMsk. These are used later when calculating the exposure correction amount.

【0055】ステップS30において、補正されたHistLお
よびHistLMskから入力画像の平均輝度を求め、所定の方
法に従い露出補正用ルックアップテーブルLUTLおよびLU
TLMskを作成する。図9は作成されるLUTLおよびLUTLMsk
の一例を示す図である。そして、その作成結果をルック
アップテーブル保持部5に格納する。
In step S30, the average luminance of the input image is calculated from the corrected HistL and HistLMsk, and the exposure correction look-up tables LUT L and LU are determined according to a predetermined method.
Create T L Msk. Figure 9 shows LUT L and LUT L Msk created
It is a figure showing an example of. Then, the creation result is stored in the lookup table holding unit 5.

【0056】[ルックアップテーブル]図8に示すルッ
クアップテーブルLUTR、LUTGおよびLUTBは、コントラス
トおよび色かぶりを補正するものである。
[Lookup Table] Lookup tables LUT R , LUT G and LUT B shown in FIG. 8 are used to correct contrast and color cast.

【0057】また、G、B、Rの順にハイライトのガンマ
特性を立たせている。このように、Rに対してGおよびB
を強めることで、例えば青っぽく色かぶりしている画像
の色かぶりを補正することができる。同時に、コントラ
ストの補正もできる。
The gamma characteristics of highlights are established in the order of G, B, and R. Thus, G and B for R
Can be corrected, for example, the color cast of an image having a bluish color cast can be corrected. At the same time, contrast can be corrected.

【0058】一方、図9に示すルックアップテーブルLUT
Lは、マスク領域以外の露出を最適に補正するためのル
ックアップテーブルである。また、ルックアップテーブ
ルLUTLMskは、マスク領域の露出を最適に補正するため
のルックアップテーブルである。つまり、二つのルック
アップテーブルを用いて、画像全体の明るさを適切に調
整することができる。
On the other hand, the lookup table LUT shown in FIG.
L is a look-up table for optimally correcting the exposure other than the mask area. The look-up table LUT L Msk is a look-up table for optimally correcting the exposure of the mask area. That is, the brightness of the entire image can be appropriately adjusted using the two lookup tables.

【0059】[重みデータの作成]図10は重みデータ作
成部8における重みデータ作成処理(ステップS4)の一
例を示すフローチャートである。
[Creation of Weight Data] FIG. 10 is a flowchart showing an example of the weight data creation processing (step S4) in the weight data creation unit 8.

【0060】ステップS31において、カウンタとして用
いる変数iを零に初期化し、画像バッファ3に格納されて
いる画像データの各画素に対応する重みデータの配列Wg
tImg[]をすべて零に初期化する。ただし、MskImg[0]に
対応する画素がマスク領域にある場合はWgtImg[0]=10に
する。
In step S31, a variable i used as a counter is initialized to zero, and an array Wg of weight data corresponding to each pixel of the image data stored in the image buffer 3.
Initialize tImg [] to all zeros. However, when the pixel corresponding to MskImg [0] is in the mask area, WgtImg [0] = 10.

【0061】ステップS32において、MskImg[i]に対応す
る画素がマスク領域にあるか否かを調べ、マスク領域に
あればステップS33に進み、マスク領域になければステ
ップS39に進む。
In step S32, it is checked whether or not the pixel corresponding to MskImg [i] is in the mask area. If the pixel is in the mask area, the process proceeds to step S33. If not, the process proceeds to step S39.

【0062】MskImg[i]に対応する画素がマスク領域に
あれば、ステップS33で、WgtImg[i]の値を調べ、WgtImg
[i]<5であればステップS34で、後述するルール1に従い
WgtImg[]を更新する。また、WgtImg[i]≧5であればステ
ップS37で、WgtImg[i]の値を調べ、WgtImg[i]=10であれ
ばステップS38でWgtImg[i+1]=10にする。
If the pixel corresponding to MskImg [i] is in the mask area, the value of WgtImg [i] is checked in step S33,
If [i] <5, in step S34, according to rule 1 described later
Update WgtImg []. If WgtImg [i] ≧ 5, the value of WgtImg [i] is checked in step S37, and if WgtImg [i] = 10, WgtImg [i + 1] = 10 in step S38.

【0063】一方、MskImg[i]に対応する画素がマスク
領域外にあればステップS39において、WgtImg[j]の値を
調べ、WgtImg[i]>5であればステップS40で、後述する
ルール2に従いWgtImg[]を更新する。
On the other hand, if the pixel corresponding to MskImg [i] is outside the mask area, the value of WgtImg [j] is checked in step S39, and if WgtImg [i]> 5, the process proceeds to step S40, where rule 2 WgtImg [] is updated according to.

【0064】この後、ステップS35でカウンタiをインク
リメントし、ステップS36で全画素(全重みデータ)の
処理が終了したか否かを調べ、未了であればステップS3
2へ戻る。
Thereafter, in step S35, the counter i is incremented. In step S36, it is determined whether or not the processing of all pixels (all weight data) has been completed.
Return to 2.

【0065】[重みデータの更新ルール]図11は重みデ
ータの更新ルール1の一例を示すフローチャートであ
る。なお、図11に示す変数wは注目配列を示すインデッ
クス値である。
[Weight Data Update Rule] FIG. 11 is a flowchart showing an example of weight data update rule 1. Note that the variable w shown in FIG. 11 is an index value indicating the target array.

【0066】ステップS51でWgtImg[w-4]の値と1との大
きい方の値をWgtImg[w-4]の値にする。以下同様に、ス
テップS52からS54で、WgtImg[w-3]の値と2との大きい方
の値をWgtImg[w-3]の値に、WgtImg[w-2]の値と3との大
きい方の値をWgtImg[w-2]の値に、WgtImg[w-1]の値と4
との大きい方の値をWgtImg[w-1]の値にする。
In step S51, the larger of WgtImg [w-4] and 1 is set to the value of WgtImg [w-4]. Similarly, in steps S52 to S54, the larger value of WgtImg [w-3] and 2 is set to the value of WgtImg [w-3], and the larger value of WgtImg [w-2] and 3 is set. To the value of WgtImg [w-2], the value of WgtImg [w-1] and 4
Is set to the value of WgtImg [w-1].

【0067】次に、ステップS55からS60で、WgtImg[w]=
5、WgtImg[w+1]=6、WgtImg[w+2]=7、WgtImg[w+3]=8、Wg
tImg[w+4]=9、WgtImg[w+5]=10にする。
Next, in steps S55 to S60, WgtImg [w] =
5, WgtImg [w + 1] = 6, WgtImg [w + 2] = 7, WgtImg [w + 3] = 8, Wg
Set tImg [w + 4] = 9 and WgtImg [w + 5] = 10.

【0068】図12は重みデータの更新ルール2の一例を
示すフローチャートである。
FIG. 12 is a flowchart showing an example of the weight data update rule 2.

【0069】ステップS61でWgtImg[w-5]の値と9との小
さい方の値をWgtImg[w-5]の値にする。以下同様に、ス
テップS62からS64で、WgtImg[w-4]の値と8との小さい方
の値をWgtImg[w-4]の値に、WgtImg[w-3]の値と7との小
さい方の値をWgtImg[w-3]の値に、WgtImg[w-2]の値と6
との小さい方の値をWgtImg[w-2]の値にする。
In step S61, the smaller of the value of WgtImg [w-5] and 9 is set to the value of WgtImg [w-5]. Similarly, in steps S62 to S64, the smaller value of WgtImg [w-4] and 8 is set to the value of WgtImg [w-4], and the smaller value of WgtImg [w-3] and 7 is set. To the value of WgtImg [w-3], and the value of WgtImg [w-2]
Is set to the smaller value of WgtImg [w-2].

【0070】次に、ステップS65からS70で、WgtImg[w-
1]=5、WgtImg[w]=4、WgtImg[w+1]=3、WgtImg[w+2]=2、W
gtImg[w+3]=1、WgtImg[w+4]=0にする。
Next, in steps S65 to S70, WgtImg [w-
1] = 5, WgtImg [w] = 4, WgtImg [w + 1] = 3, WgtImg [w + 2] = 2, W
gtImg [w + 3] = 1 and WgtImg [w + 4] = 0.

【0071】なお、インデックス値w-5からw+5が画像デ
ータ外になる場合、その処理は行わない。
When the index values w-5 to w + 5 are outside the image data, the processing is not performed.

【0072】[重みデータの作成例]図13は加重平均を
考慮しない場合の重みデータの作成例を示す図である。
[Example of Creating Weight Data] FIG. 13 is a diagram showing an example of creating weight data when the weighted average is not considered.

【0073】図13(a)はマスクデータを示し、7から12番
目の画素および14から19番目の画素がマスク領域に含ま
れることを示している。図12(b)はマスクデータに対応
する重みデータを示している。この例では加重平均を考
慮しないから、例えば、マスク領域の画素に対応する重
みデータは10に、マスク領域外の画素に対応する重みデ
ータは0になる。
FIG. 13A shows mask data, and shows that the 7th to 12th pixels and the 14th to 19th pixels are included in the mask area. FIG. 12B shows weight data corresponding to the mask data. In this example, since the weighted average is not considered, for example, the weight data corresponding to the pixels in the mask area is 10, and the weight data corresponding to the pixels outside the mask area is 0.

【0074】図14は加重平均を行う場合の重みデータの
作成例を示す図である。
FIG. 14 is a diagram showing an example of creating weight data when performing weighted averaging.

【0075】図14(a)はマスクデータを示し、図14(b)か
ら(g)は加重平均を考慮して重みデータを作成する際の
重みデータの変化を示している。
FIG. 14 (a) shows mask data, and FIGS. 14 (b) to 14 (g) show changes in weight data when weight data is created in consideration of the weighted average.

【0076】MskImg[0]からMskImg[6]は、対応画素がマ
スク領域外なので、図10に示すステップS32→S39→S35
→S36の各ステップが実行され、それらの値は零のまま
である(図14(b))。
For MskImg [0] to MskImg [6], since the corresponding pixel is outside the mask area, steps S32 → S39 → S35 shown in FIG.
→ Each step of S36 is executed, and their values remain zero (FIG. 14 (b)).

【0077】MskImg[7]は、対応画素がマスク領域にあ
り、その値は零であるから、図10に示すステップS32→S
33→S34→S35→S36の各ステップが実行され、ルール1に
従いWgtImg[3]からWgtImg[12]の値が更新される(図14
(c))。
In MskImg [7], since the corresponding pixel is in the mask area and its value is zero, steps S32 → S shown in FIG.
Steps 33 → S34 → S35 → S36 are executed, and the values of WgtImg [3] to WgtImg [12] are updated according to rule 1 (FIG. 14).
(c)).

【0078】MskImg[8]からMskImg[11]は、対応画素が
マスク領域にあり、それらの値もすべて5より大きく10
未満なので、図10に示すステップS32→S33→S37→S35→
S36の各ステップが実行され、それらの値は変更されな
い(図14(c))。
MskImg [8] to MskImg [11] indicate that the corresponding pixel is in the mask area and their values are all greater than 5 and 10
, So steps S32 → S33 → S37 → S35 → shown in FIG.
Each step of S36 is executed, and their values are not changed (FIG. 14 (c)).

【0079】MskImg[12]は、対応画素がマスク領域にあ
り、その値は10であるから、図10に示すステップS32→S
33→S37→S38→S35→S36の各ステップを実行され、WgtI
mg[13]に10が代入される(図14(d))。
In MskImg [12], since the corresponding pixel is in the mask area and its value is 10, the step S32 → S shown in FIG.
Each step of 33 → S37 → S38 → S35 → S36 is executed and WgtI
10 is substituted for mg [13] (FIG. 14 (d)).

【0080】MskImg[13]は、対応画素がマスク領域外に
あり、その値は5より大きいから、図10に示すステップS
32→S39→S40→S35→S36の各ステップが実行され、ルー
ル2に従いWgtImg[10]からMskImg[17]の値が更新される
(図14(e))。
In MskImg [13], since the corresponding pixel is outside the mask area and its value is larger than 5, the step S shown in FIG.
Each step of 32 → S39 → S40 → S35 → S36 is executed, and the value of WskImg [10] is updated from MgtImg [17] according to rule 2 (FIG. 14 (e)).

【0081】MskImg[14]は、対応画素がマスク領域にあ
り、その値は5より小さいから、図10に示すステップS32
→S33→S34→S35→S36の各ステップが実行され、ルール
1に従いWgtImg[14]からWgtImg[19]の値が更新される
(図14(f))。
In MskImg [14], since the corresponding pixel is in the mask area and its value is smaller than 5, the step S32 shown in FIG.
→ Each step of S33 → S34 → S35 → S36 is executed and rules
According to 1, the value of WgtImg [14] is updated from WgtImg [19] (FIG. 14 (f)).

【0082】MskImg[15]からMskImg[18]は、対応画素が
マスク領域外にあり、それらの値もすべて5より大きく1
0未満なので、図10に示すステップS32→S33→S37→S35
→S36の各ステップが実行され、それらの値は変更され
ない(図14(f))。
MskImg [15] to MskImg [18] indicate that the corresponding pixel is outside the mask area and their values are all greater than 5 and 1
Since it is less than 0, steps S32 → S33 → S37 → S35 shown in FIG.
→ Each step of S36 is executed, and their values are not changed (FIG. 14 (f)).

【0083】MskImg[19]は、対象画素がマスク領域外に
あり、その値は5より大きいから、図10に示すステップS
32→S39→S40→S35→S36の各ステップが実行され、ルー
ル2に従いWgtImg[17]からMskImg[23]の値が更新される
(図14(g))。
Since the target pixel is outside the mask area and its value is larger than 5, MskImg [19]
The steps of 32 → S39 → S40 → S35 → S36 are executed, and the value of WskImg [23] is updated from WgtImg [17] according to rule 2 (FIG. 14 (g)).

【0084】MskImg[20]からMskImg[25]は、対象画素が
マスク領域外にあり、それらの値もすべて5未満である
から、図10に示すステップS32→S39→S35→S36の各ステ
ップが実行され、それらの値は変更されない(図14
(g))。
In the case of MskImg [20] to MskImg [25], since the target pixel is outside the mask area and their values are all less than 5, the steps S32 → S39 → S35 → S36 shown in FIG. Run and their values remain unchanged (Figure 14).
(g)).

【0085】以上の処理を、行または列単位に、すべて
の画素に対して行うことで、重みデータを作成する。
The above processing is performed on all the pixels in units of rows or columns to create weight data.

【0086】[重みデータの合成]図15は上記の処理に
より行または列方向に作成された二つの重みデータの合
成を説明する図である。図15(a)はマスク領域を示し、
図15(b)は行方向に走査して作成された重みデータ、図1
5(c)は列方向に走査して作成された重みデータである。
[Synthesis of Weight Data] FIG. 15 is a diagram for explaining the synthesis of two weight data created in the row or column direction by the above processing. FIG. 15 (a) shows a mask region,
FIG. 15 (b) is weight data created by scanning in the row direction, and FIG.
5 (c) is weight data created by scanning in the column direction.

【0087】重みデータの合成は、図15(b)および(c)の
同画素の重みデータを比較して、その画素がマスク領域
にあれば小さい重みデータを、マスク領域外であれば大
きいマスクデータを選択する。図15(d)は重みデータの
合成結果を示している。
In the synthesis of the weight data, the weight data of the same pixel in FIGS. 15B and 15C are compared. If the pixel is in the mask area, the smaller weight data is used. Select data. FIG. 15D shows the result of combining the weight data.

【0088】[画像補正処理]図16は画像補正部9によ
る画像補正処理(ステップS5)を示すフローチャートで
ある。
[Image Correction Processing] FIG. 16 is a flowchart showing the image correction processing (step S5) by the image correction section 9.

【0089】ステップS41でカウンタiを零に初期化し、
ステップS42で、ルックアップテーブル保持部5に格納さ
れている二つのルックアップテーブルLUTLおよびLUTLMs
kをi:(10-i)の割合で加重平均し、新たなルックアップ
テーブルLUTLTmpを作成する(図17)。 LUTLTmp[n] = {i×LUTL[n] + (10-i)×LUTLMsk[n]}/10 ただし、0≦n≦255
In step S41, a counter i is initialized to zero,
In step S42, the two lookup tables LUT L and LUT L Ms stored in the lookup table holding unit 5
k is weighted by the ratio of i: (10-i) to create a new lookup table LUT L Tmp (FIG. 17). LUT L Tmp [n] = {i × LUT L [n] + (10-i) × LUT L Msk [n]} / 10 where 0 ≦ n ≦ 255

【0090】ステップS43で、画像バッファ3に格納され
た画像データおよび重みデータを一画素分取り出し、ス
テップS44で、その重みデータの値がカウンタiの値に一
致すればステップS45で、加重平均したLUTLTmp、LUTR
LUTGおよびLUTBに基づき、画像バッファ3から取り出し
た画像データを補正した後、その結果を画像バッファ3
の元の場所へ上書きする。 R = LUTLTmp[LUTR[R]] G = LUTLTmp[LUTG[G]] B = LUTLTmp[LUTB[B]]
In step S43, the image data and weight data stored in the image buffer 3 are extracted for one pixel. In step S44, if the value of the weight data matches the value of the counter i, the weighted average is obtained in step S45. LUT L Tmp, LUT R ,
After correcting the image data extracted from the image buffer 3 based on LUT G and LUT B , the result is stored in the image buffer 3
Overwrite the original location. R = LUT L Tmp [LUT R [R]] G = LUT L Tmp [LUT G [G]] B = LUT L Tmp [LUT B [B]]

【0091】次に、ステップS46の判定により、ステッ
プS43からS45の処理を全画素に施す。全画素の処理が終
了すると、ステップS47でカウンタiをインクリメント
し、ステップS48の判定でi>10ならば処理を終了し、そ
れ以外はステップS42へ処理を戻す。
Next, based on the determination in step S46, the processes in steps S43 to S45 are performed on all the pixels. When the processing for all the pixels is completed, the counter i is incremented in step S47. If i> 10 in the determination in step S48, the processing is terminated. Otherwise, the processing returns to step S42.

【0092】このように、マスク領域の内外で異なるル
ックアップテーブルLUTLおよびLUTLMskを使用して画像
に補正を施す際に、マスク領域の境界近傍においては二
つのルックアップテーブルの中間的特性をもつルックア
ップテーブルLUTLTmpを使用する。さらに、境界近傍の
各画素に設定した重みデータに対応する特性のLUTLTmp
を使用するので、境界近傍における補正特性を、二つの
ルックテーブルの間で、滑らかに変化させることができ
る。従って、境界近傍における疑似輪郭の発生を防ぐこ
とができる。例えば、画像の人肌部分に好ましい補正を
施すために、人肌部分をマスク領域に指定して、人肌部
分とそれ以外の部分に異なる補正を施す場合などに、疑
似輪郭の発生を防ぐことができる。
As described above, when an image is corrected using different look-up tables LUT L and LUT L Msk inside and outside the mask area, an intermediate characteristic between the two look-up tables near the boundary of the mask area. Use the lookup table LUT L Tmp with. Furthermore, LUT L Tmp of the characteristic corresponding to the weight data set for each pixel near the boundary
Is used, the correction characteristic near the boundary can be smoothly changed between the two look tables. Therefore, it is possible to prevent the generation of a pseudo contour near the boundary. For example, in order to apply a desirable correction to the human skin part of an image, to specify a human skin part as a mask area, and to perform a different correction on the human skin part and other parts, to prevent the occurrence of a false contour. Can be.

【0093】[0093]

【変形例】図18は、図3に示した画像補正手順の変形例
を示すフローチャートである。
[Modification] FIG. 18 is a flowchart showing a modification of the image correction procedure shown in FIG.

【0094】上記の実施形態においては、ヒストグラム
の作成対象になるブロックは一つのみ(図3参照)だ
が、図18のステップS111に示すように、ヒストグラム保
持部4の初期化ステップの位置を変えれば、複数ブロッ
クをヒストグラムの作成対象に指定することができる。
また、同じブロックを何回も指定することができるの
で、ブロックごとに重み付けを変更することもできる。
In the above embodiment, although only one block is a target of histogram creation (see FIG. 3), the position of the initialization step of the histogram holding unit 4 can be changed as shown in step S111 of FIG. For example, a plurality of blocks can be designated as a histogram creation target.
Further, since the same block can be designated many times, the weight can be changed for each block.

【0095】図19は、図2に示したユーザインタフェイ
スの変形例を示す図である。
FIG. 19 is a diagram showing a modification of the user interface shown in FIG.

【0096】上記の実施形態においては、予めブロック
に分割された画像が表示される例を説明したが、図19に
示すユーザインタフェイスにおいては、画像内の任意の
領域をマスク領域として指定することができる。指定の
方法は、予めマスク領域の大きさおよび形状を決め、マ
スク領域の中心をマウスカーソルなどで指定する。
In the above-described embodiment, an example has been described in which an image divided into blocks is displayed in advance. However, in the user interface shown in FIG. 19, an arbitrary area in the image is designated as a mask area. Can be. In the designation method, the size and shape of the mask area are determined in advance, and the center of the mask area is designated using a mouse cursor or the like.

【0097】さらに、マスク領域内はすべて同じ比重で
ヒストグラムを作成してもよいが、例えば、マスク領域
の中央近傍の比重を100、マスク領域の端近傍の比重は
零などとして、中央から端に向かって下がる比重により
ヒストグラムを作成してもよい。さらに、直線的に比重
を低下させてもよいし、二次曲線に沿わせて比重を低下
させてもよい。
Further, a histogram may be created with the same specific gravity in the entire mask area. For example, the specific gravity near the center of the mask area is set to 100, the specific gravity near the end of the mask area is set to zero, and the like. A histogram may be created with a specific gravity that decreases toward the end. Further, the specific gravity may be reduced linearly, or the specific gravity may be reduced along a quadratic curve.

【0098】[0098]

【第2実施形態】以下、本発明にかかる第2実施形態の画
像処理装置を説明する。なお、本実施形態において、第
1実施形態と略同様の構成については、同一符号を付し
て、その詳細説明を省略する。
Second Embodiment Hereinafter, an image processing apparatus according to a second embodiment of the present invention will be described. Note that, in the present embodiment,
Components that are substantially the same as those in the first embodiment are given the same reference numerals, and detailed descriptions thereof are omitted.

【0099】[構成]図20は第2実施形態の画像処理を
行う画像補正装置の機能構成の一例を示すブロック図で
ある。
[Structure] FIG. 20 is a block diagram showing an example of the functional structure of an image correction apparatus for performing image processing according to the second embodiment.

【0100】第2実施形態の画像補正装置は、重みデー
タ作成部8およびUI部12の代わりに、マスクデータ・重
みデータ作成部14および指示入力部13を備える点で、図
1に示した第1実施形態の画像形成装置と異なる。また、
マスクデータ・重みデータ作成部14には、画像属性情報
に対応する画像検出条件が格納された、ROMなどの記憶
部が備わる。なお、以下では、画素が画像検出条件を満
足するか否かを表すデータを「マスクデータ」と記す。
The image correction apparatus according to the second embodiment includes a mask data / weight data generation unit 14 and an instruction input unit 13 instead of the weight data generation unit 8 and the UI unit 12.
1 is different from the image forming apparatus of the first embodiment shown in FIG. Also,
The mask data / weight data creation unit 14 includes a storage unit such as a ROM in which image detection conditions corresponding to the image attribute information are stored. In the following, data indicating whether a pixel satisfies the image detection condition is referred to as “mask data”.

【0101】画像バッファ3には、画像データ、マスク
データおよび重みデータが保持される。また、ヒストグ
ラム保持部4には、画像データ全体のヒストグラム、お
よび、画像検出条件を満足する領域(以下では「マスク
領域」と記す)のヒストグラムが保持される。
The image buffer 3 holds image data, mask data and weight data. The histogram holding unit 4 holds a histogram of the entire image data and a histogram of an area satisfying the image detection condition (hereinafter, referred to as a “mask area”).

【0102】[画像補正手順]図21は第2実施形態にお
ける画像補正の概要を示すフローチャートである。
[Image Correction Procedure] FIG. 21 is a flowchart showing an outline of image correction in the second embodiment.

【0103】ステップS201において、画像入力部2は、
補正対象の画像データを入力画像保持部1から読み込
み、画像バッファ3に格納する。
In step S201, the image input unit 2
The image data to be corrected is read from the input image holding unit 1 and stored in the image buffer 3.

【0104】ステップS202において、マスクデータ・重
みデータ作成部14は、指示入力部13を介してユーザから
画像属性情報を取得し、その画像属性に基づく画像検出
条件を記憶部から読み込んでマスクデータを作成し、そ
の結果を画像バッファ3に格納する。
In step S202, the mask data / weight data creation unit 14 acquires image attribute information from the user via the instruction input unit 13, reads image detection conditions based on the image attributes from the storage unit, and reads the mask data. Create it and store the result in the image buffer 3.

【0105】ステップS203において、ヒストグラム作成
部6は、画像バッファ3に格納された画像データおよびマ
スクデータに基づきヒストグラムを作成し、その結果を
ヒストグラム保持部4に格納する。
In step S203, the histogram creating section 6 creates a histogram based on the image data and the mask data stored in the image buffer 3, and stores the result in the histogram holding section 4.

【0106】ステップS204において、ルックアップテー
ブル作成部7は、ヒストグラム保持部4に格納されたヒス
トグラムに基づき、補正に必要なパラメータを算出し、
ルックアップテーブルを作成して、その結果をルックア
ップテーブル保持部5に格納する。
In step S204, the look-up table creating unit 7 calculates parameters necessary for correction based on the histogram stored in the histogram holding unit 4,
A lookup table is created, and the result is stored in the lookup table holding unit 5.

【0107】ステップS205において、マスクデータ・重
みデータ作成部14は、マスクデータに基づき重みデータ
を作成し、その結果を画像バッファ3に格納する。
In step S205, the mask data / weight data creation unit 14 creates weight data based on the mask data, and stores the result in the image buffer 3.

【0108】ステップS206において、画像補正部9は、
ルックアップテーブル保持部5に格納されたルックアッ
プテーブルおよび画像バッファ3に格納された重みデー
タを使用して、画像バッファ3に格納された画像データ
を補正した後、再び画像バッファ3に格納する。
In step S206, the image correcting section 9
The image data stored in the image buffer 3 is corrected using the look-up table stored in the look-up table holding unit 5 and the weight data stored in the image buffer 3, and then stored in the image buffer 3 again.

【0109】ステップS203からS206の処理は、第1実施
形態におけるステップS2からS5の処理(図4)と同じで
ある。
The processing of steps S203 to S206 is the same as the processing of steps S2 to S5 in the first embodiment (FIG. 4).

【0110】そして、ステップS207において、画像出力
部10により、画像バッファ3から画像データが読み出さ
れ、出力画像保持部11に書き込まれることで、補正後の
画像データが出力される。
Then, in step S 207, the image data is read from the image buffer 3 by the image output unit 10 and written into the output image holding unit 11, so that the corrected image data is output.

【0111】[画像検出条件]画像検出条件は、例えば
人肌の色など、色再現においてとくに重要な色属性に対
応して設定されている。図22は人肌の色に対応する画像
検出条件の一例を示している。図22はxy色度図で、その
肌色領域が楕円で示されている。また、肌色領域の外側
の馬蹄形はD65におけるスペクトル軌跡である。つま
り、画像属性情報として「肌色」が指定された場合は、
xy色度値が図22の肌色領域内にある画素を抽出する画像
検出条件が記憶部から読み出される。なお、画像属性情
報は、「肌色」だけに限定されるものではなく、「空の
色」「海の色」「草木の色」など、色再現において重要
な色(記憶色)ならばよく、それらに対応する画像検出
条件が設定され記憶部に格納されている。また、xy色度
値は次式により算出される。
[Image Detection Conditions] The image detection conditions are set corresponding to color attributes that are particularly important in color reproduction, such as the color of human skin. FIG. 22 shows an example of an image detection condition corresponding to the color of human skin. FIG. 22 is an xy chromaticity diagram, in which the skin color area is indicated by an ellipse. The horseshoe shape outside the skin color region is a spectrum locus at D65. In other words, if "skin color" is specified as image attribute information,
An image detection condition for extracting a pixel whose xy chromaticity value is within the skin color region in FIG. 22 is read from the storage unit. Note that the image attribute information is not limited to “skin color”, but may be any color (memory color) that is important in color reproduction, such as “sky color”, “ocean color”, “vegetation color”, and the like. The image detection conditions corresponding to those are set and stored in the storage unit. The xy chromaticity value is calculated by the following equation.

【0112】図23はマスクデータ・重みデータ作成部14
による画像検出条件を取得し、マスクデータを作成する
手順(ステップS202)の一例を示すフローチャートであ
る。
FIG. 23 shows a mask data / weight data creating section 14.
9 is a flowchart illustrating an example of a procedure (Step S202) of acquiring an image detection condition according to and generating mask data.

【0113】ステップS161で、指示入力部13からユーザ
が指示する画像属性情報を取得し、ステップS162で、そ
の画像属性情報に対応する画像検出条件を記憶部から読
み込み、ステップS163で、画像検出条件を満す画素およ
び満さない画素を示すマスクデータを作成する。
In step S161, the image attribute information designated by the user is acquired from the instruction input unit 13, and in step S162, the image detection condition corresponding to the image attribute information is read from the storage unit. Create mask data indicating pixels that satisfy and pixels that do not.

【0114】このように、画像の属性情報に対応する画
像検出条件に当てはまる領域(マスク領域)と当てはま
らない領域とを設定し、それぞれの領域にルックアップ
テーブルLUTLMskおよびLUTLを使用して補正を施す際
に、マスク領域の境界近傍においては二つのルックアッ
プテーブルの中間的特性をもつルックアップテーブルLU
TLTmpを使用する。さらに、境界近傍の各画素に設定し
た重みデータに対応する特性のLUTLTmpを使用するの
で、境界近傍における補正特性を、二つのルックテーブ
ルの間で、滑らかに変化させることができる。従って、
境界近傍における疑似輪郭の発生を防ぐことができる。
例えば、画像の人肌部分に好ましい補正を施すために、
人肌部分をマスク領域に指定して、人肌部分とそれ以外
の部分に異なる補正を施す場合などに、疑似輪郭の発生
を防ぐことができる。
As described above, an area (mask area) corresponding to the image detection condition corresponding to the attribute information of the image and an area not applicable are set, and the look-up tables LUT L Msk and LUT L are used for each area. When performing correction, a lookup table LU having an intermediate characteristic between the two lookup tables near the boundary of the mask area.
Use T L Tmp. Further, since LUT L Tmp having characteristics corresponding to the weight data set for each pixel near the boundary is used, the correction characteristics near the boundary can be smoothly changed between the two look tables. Therefore,
It is possible to prevent the generation of a pseudo contour near the boundary.
For example, to apply a desirable correction to the human skin part of the image,
In the case where the human skin portion is designated as the mask region and different corrections are performed on the human skin portion and other portions, it is possible to prevent the occurrence of the pseudo contour.

【0115】[0115]

【変形例】上記の各実施形態においては、画像データが
0から255の範囲のディジタル輝度値をとるものとして説
明したが、データの最大値は255に限定されるものでは
ないし、輝度に限らず網点濃度などでもよい。
[Modification] In each of the above embodiments, the image data is
Although the description has been made assuming that the digital luminance value ranges from 0 to 255, the maximum value of the data is not limited to 255 and may be not only the luminance but also the dot density.

【0116】また、R:G:B=3:6:1の重みで加重平均して
輝度値を計算する例を示したが、これ以外の重みで計算
してもよいし、RGBの最大値と最小値の平均値で求めて
もよい。
Also, an example has been shown in which the luminance value is calculated by weighted averaging with a weight of R: G: B = 3: 6: 1. However, the calculation may be performed with other weights, and the maximum value of RGB may be calculated. And the average of the minimum values.

【0117】また、上記の各実施形態においては、マス
ク領域のヒストグラムと、画像全体のヒストグラムとか
らルックアップテーブルを作成する例を説明したが、マ
スク領域のヒストグラムと、マスクされていない領域の
ヒストグラムとからルックアップテーブルを作成しても
よい。図24は、この場合のヒストグラム作成部6による
処理の一例を示す図である。
Further, in each of the above embodiments, an example has been described in which a look-up table is created from a histogram of a mask area and a histogram of the entire image. A look-up table may be created from. FIG. 24 is a diagram illustrating an example of a process performed by the histogram creating unit 6 in this case.

【0118】つまり、マスクされている画素の場合はス
テップS17で、ヒストグラム保持部4に格納されている非
マスク領域のヒストグラムHistLUnMskを更新する。 HistLUnMsk[L] = HistLUnMsk[L] + 1
That is, in the case of a masked pixel, the histogram HistLUnMsk of the non-mask area stored in the histogram holding unit 4 is updated in step S17. HistLUnMsk [L] = HistLUnMsk [L] + 1

【0119】この場合、ルックアップテーブル作成部7
の処理(図7)ステップS29およびS30におけるHistLがHi
stLUnMskに相当する。
In this case, the lookup table creation unit 7
HistL in steps S29 and S30 is Hi
Corresponds to stLUnMsk.

【0120】上記の各実施形態において、マスク領域と
非マスク領域との境界で、重みデータを線形に10段階に
変化させるが、ニ次曲線やベジェ曲線、指数曲線、対数
曲線などに従って変化させてよいし、段階も10に限定さ
れるものではない。さらに、縦方向と横方向で変化方法
や段階数を変えてもよい。
In each of the above embodiments, the weight data is changed linearly in ten steps at the boundary between the masked area and the non-masked area. Good, and the steps are not limited to 10. Further, the changing method and the number of steps may be changed in the vertical direction and the horizontal direction.

【0121】また、xy色度値の算出方法において、XYZ
算出時の係数は上記に限定されない。また、色度として
xy値を用いて説明したが、これについても限定されず、
下の式をから得られるrg色度値を使用してもよい。ま
た、RGBの比を用いて色度値としてもよい。 r = R/(R + G + B) g = G/(R + G + B)
In the calculation method of the xy chromaticity value, XYZ
The coefficient at the time of calculation is not limited to the above. Also, as chromaticity
Although described using the xy value, this is not limited,
The rg chromaticity value obtained from the following equation may be used. Alternatively, the chromaticity value may be determined using an RGB ratio. r = R / (R + G + B) g = G / (R + G + B)

【0122】また、図22では楕円形状の画像検出条件を
示したが、矩形など他の形状であってもよい。
Although the ellipse-shaped image detection condition is shown in FIG. 22, other shapes such as a rectangle may be used.

【0123】また、画像属性情報はユーザに指示される
として説明したが、予め設定されていてもよく、また、
画像属性を判別する手段を別途に設けてもよい。画像属
性情報の設定方法はとくに限定しない。
Further, the image attribute information has been described as being instructed by the user, but may be set in advance.
A means for determining an image attribute may be separately provided. The setting method of the image attribute information is not particularly limited.

【0124】[0124]

【発明の効果】以上説明したように、本発明によれば、
画像上の指定領域に応じた補正を画像データに施すこと
ができる。
As described above, according to the present invention,
Correction according to the designated area on the image can be performed on the image data.

【0125】また、画像の属性情報に対応する領域およ
び他の領域それぞれに応じた補正を画像データに施すこ
とができる。
Further, it is possible to apply correction to the image data in accordance with each of the area corresponding to the attribute information of the image and the other areas.

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

【図1】第1実施形態の画像処理を行う画像補正装置の
機能構成の一例を示すブロック図、
FIG. 1 is a block diagram illustrating an example of a functional configuration of an image correction device that performs image processing according to a first embodiment;

【図2】UI部によって提供されるユーザインタフェイス
の一例を示す図、
FIG. 2 is a diagram showing an example of a user interface provided by a UI unit.

【図3】第1実施形態における画像補正手順の概要を示
すフローチャート、
FIG. 3 is a flowchart showing an outline of an image correction procedure according to the first embodiment;

【図4】画像補正処理の詳細を示すフローチャート、FIG. 4 is a flowchart illustrating details of an image correction process;

【図5】ヒストグラム作成部におけるヒストグラム作成
処理の一例を示すフローチャート、
FIG. 5 is a flowchart illustrating an example of a histogram creation process in a histogram creation unit.

【図6】ヒストグラムHistLの一例を示す図、FIG. 6 is a diagram showing an example of a histogram HistL.

【図7】ルックアップテーブル作成部におけるパラメー
タ算出処理の一例を示すフローチャート、
FIG. 7 is a flowchart illustrating an example of a parameter calculation process in a lookup table creation unit;

【図8】ルックアップテーブルの一例を示す図、FIG. 8 is a diagram showing an example of a lookup table.

【図9】LUTLおよびLUTLMskの一例を示す図、FIG. 9 is a diagram showing an example of LUT L and LUT L Msk.

【図10】重みデータ作成部における重みデータ作成処
理の一例を示すフローチャート、
FIG. 10 is a flowchart illustrating an example of weight data creation processing in a weight data creation unit;

【図11】重みデータの更新ルール1の一例を示すフロ
ーチャート、
FIG. 11 is a flowchart illustrating an example of a weight data update rule 1;

【図12】重みデータの更新ルール2の一例を示すフロ
ーチャート、
FIG. 12 is a flowchart showing an example of a weight data update rule 2;

【図13】加重平均を考慮しない場合の重みデータの作
成例を示す図、
FIG. 13 is a diagram showing an example of creating weight data without considering a weighted average,

【図14】加重平均を行う場合の重みデータの作成例を
示す図、
FIG. 14 is a diagram showing an example of creating weight data when performing weighted averaging;

【図15】行または列方向に作成された二つの重みデー
タの合成を説明する図、
FIG. 15 is a diagram for explaining the combination of two weight data created in the row or column direction;

【図16】画像補正部による画像補正処理を示すフロー
チャート、
FIG. 16 is a flowchart illustrating an image correction process performed by an image correction unit;

【図17】LUTLTmpの作成を説明する図、FIG. 17 is a diagram for explaining creation of LUT L Tmp,

【図18】図3に示した画像補正手順の変形例を示すフ
ローチャート、
18 is a flowchart showing a modification of the image correction procedure shown in FIG. 3,

【図19】図2に示したユーザインタフェイスの変形例
を示す図、
FIG. 19 is a view showing a modification of the user interface shown in FIG. 2;

【図20】第2実施形態の画像処理を行う画像補正装置
の機能構成の一例を示すブロック図、
FIG. 20 is a block diagram illustrating an example of a functional configuration of an image correction device that performs image processing according to the second embodiment;

【図21】第2実施形態における画像補正の概要を示す
フローチャート、
FIG. 21 is a flowchart illustrating an outline of image correction according to the second embodiment;

【図22】画像検出条件の一例を示す図、FIG. 22 is a diagram illustrating an example of an image detection condition.

【図23】マスクデータ・重みデータ作成部による画像
検出条件を取得し、マスクデータを作成する手順の一例
を示すフローチャート、
FIG. 23 is a flowchart illustrating an example of a procedure for acquiring an image detection condition by a mask data / weight data creation unit and creating mask data;

【図24】ヒストグラム作成部による処理の別の例を示
す図である。
FIG. 24 is a diagram illustrating another example of the process performed by the histogram creating unit.

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B057 AA11 CA01 CA08 CA12 CB01 CB08 CB12 CC02 CE11 CE17 CH18 DA08 DB02 DB06 DB09 5C077 LL01 LL19 MP01 MP08 PP27 PP28 PP37 PP46 PQ08 PQ18 5C079 HB01 LA01 LA10 LA12 LB12 MA11 MA17 NA01  ──────────────────────────────────────────────────続 き Continued on the front page F-term (reference) 5B057 AA11 CA01 CA08 CA12 CB01 CB08 CB12 CC02 CE11 CE17 CH18 DA08 DB02 DB06 DB09 5C077 LL01 LL19 MP01 MP08 PP27 PP28 PP37 PP46 PQ08 PQ18 5C079 HB01 LA01 LA10 LA17 LB12 MA11

Claims (17)

【特許請求の範囲】[Claims] 【請求項1】 表示された画像内の任意領域の指定を受
け付ける指定手段と、 前記画像に対応する画像データの輝度分布、および、前
記指定領域の輝度分布を取得する取得手段と、 取得される輝度分布に基づき、前記画像データを補正す
るための第一の補正データ、前記指定領域の画像データ
を補正するための第二の補正データ、並びに、前記第一
および第二の補正データを加重平均した第三の補正デー
タを生成する生成手段と、 前記画像データの各画素に対応する重みデータを作成す
る作成手段と、 前記指定領域を示す情報および前記重みデータに基づ
き、前記第一から第三の補正データの何れかを使用し
て、前記画像データを補正する補正手段とを有すること
を特徴とする画像処理装置。
1. A designating unit for accepting designation of an arbitrary region in a displayed image, an acquiring unit acquiring a luminance distribution of image data corresponding to the image, and a luminance distribution of the designated region. Based on a luminance distribution, first correction data for correcting the image data, second correction data for correcting the image data of the specified area, and a weighted average of the first and second correction data Generating means for generating third corrected data, generating means for generating weight data corresponding to each pixel of the image data, and information indicating the designated area and the weight data based on the first to third data. And a correction unit that corrects the image data using any of the correction data.
【請求項2】 前記指定手段は、ブロック分割された画
像を表示し、前記指定領域として前記ブロックの指定を
受け付けるユーザインタフェイスを有することを特徴と
する請求項1に記載された画像処理装置。
2. The image processing apparatus according to claim 1, wherein the designation unit has a user interface that displays an image obtained by dividing the block and receives designation of the block as the designated area.
【請求項3】 前記指定手段は、前記指定領域として矩
形、円または正多角形の形状をもつ領域を受付可能であ
ることを特徴とする請求項2に記載された画像処理装
置。
3. The image processing apparatus according to claim 2, wherein the specifying unit can receive a region having a rectangular, circular, or regular polygonal shape as the specified region.
【請求項4】 前記取得手段は、前記指定領域の輝度分
布を求める際に、前記指定領域の中央近傍の比重を高く
し、前記指定領域の端近傍の比重を低くすることを特徴
とする請求項1から請求項3の何れかに記載された画像処
理装置。
4. The method according to claim 1, wherein the obtaining unit increases a specific gravity near a center of the specified region and decreases a specific gravity near an end of the specified region when obtaining the luminance distribution of the specified region. 4. The image processing device according to claim 1, wherein:
【請求項5】 前記作成手段は、前記指定領域の境界近
傍において、重みデータの値を滑らかに変化させること
を特徴とする請求項1から請求項4の何れかに記載された
画像処理装置。
5. The image processing apparatus according to claim 1, wherein the creating unit smoothly changes the value of the weight data near the boundary of the designated area.
【請求項6】 前記作成手段は、前記指定領域の境界近
傍において、重みデータの値をほぼ線形に変化させるこ
とを特徴とする請求項1から請求項4の何れかに記載され
た画像処理装置。
6. The image processing apparatus according to claim 1, wherein the creating unit changes the value of the weight data substantially linearly near a boundary of the designated area. .
【請求項7】 画像の属性情報に基づき画像検出条件を
設定する設定手段と、 前記画像に対応する画像データの輝度分布、および、前
記画像検出条件にマッチする領域の輝度分布を取得する
取得手段と、 取得される輝度分布に基づき、前記画像データを補正す
るための第一の補正データ、前記マッチ領域の画像デー
タを補正するための第二の補正データ、並びに、前記第
一および第二の補正データを加重平均した第三の補正デ
ータを生成する生成手段と、 前記画像データの各画素に対応する重みデータを作成す
る作成手段と、 前記マッチ領域を示す情報および前記重みデータに基づ
き、前記第一から第三の補正データの何れかを使用し
て、前記画像データを補正する補正手段とを有すること
を特徴とする画像処理装置。
7. A setting unit for setting an image detection condition based on attribute information of an image, an obtaining unit for obtaining a luminance distribution of image data corresponding to the image, and a luminance distribution of a region matching the image detecting condition. And, based on the obtained luminance distribution, first correction data for correcting the image data, second correction data for correcting the image data of the match area, and the first and second Generating means for generating third correction data obtained by performing weighted averaging of the correction data; generating means for generating weight data corresponding to each pixel of the image data; based on information indicating the match area and the weight data, An image processing apparatus comprising: a correction unit configured to correct the image data by using any one of the first to third correction data.
【請求項8】 前記画像の属性情報に基づく画像検出条
件には、少なくとも人肌の色領域を検出する条件が含ま
れることを特徴とする請求項7に記載された画像処理装
置。
8. The image processing apparatus according to claim 7, wherein the image detection condition based on the attribute information of the image includes at least a condition for detecting a human skin color region.
【請求項9】 前記人肌の色領域を検出する条件にマッ
チする領域に対応する補正データは、人肌を好ましい色
に補正するデータであることを特徴とする請求項8に記
載された画像処理装置。
9. The image according to claim 8, wherein the correction data corresponding to an area matching a condition for detecting a human skin color area is data for correcting human skin to a preferable color. Processing equipment.
【請求項10】 前記画像の属性情報に基づく画像検出
条件には、少なくとも人の記憶色に基づく色領域を検出
する条件が含まれることを特徴とする請求項7に記載さ
れた画像処理装置。
10. The image processing apparatus according to claim 7, wherein the image detection condition based on the attribute information of the image includes at least a condition for detecting a color region based on a memory color of a person.
【請求項11】 前記取得手段は、前記指定領域の輝度
分布を求める際に、前記指定領域の中央近傍の比重を高
くし、前記指定領域の端近傍の比重を低くすることを特
徴とする請求項7から請求項10の何れかに記載された画
像処理装置。
11. The method according to claim 11, wherein the obtaining unit increases a specific gravity near a center of the specified region and decreases a specific gravity near an end of the specified region when obtaining the luminance distribution of the specified region. 11. The image processing device according to claim 7, wherein:
【請求項12】 前記作成手段は、前記指定領域の境界
近傍において、重みデータの値を滑らかに変化させるこ
とを特徴とする請求項7から請求項11の何れかに記載さ
れた画像処理装置。
12. The image processing apparatus according to claim 7, wherein the creating unit smoothly changes the value of the weight data near a boundary of the designated area.
【請求項13】 前記作成手段は、前記指定領域の境界
近傍において、重みデータの値をほぼ線形に変化させる
ことを特徴とする請求項7から請求項11の何れかに記載
された画像処理装置。
13. The image processing apparatus according to claim 7, wherein the creation unit changes the value of the weight data substantially linearly near a boundary of the designated area. .
【請求項14】 表示された画像内の任意領域の指定を
受け付け、 前記画像に対応する画像データの輝度分布、および、前
記指定領域の輝度分布を取得し、 取得される輝度分布に基づき、前記画像データを補正す
るための第一の補正データ、前記指定領域の画像データ
を補正するための第二の補正データ、並びに、前記第一
および第二の補正データを加重平均した第三の補正デー
タを生成し、 前記画像データの各画素に対応する重みデータを作成
し、 前記指定領域を示す情報および前記重みデータに基づ
き、前記第一から第三の補正データの何れかを使用し
て、前記画像データを補正することを特徴とする画像処
理方法。
14. Receiving designation of an arbitrary region in a displayed image, acquiring a luminance distribution of image data corresponding to the image, and a luminance distribution of the designated region, and based on the acquired luminance distribution, First correction data for correcting the image data, second correction data for correcting the image data of the designated area, and third correction data obtained by weighted averaging the first and second correction data Generating weight data corresponding to each pixel of the image data, based on the information indicating the designated area and the weight data, using any of the first to third correction data, An image processing method comprising correcting image data.
【請求項15】 画像の属性情報に基づき画像検出条件
を設定し、 前記画像に対応する画像データの輝度分布、および、前
記画像検出条件にマッチする領域の輝度分布を取得し、 取得される輝度分布に基づき、前記画像データを補正す
るための第一の補正データ、前記マッチ領域の画像デー
タを補正するための第二の補正データ、並びに、前記第
一および第二の補正データを加重平均した第三の補正デ
ータを生成し、 前記画像データの各画素に対応する重みデータを作成
し、 前記マッチ領域を示す情報および前記重みデータに基づ
き、前記第一から第三の補正データの何れかを使用し
て、前記画像データを補正することを特徴とする画像処
理方法。
15. An image detection condition is set based on attribute information of an image, and a luminance distribution of image data corresponding to the image and a luminance distribution of a region matching the image detection condition are acquired. Based on the distribution, first correction data for correcting the image data, second correction data for correcting the image data of the match area, and a weighted average of the first and second correction data Generate third correction data, create weight data corresponding to each pixel of the image data, and, based on the information indicating the match area and the weight data, select one of the first to third correction data. Using the image data to correct the image data.
【請求項16】 画像処理のプログラムコードが記録さ
れた記録媒体であって、前記プログラムコードは少なく
とも、 表示された画像内の任意領域の指定を受け付るステップ
のコードと、 前記画像に対応する画像データの輝度分布、および、前
記指定領域の輝度分布を取得するステップのコードと、 取得される輝度分布に基づき、前記画像データを補正す
るための第一の補正データ、前記指定領域の画像データ
を補正するための第二の補正データ、並びに、前記第一
および第二の補正データを加重平均した第三の補正デー
タを生成するステップのコードと、 前記画像データの各画素に対応する重みデータを作成す
るステップのコードと、 前記指定領域を示す情報および前記重みデータに基づ
き、前記第一から第三の補正データの何れかを使用し
て、前記画像データを補正するステップのコードとを有
することを特徴とする記録媒体。
16. A recording medium on which a program code for image processing is recorded, wherein the program code corresponds to at least a code of a step of receiving designation of an arbitrary area in a displayed image, and a code corresponding to the image. A luminance distribution of the image data, and a code of a step of acquiring the luminance distribution of the designated area; first correction data for correcting the image data based on the acquired luminance distribution; image data of the designated area Second correction data for correcting, and a code of a step of generating third correction data by weighted average of the first and second correction data, and weight data corresponding to each pixel of the image data Using any of the first to third correction data based on the code of the step of creating To a recording medium; and a code of the step of correcting the image data.
【請求項17】 画像処理のプログラムコードが記録さ
れた記録媒体であって、前記プログラムコードは少なく
とも、 画像の属性情報に基づき画像検出条件を設定するステッ
プのコードと、 前記画像に対応する画像データの輝度分布、および、前
記画像検出条件にマッチする領域の輝度分布を取得する
ステップのコードと、 取得される輝度分布に基づき、前記画像データを補正す
るための第一の補正データ、前記マッチ領域の画像デー
タを補正するための第二の補正データ、並びに、前記第
一および第二の補正データを加重平均した第三の補正デ
ータを生成するステップのコードと、 前記画像データの各画素に対応する重みデータを作成す
るステップのコードと、 前記マッチ領域を示す情報および前記重みデータに基づ
き、前記第一から第三の補正データの何れかを使用し
て、前記画像データを補正するステップのコードとを有
することを特徴とする記録媒体。
17. A recording medium on which a program code for image processing is recorded, wherein the program code includes at least a code for setting an image detection condition based on attribute information of an image, and image data corresponding to the image. And a code for a step of obtaining a luminance distribution of a region that matches the image detection condition, based on the obtained luminance distribution, first correction data for correcting the image data, the match region A second correction data for correcting the image data, and a code of a step of generating a third correction data by weighted averaging the first and second correction data, corresponding to each pixel of the image data Based on the code of the step of creating weight data to be executed, and the information indicating the match area and the weight data. Of using any of the correction data, a recording medium; and a code of the step of correcting the image data.
JP2000325587A 2000-10-25 2000-10-25 Image processing apparatus and its method Withdrawn JP2002135587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000325587A JP2002135587A (en) 2000-10-25 2000-10-25 Image processing apparatus and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000325587A JP2002135587A (en) 2000-10-25 2000-10-25 Image processing apparatus and its method

Publications (1)

Publication Number Publication Date
JP2002135587A true JP2002135587A (en) 2002-05-10

Family

ID=18802932

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000325587A Withdrawn JP2002135587A (en) 2000-10-25 2000-10-25 Image processing apparatus and its method

Country Status (1)

Country Link
JP (1) JP2002135587A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006137361A1 (en) * 2005-06-20 2006-12-28 Nikon Corporation Image processing device, image processing method, image processing program product, and imaging device
JP2007067815A (en) * 2005-08-31 2007-03-15 Olympus Imaging Corp Image processing device and image processing method
JP2007087304A (en) * 2005-09-26 2007-04-05 Konica Minolta Business Technologies Inc Image processing apparatus, input image correction method, and computer program
JP2008131542A (en) * 2006-11-24 2008-06-05 Fujifilm Corp Color correction apparatus, and color correction program
JP2008182633A (en) * 2007-01-26 2008-08-07 Konica Minolta Business Technologies Inc Image processing apparatus
JP2008312177A (en) * 2007-03-27 2008-12-25 Nippon Telegr & Teleph Corp <Ntt> Apparatus, method and program, for converting gradation of video image

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006137361A1 (en) * 2005-06-20 2006-12-28 Nikon Corporation Image processing device, image processing method, image processing program product, and imaging device
JP4831067B2 (en) * 2005-06-20 2011-12-07 株式会社ニコン Image processing apparatus, image processing method, image processing program product, and imaging apparatus
US8103119B2 (en) 2005-06-20 2012-01-24 Nikon Corporation Image processing device, image processing method, image processing program product, and image-capturing device
JP2007067815A (en) * 2005-08-31 2007-03-15 Olympus Imaging Corp Image processing device and image processing method
JP2007087304A (en) * 2005-09-26 2007-04-05 Konica Minolta Business Technologies Inc Image processing apparatus, input image correction method, and computer program
JP2008131542A (en) * 2006-11-24 2008-06-05 Fujifilm Corp Color correction apparatus, and color correction program
JP2008182633A (en) * 2007-01-26 2008-08-07 Konica Minolta Business Technologies Inc Image processing apparatus
JP2008312177A (en) * 2007-03-27 2008-12-25 Nippon Telegr & Teleph Corp <Ntt> Apparatus, method and program, for converting gradation of video image

Similar Documents

Publication Publication Date Title
US8184177B2 (en) White balance control apparatus, control method therefor, and image sensing apparatus
JP5205968B2 (en) Gradation correction method, gradation correction apparatus, gradation correction program, and image device
JP4372747B2 (en) Luminance level conversion device, luminance level conversion method, solid-state imaging device, luminance level conversion program, and recording medium
US6535301B1 (en) Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium
JP4163353B2 (en) Image processing device
JP3772133B2 (en) Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium
US8487958B2 (en) Method and system for changing image density and contrast
JP5672796B2 (en) Image processing apparatus and image processing method
JP2002207474A (en) Image displaying state modification method
JP2005252711A (en) Photographing system using digital still camera and photographing control method
JP2002290707A (en) Image processing device
JP5165076B2 (en) Video display device
WO2008102296A2 (en) Method for enhancing the depth sensation of an image
JPH11250222A (en) Method and device for processing picture
JP4151225B2 (en) Apparatus, method and program for image processing
JP3673092B2 (en) Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program
JP4428159B2 (en) Image data generation apparatus, image quality correction apparatus, image data generation method, and image quality correction method
JP2002135587A (en) Image processing apparatus and its method
JP2001069352A (en) Picture processor and its method
JP2000102033A (en) Automatic gradation correction method
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2002044451A (en) Image processor and method therefor
JP2002369004A (en) Image processing unit, image output device, image processing method and storage medium
JP4355416B2 (en) Image processing apparatus and method
JP4544064B2 (en) Imaging apparatus, imaging method, and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080108