JP2006039666A - Image processing method, image processor and image processing program - Google Patents

Image processing method, image processor and image processing program Download PDF

Info

Publication number
JP2006039666A
JP2006039666A JP2004214589A JP2004214589A JP2006039666A JP 2006039666 A JP2006039666 A JP 2006039666A JP 2004214589 A JP2004214589 A JP 2004214589A JP 2004214589 A JP2004214589 A JP 2004214589A JP 2006039666 A JP2006039666 A JP 2006039666A
Authority
JP
Japan
Prior art keywords
image data
image
light distribution
region
extraction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004214589A
Other languages
Japanese (ja)
Inventor
Chizuko Ikeda
千鶴子 池田
Shoichi Nomura
庄一 野村
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.)
Konica Minolta Photo Imaging Inc
Original Assignee
Konica Minolta Photo Imaging 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 Konica Minolta Photo Imaging Inc filed Critical Konica Minolta Photo Imaging Inc
Priority to JP2004214589A priority Critical patent/JP2006039666A/en
Publication of JP2006039666A publication Critical patent/JP2006039666A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve the accuracy of head-and-tail determination of a photographed image regardless of the photographing environment. <P>SOLUTION: The image processor 1 determines a light distribution condition (normal light, back light, or strobing) from photographed image data (step S2), and determines an extraction condition of image area based on the determined light distribution condition (step S3). According to the determined extraction condition, a blank area or a facial area (if a person is contained in the image data) is extracted from the photographed image data (step S4), and the head and tail of the photographed image data is determined based on the extracted image area (step S5). <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、撮影画像データに対して画像処理を施す画像処理方法、画像処理装置及び画像処理プログラムに関する。   The present invention relates to an image processing method, an image processing apparatus, and an image processing program for performing image processing on captured image data.

近年、デジタルスチルカメラ(玩具用、携帯電話やラップトップパソコン等の機器に組み込まれたもの、一般ユーザ用の汎用用途、高機能なプロ用途のカメラを含む。以下、DSCと略称する。)が広く普及し、カラー写真フィルムと同様に、ハードコピー画像として出力されたり、CRT(Cathode Ray Tube)等の出力媒体に表示されたりして鑑賞されている。   In recent years, digital still cameras (including toys, cameras incorporated in devices such as mobile phones and laptop computers, general-purpose applications for general users, and high-functional professional cameras. Hereinafter, abbreviated as DSC). Widely used, as with color photographic film, it is output as a hard copy image or displayed on an output medium such as a CRT (Cathode Ray Tube).

また、カラー写真フィルム上に形成された画像をCCD(Charge Coupled Device)センサ等で光電的に読みとって画像信号に変換する技術が広く用いられている。このような画像信号は、ネガポジ反転、輝度調整、カラーバランス調整、粒状除去、鮮鋭性強調に代表される種々の画像処理を施された後に、CD−R(CD-Recordable)、CD−RW(CD-ReWritable)、フロッピー(登録商標)ディスク、メモリーカード等の記録媒体に記録されたり、インターネット経由で配布され、銀塩印画紙、インクジェットプリンタ、サーマルプリンタ等でハードコピーとして出力されたり、CRT、液晶ディスプレイ、プラズマディスプレイ等の出力媒体に表示されたりして鑑賞される。   In addition, a technique is widely used in which an image formed on a color photographic film is photoelectrically read by a CCD (Charge Coupled Device) sensor or the like and converted into an image signal. Such an image signal is subjected to various kinds of image processing represented by negative / positive inversion, brightness adjustment, color balance adjustment, grain removal, and sharpness enhancement, and then CD-R (CD-Recordable), CD-RW ( CD-ReWritable), floppy (registered trademark) disk, memory card, or other recording media, distributed via the Internet, and output as a hard copy on silver halide photographic paper, inkjet printers, thermal printers, etc. It can be viewed on an output medium such as a liquid crystal display or plasma display.

画像鑑賞時若しくは画像処理時に、撮影シーンの上下が正しく表示されない(天地が逆である)ことは、鑑賞時の高揚感が損なわれたり、画像処理の処理効率が低下したりするため(回転処理の一手間が入るため)好ましくない。このような背景を受けて、撮影画像の天地を自動的に判定する技術が多々開示されている。例えば、特許文献1には、APS(Advanced Photo System)フィルムの磁気情報、デジタル画像データのExif(Exchangeable Image File Format)等のタグ情報に記録されている天地情報を画像表示時や画像処理時に参照し、タグ情報の天地情報と、実際に表示されている天地が逆であれば、回転処理を適用する技術が開示されている。   When viewing images or processing images, the top and bottom of the shooting scene are not displayed correctly (the top and bottom are reversed), because the uplifting feeling during viewing is impaired, and the processing efficiency of image processing decreases (rotation processing) This is not preferable). Many techniques for automatically determining the top and bottom of a captured image in response to such a background have been disclosed. For example, Patent Document 1 refers to top and bottom information recorded in tag information such as magnetic information of an APS (Advanced Photo System) film and Exif (Exchangeable Image File Format) of digital image data at the time of image display or image processing. However, a technique is disclosed in which rotation processing is applied if the top and bottom information of the tag information and the top and bottom actually displayed are reversed.

また、特許文献2には、撮影画像の撮影シーンを解析して天地を自動的に判定する技術が開示されている。この特許文献2では、天頂から水平線にかけて空の色味が濃い色から白に向けてグラデーションを有する特性を利用したものであり、まず、撮影画像から空領域を抽出し、その抽出された領域の色勾配を基に天地方向を決定している。
特開平10−171035号公報 特開2001−195591号公報
Patent Document 2 discloses a technique for automatically determining the top and bottom by analyzing a shooting scene of a shot image. This patent document 2 uses a characteristic that has a gradation from a dark color to a white color from the zenith to the horizon, and first, the sky region is extracted from the photographed image, and the extracted region The top and bottom direction is determined based on the color gradient.
Japanese Patent Laid-Open No. 10-171035 Japanese Patent Laid-Open No. 2001-195591

しかしながら、特許文献1に開示された技術は、必ずしも、タグ情報に天地情報が記録されているものではなく不完全なものであり、また、記録されている情報も、実際の撮影シーンの天地と適合していないこともあり、天地判定の精度が十分であるとは言えなかった。また、実際の撮影シーンでは、空の色は様々であり、また、ダイナミックレンジの低いデジタルカメラで撮影された画像では、特に撮影条件によって、空領域や単色の背景領域の勾配が低くなることも多々あるため(例えば、逆光状態では、背景が白くとんでしまう。)、特許文献2の技術を適用しても、天地判定の精度が十分であるとは言えなかった。   However, the technique disclosed in Patent Document 1 is not necessarily the one in which the top-and-bottom information is recorded in the tag information, but is incomplete, and the recorded information is also the top and bottom of the actual shooting scene. The accuracy of the top and bottom judgment could not be said to be sufficient because it was not compatible. Also, in actual shooting scenes, the sky color varies, and in images shot with a digital camera with a low dynamic range, the gradient of the sky area or monochrome background area may be low, depending on the shooting conditions. Since there are many cases (for example, the background is white in the backlight state), even if the technique of Patent Document 2 is applied, it cannot be said that the accuracy of the top-and-bottom determination is sufficient.

本発明の課題は、撮影環境に関わらず、撮影画像の天地判定の精度を向上させることである。   The subject of this invention is improving the precision of the top-and-bottom determination of a picked-up image irrespective of a photography environment.

上記課題を解決するため、請求項1に記載の発明は、撮影画像データから、撮影時の配光条件を判別する判別工程と、前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定工程と、前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出工程と、前記抽出された画像領域に基づいて前記撮影画像データの天地を判定する判定工程と、を含むことを特徴としている。   In order to solve the above-described problem, the invention according to claim 1 is a determination step of determining a light distribution condition at the time of photographing from photographed image data, and a predetermined image region extraction condition from the determined light distribution condition. A determination step of determining at least one image area from the captured image data according to the determined extraction condition, and determining a top and bottom of the captured image data based on the extracted image area And a determination step.

請求項2に記載の発明は、撮影画像データから、撮影時の配光条件を判別する判別工程と、前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定工程と、前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出工程と、前記抽出された画像領域から所定の特徴量を算出する算出工程と、前記算出された特徴量及び前記判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて前記撮影画像データの天地を判定する判定工程と、を含むことを特徴としている。   The invention according to claim 2 is a determination step of determining a light distribution condition at the time of shooting from captured image data, a determination step of determining an extraction condition of a predetermined image region from the determined light distribution condition, In accordance with the determined extraction condition, an extraction step of extracting at least one image region from the captured image data, a calculation step of calculating a predetermined feature amount from the extracted image region, the calculated feature amount, and And a determination step of determining the top of the photographed image data using a neural network using a feature amount calculated based on the determined light distribution condition as an input signal.

ここで、「所定の特徴量」には、抽出された画像領域の撮影画像データ中における位置と、抽出された画像領域の確度(例えば、空である確度)の二種類がある。位置の例としては、重心位置、色値の勾配の方向等があり、確度の例としては、色に関する統計値や勾配値、形状、コントラスト、テクスチャの一様性等がある。本発明では、所定の特徴量として、位置を表す特徴量が含まれることが好ましい。更に、位置とともに確度を表す特徴量が含まれることがより好ましい。   Here, the “predetermined feature amount” has two types, that is, the position of the extracted image region in the captured image data and the accuracy of the extracted image region (for example, the accuracy of being empty). Examples of the position include the position of the center of gravity and the direction of the gradient of the color value, and examples of the accuracy include statistical values and gradient values regarding the color, shape, contrast, texture uniformity, and the like. In the present invention, it is preferable that a feature quantity representing a position is included as the predetermined feature quantity. Further, it is more preferable that a feature amount representing accuracy is included with the position.

請求項3に記載の発明は、請求項1又は2に記載の画像処理方法において、前記撮影時の配光条件には、逆光状態及び/又はフラッシュ光利用状態が含まれることを特徴としている。   According to a third aspect of the present invention, in the image processing method according to the first or second aspect, the light distribution condition at the time of photographing includes a backlight state and / or a flash light utilization state.

請求項4に記載の発明は、請求項1〜3の何れか一項に記載の画像処理方法において、前記抽出工程において抽出される画像領域には、少なくとも主要被写体の背景領域が含まれることを特徴としている。   According to a fourth aspect of the present invention, in the image processing method according to any one of the first to third aspects, the image region extracted in the extraction step includes at least a background region of a main subject. It is a feature.

本発明における「背景領域」としては、天地の位置的関係がある確度をもって不変である被写体が撮影されている画像領域であることが好ましい。具体的には、一定の色相において構成され、且つ、テクスチャや強いエッジがなく平坦な、或いはなだらかな勾配を有する被写体(例えば、空や雲など)であることが好ましい。また、一定の周期的なテクスチャで構成される被写体(例えば、芝生や地面、木の葉が密集している部分)を追加することも好ましい。   The “background region” in the present invention is preferably an image region in which a subject that is invariant with certainty in the positional relationship between the top and bottom is photographed. Specifically, it is preferably a subject (for example, sky or cloud) that has a constant hue and has no texture or strong edges and has a flat or gentle gradient. It is also preferable to add a subject (for example, a portion where lawn, ground, and leaves are dense) composed of a certain periodic texture.

請求項5に記載の発明は、請求項4に記載の画像処理方法において、前記抽出工程において抽出される画像領域には、少なくとも人物の顔領域が含まれることを特徴としている。   According to a fifth aspect of the present invention, in the image processing method according to the fourth aspect, the image region extracted in the extraction step includes at least a human face region.

請求項6に記載の発明は、撮影画像データから、撮影時の配光条件を判別する判別手段と、前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定手段と、前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出手段と、前記抽出された画像領域に基づいて前記撮影画像データの天地を判定する判定手段と、を備えることを特徴としている。   The invention according to claim 6 is a discriminating means for discriminating a light distribution condition at the time of photographing from photographed image data; a determining means for determining an extraction condition for a predetermined image region from the discriminated light distribution condition; An extraction unit that extracts at least one image area from the captured image data in accordance with the determined extraction condition; and a determination unit that determines the top of the captured image data based on the extracted image area. It is characterized by.

請求項7に記載の発明は、撮影画像データから、撮影時の配光条件を判別する判別手段と、前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定手段と、前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出手段と、前記抽出された画像領域から所定の特徴量を算出する算出手段と、前記算出された特徴量及び前記判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて前記撮影画像データの天地を判定する判定手段と、を備えることを特徴としている。   The invention according to claim 7 is a discriminating means for discriminating a light distribution condition at the time of photographing from photographed image data; a determining means for determining an extraction condition for a predetermined image region from the discriminated light distribution condition; In accordance with the determined extraction condition, an extraction unit that extracts at least one image region from the captured image data, a calculation unit that calculates a predetermined feature amount from the extracted image region, the calculated feature amount, and And determining means for determining the top and bottom of the photographed image data using a neural network with the feature amount calculated based on the determined light distribution condition as an input signal.

請求項8に記載の発明は、請求項6又は7に記載の画像処理装置において、前記撮影時の配光条件には、逆光状態及び/又はフラッシュ光利用状態が含まれることを特徴としている。   According to an eighth aspect of the present invention, in the image processing device according to the sixth or seventh aspect, the light distribution condition at the time of photographing includes a backlight state and / or a flash light utilization state.

請求項9に記載の発明は、請求項6〜8の何れか一項に記載の画像処理装置において、前記抽出手段は、前記撮影画像データから、少なくとも主要被写体の背景領域を抽出することを特徴としている。   The invention according to claim 9 is the image processing apparatus according to any one of claims 6 to 8, wherein the extraction unit extracts at least a background area of a main subject from the photographed image data. It is said.

請求項10に記載の発明は、請求項9に記載の画像処理装置において、前記抽出手段は、前記撮影画像データから、少なくとも人物の顔領域を抽出することを特徴としている。   According to a tenth aspect of the present invention, in the image processing apparatus according to the ninth aspect, the extracting means extracts at least a human face area from the photographed image data.

請求項11に記載の発明は、画像処理を実行するコンピュータに、撮影画像データから、撮影時の配光条件を判別する判別機能と、前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定機能と、前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出機能と、前記抽出された画像領域に基づいて前記撮影画像データの天地を判定する判定機能と、を実現させる。   According to an eleventh aspect of the present invention, a computer executing image processing has a discrimination function for discriminating a light distribution condition at the time of photographing from photographed image data, and extraction of a predetermined image area from the determined light distribution condition. A determination function for determining a condition; an extraction function for extracting at least one image area from the captured image data according to the determined extraction condition; and determining the top and bottom of the captured image data based on the extracted image area And a determination function to perform.

請求項12に記載の発明は、画像処理を実行するコンピュータに、撮影画像データから、撮影時の配光条件を判別する判別機能と、前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定機能と、前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出機能と、前記抽出された画像領域から所定の特徴量を算出する算出機能と、前記算出された特徴量及び前記判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて前記撮影画像データの天地を判定する判定機能と、を実現させる。   According to a twelfth aspect of the present invention, a computer executing image processing has a discrimination function for discriminating a light distribution condition at the time of photographing from photographed image data, and extraction of a predetermined image area from the discriminated light distribution condition. A determination function for determining a condition, an extraction function for extracting at least one image area from the captured image data in accordance with the determined extraction condition, and a calculation function for calculating a predetermined feature amount from the extracted image area; And a determination function for determining the top of the photographed image data using a neural network using the calculated feature value and the feature value calculated based on the determined light distribution condition as an input signal.

請求項13に記載の発明は、請求項11又は12に記載の画像処理プログラムにおいて、前記撮影時の配光条件には、逆光状態及び/又はフラッシュ光利用状態が含まれることを特徴としている。   According to a thirteenth aspect of the present invention, in the image processing program according to the eleventh or twelfth aspect, the light distribution condition at the time of photographing includes a backlight state and / or a flash light utilization state.

請求項14に記載の発明は、請求項11〜13の何れか一項に記載の画像処理プログラムにおいて、前記抽出機能を実現させる際に、前記撮影画像データから、少なくとも主要被写体の背景領域を抽出させることを特徴としている。   According to a fourteenth aspect of the present invention, in the image processing program according to any one of the eleventh to thirteenth aspects, at least the background area of the main subject is extracted from the captured image data when the extraction function is realized. It is characterized by letting.

請求項15に記載の発明は、請求項14に記載の画像処理プログラムにおいて、前記抽出機能を実現させる際に、前記撮影画像データから、少なくとも人物の顔領域を抽出させることを特徴としている。   According to a fifteenth aspect of the present invention, in the image processing program according to the fourteenth aspect, when realizing the extraction function, at least a human face region is extracted from the photographed image data.

本発明によれば、撮影画像データから、配光条件に応じて決定された画像領域を抽出して、抽出された画像領域に基づいて天地判定を行うことにより、どのような撮影環境であっても天地判定の判定精度を向上させることができる。   According to the present invention, the image area determined according to the light distribution condition is extracted from the captured image data, and the top / bottom determination is performed based on the extracted image area. In addition, it is possible to improve the determination accuracy of the top / bottom determination.

また、撮影画像データから、配光条件に応じて決定された画像領域を抽出して、抽出された画像領域の特徴量と、配光条件の特徴量を入力信号としたニューラルネットワークを用いて天地を判定することにより、どのような撮影環境であっても天地判定の判定精度を向上させることができるとともに、ユーザの撮影状況が反映された天地判定を行うことができる。   In addition, the image area determined according to the light distribution condition is extracted from the photographed image data, and the feature amount of the extracted image area and the neural network using the feature quantity of the light distribution condition as an input signal are used to Therefore, it is possible to improve the determination accuracy of the top / bottom determination in any shooting environment, and to perform the top / bottom determination reflecting the user's shooting situation.

更に、撮影時の配光条件として、逆光状態、フラッシュ光状態(ストロボ)になる頻度は高く、被写体の色味への影響も大きいため、先に配光条件を判別し、その判別結果に適した画像領域を抽出することにより、天地判定の精度を一層向上させることができる。   Furthermore, as the light distribution conditions at the time of shooting, the frequency of backlighting and flashing (strobe) is high, and the influence on the color of the subject is great. By extracting the image area, the accuracy of the top and bottom determination can be further improved.

特に、背景領域に基づいて天地判定を行うと、判定精度を更に向上させることができる。また、撮影画像データに人物が含まれている場合、背景領域だけでなく人物の顔領域に基づいて天地判定を行うと、判定精度を一層高めることができる。   In particular, if the top / bottom determination is performed based on the background region, the determination accuracy can be further improved. When the photographed image data includes a person, the determination accuracy can be further improved by performing the top / bottom determination based on the person's face area as well as the background area.

以下、図面を参照して、本発明の実施形態を詳細に説明する。
まず、図1〜3を参照して、本発明の実施形態1及び2に共通の構成として、本発明が適用された画像処理装置1の外観構成及び内部構成について説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, an external configuration and an internal configuration of an image processing apparatus 1 to which the present invention is applied will be described as a configuration common to Embodiments 1 and 2 of the present invention with reference to FIGS.

[実施形態1]
〈画像処理装置1の外観構成〉
図1は、本発明の実施形態1及び2における画像処理装置1の外観構成を示す斜視図である。図1に示すように、画像処理装置1には、筐体2の一側面に感光材料を装填するためのマガジン装填部3が設けられている。筐体2の内側には、感光材料に露光する露光処理部4と、露光された感光材料を現像処理して乾燥し、プリントを作成するプリント作成部5が設けられている。作成されたプリントは、筐体2の他側面に設けられたトレー6に排出される。
[Embodiment 1]
<Appearance Configuration of Image Processing Apparatus 1>
FIG. 1 is a perspective view showing an external configuration of an image processing apparatus 1 according to Embodiments 1 and 2 of the present invention. As shown in FIG. 1, the image processing apparatus 1 is provided with a magazine loading unit 3 for loading a photosensitive material on one side surface of a housing 2. An exposure processing unit 4 that exposes the photosensitive material and a print creation unit 5 that develops the exposed photosensitive material, dries it, and creates a print are provided inside the housing 2. The created print is discharged to a tray 6 provided on the other side of the housing 2.

また、筐体2の上部には、表示装置としてのCRT(Cathode Ray Tube)8、透過原稿を読み込む装置であるフィルムスキャナ部9、反射原稿入力装置10、操作部11が備えられている。さらに、筐体2には、各種デジタル記録媒体に記録された画像情報を読み取り可能な画像読込部14、各種デジタル記録媒体に画像信号を書き込み(出力)可能な画像書込部15が備えられている。また、筐体2の内部には、これらの各部を集中制御する制御部7が備えられている。   In addition, a CRT (Cathode Ray Tube) 8 serving as a display device, a film scanner unit 9 serving as a device for reading a transparent document, a reflective document input device 10, and an operation unit 11 are provided on the upper portion of the housing 2. Further, the housing 2 includes an image reading unit 14 that can read image information recorded on various digital recording media, and an image writing unit 15 that can write (output) image signals to various digital recording media. Yes. In addition, a control unit 7 that centrally controls these units is provided inside the housing 2.

画像読込部14には、PCカード用アダプタ14a、フロッピー(登録商標)ディスク用アダプタ14bが備えられ、PCカード13aやフロッピー(登録商標)ディスク13bが差し込み可能になっている。PCカード13aは、デジタルカメラで撮像された複数の画像データが記録されたメモリを有する。フロッピー(登録商標)ディスク13bには、例えば、デジタルカメラで撮像された複数の画像データが記録されている。その他、画像データを有する記録媒体としては、マルチメディアカード、メモリースティック、MD(Mini Disc)データ、CD−ROM(Compact Disc Read Only Memory)等が挙げられる。   The image reading unit 14 includes a PC card adapter 14a and a floppy (registered trademark) disk adapter 14b, and a PC card 13a and a floppy (registered trademark) disk 13b can be inserted therein. The PC card 13a has a memory in which a plurality of image data captured by a digital camera is recorded. For example, a plurality of image data captured by a digital camera are recorded on the floppy (registered trademark) disk 13b. In addition, examples of the recording medium having image data include a multimedia card, a memory stick, MD (Mini Disc) data, and a CD-ROM (Compact Disc Read Only Memory).

画像書込部15には、フロッピー(登録商標)ディスク用アダプタ15a、MO用アダプタ15b、光ディスク用アダプタ15cが備えられ、各々、フロッピー(登録商標)ディスク16a、MO16b、光ディスク16cが差し込み可能になっており、画像情報を画像記録メディアに書き込むことができるようになっている。光ディスク16cとしては、CD−R(Compact Disc-Recordable)、DVD−R(Digital Versatile Disk-Recordable)等がある。   The image writing unit 15 includes a floppy (registered trademark) disk adapter 15a, an MO adapter 15b, and an optical disk adapter 15c, and a floppy (registered trademark) disk 16a, MO 16b, and an optical disk 16c can be inserted into the image writing unit 15, respectively. Image information can be written to an image recording medium. Examples of the optical disk 16c include a CD-R (Compact Disc-Recordable), a DVD-R (Digital Versatile Disk-Recordable), and the like.

なお、図1では、操作部11、CRT8、フィルムスキャナ部9、反射原稿入力装置10、画像読込部14が、筐体2に一体的に備えられた構造となっているが、これらのいずれか1つ以上を別体として設けるようにしてもよい。   In FIG. 1, the operation unit 11, the CRT 8, the film scanner unit 9, the reflection original input device 10, and the image reading unit 14 are integrally provided in the housing 2. One or more may be provided separately.

なお、図1に示した画像処理装置1では、感光材料に露光して現像してプリントを作成するものが例示されているが、プリント作成方式はこれに限定されず、例えば、インクジェット方式、電子写真方式、感熱方式、昇華方式等の方式を用いてもよい。   In the image processing apparatus 1 shown in FIG. 1, an example is illustrated in which a photosensitive material is exposed and developed to create a print, but the print creation method is not limited to this, and for example, an inkjet method, an electronic A method such as a photographic method, a thermal method, or a sublimation method may be used.

〈画像処理装置1の内部構成〉
図2に、画像処理装置1内部の主要部構成を示す。画像処理装置1は、図2に示すように、制御部7、露光処理部4、プリント作成部5、CRT8、フィルムスキャナ部9、反射原稿入力装置10、操作部11、画像読込部14、画像書込部15、通信手段(入力)32、通信手段(出力)33、データ蓄積手段71から構成される。
<Internal Configuration of Image Processing Apparatus 1>
FIG. 2 shows a main part configuration inside the image processing apparatus 1. As shown in FIG. 2, the image processing apparatus 1 includes a control unit 7, an exposure processing unit 4, a print creation unit 5, a CRT 8, a film scanner unit 9, a reflective original input device 10, an operation unit 11, an image reading unit 14, and an image. The writing unit 15 includes a communication unit (input) 32, a communication unit (output) 33, and a data storage unit 71.

制御部7は、マイクロコンピュータにより構成され、ROM(Read Only Memory)等の記憶部(図示略)に記憶されている画像処理プログラム等の各種制御プログラムと、CPU(Central Processing Unit)(図示略)との協働により、画像処理装置1を構成する各部の動作を統括的に制御する。   The control unit 7 includes a microcomputer, and various control programs such as an image processing program stored in a storage unit (not shown) such as a ROM (Read Only Memory), and a CPU (Central Processing Unit) (not shown). The operation of each part constituting the image processing apparatus 1 is comprehensively controlled in cooperation with the above.

制御部7は、画像処理部70を有し、操作部11からの入力信号(指令情報)に基づいて、フィルムスキャナ部9や反射原稿入力装置10により取得した画像データ、画像読込部14から読み込まれた画像データ、外部機器から通信手段(入力)32を介して入力された画像データに対して、画像処理を施して出力用画像データを生成し、露光処理部4に出力する。また、画像処理部70は、画像処理された画像データに対して出力形態に応じた変換処理を施して出力する。画像処理部70の出力先としては、CRT8、画像書込部15、通信手段(出力)33等がある。   The control unit 7 includes an image processing unit 70, and reads image data acquired by the film scanner unit 9 or the reflection original input device 10 from the image reading unit 14 based on an input signal (command information) from the operation unit 11. The processed image data and image data input from an external device via the communication means (input) 32 are subjected to image processing to generate output image data, which are output to the exposure processing unit 4. Further, the image processing unit 70 performs a conversion process corresponding to the output form on the image processed image data, and outputs the converted image data. Output destinations of the image processing unit 70 include the CRT 8, the image writing unit 15, the communication means (output) 33, and the like.

露光処理部4は、感光材料に画像の露光を行い、この感光材料をプリント作成部5に出力する。プリント作成部5は、露光された感光材料を現像処理して乾燥し、プリントP1、P2、P3を作成する。プリントP1は、サービスサイズ、ハイビジョンサイズ、パノラマサイズ等のプリントであり、プリントP2は、A4サイズのプリントであり、プリントP3は、名刺サイズのプリントである。   The exposure processing unit 4 exposes an image to the photosensitive material and outputs the photosensitive material to the print creating unit 5. The print creating unit 5 develops and exposes the exposed photosensitive material to create prints P1, P2, and P3. The print P1 is a service size, high-definition size, panoramic size print, the print P2 is an A4 size print, and the print P3 is a business card size print.

フィルムスキャナ部9は、アナログカメラにより撮像された現像済みのネガフィルムNやリバーサルフィルム等の透過原稿に記録された画像を読み取る。   The film scanner unit 9 reads an image recorded on a transparent original such as a developed negative film N or a reversal film taken by an analog camera.

反射原稿入力装置10は、図示しないフラットベッドスキャナにより、プリントP(写真プリント、書画、各種の印刷物)に形成された画像を読み取る。   The reflection original input device 10 reads an image formed on a print P (photo print, document, various printed materials) by a flat bed scanner (not shown).

操作部11は、情報入力手段12を有する。情報入力手段12は、例えば、タッチパネル等により構成されており、情報入力手段12の押下信号を入力信号として制御部7に出力する。なお、操作部11は、キーボードやマウス等を備えて構成するようにしてもよい。CRT8は、制御部7から入力された表示制御信号に従って、画像データ等を表示する。   The operation unit 11 includes information input means 12. The information input unit 12 is configured by a touch panel, for example, and outputs a pressing signal of the information input unit 12 to the control unit 7 as an input signal. Note that the operation unit 11 may be configured to include a keyboard, a mouse, and the like. The CRT 8 displays image data and the like according to the display control signal input from the control unit 7.

画像読込部14は、画像転送手段30として、PCカード用アダプタ14a、フロッピー(登録商標)ディスク用アダプタ14b等を有し、PCカード用アダプタ14aに差し込まれたPCカード13aや、フロッピー(登録商標)ディスク用アダプタ14bに差し込まれたフロッピー(登録商標)ディスク13bに記録された画像データを読み出して制御部7に転送する。PCカード用アダプタ14aとしては、例えばPCカードリーダやPCカードスロット等が用いられる。   The image reading unit 14 includes, as the image transfer means 30, a PC card adapter 14a, a floppy (registered trademark) disk adapter 14b, and the like, and the PC card 13a inserted into the PC card adapter 14a or a floppy (registered trademark). ) Image data recorded on the floppy (registered trademark) disk 13b inserted into the disk adapter 14b is read out and transferred to the control unit 7. For example, a PC card reader or a PC card slot is used as the PC card adapter 14a.

画像書込部15は、画像搬送部31として、フロッピー(登録商標)ディスク用アダプタ15a、MO用アダプタ15b、光ディスク用アダプタ15cを備えている。画像書込部15は、制御部7から入力される書込信号に従って、フロッピー(登録商標)ディスク用アダプタ15aに差し込まれたフロッピー(登録商標)ディスク16a、MO用アダプタ15bに差し込まれたMO16b、光ディスク用アダプタ15cに差し込まれた光ディスク16cに、生成された画像データを書き込む。   The image writing unit 15 includes, as the image conveying unit 31, a floppy (registered trademark) disk adapter 15a, an MO adapter 15b, and an optical disk adapter 15c. In accordance with a write signal input from the control unit 7, the image writing unit 15 includes a floppy (registered trademark) disk 16a inserted into the floppy (registered trademark) disk adapter 15a, an MO 16b inserted into the MO adapter 15b, The generated image data is written to the optical disk 16c inserted into the optical disk adapter 15c.

通信手段(入力)32は、画像処理装置1が設置された施設内の別のコンピュータや、インターネット等を介した遠方のコンピュータから、撮像画像を表す画像データやプリント命令信号を受信する。   The communication means (input) 32 receives image data representing a captured image and a print command signal from another computer in the facility where the image processing apparatus 1 is installed, or a remote computer via the Internet or the like.

通信手段(出力)33は、画像処理を施した後の撮影画像を表す画像データと注文情報を、画像処理装置1が設置された施設内の他のコンピュータや、インターネット等を介した遠方のコンピュータに対して送信する。   The communication means (output) 33 sends image data representing the captured image after image processing and order information to another computer in the facility where the image processing apparatus 1 is installed, or a remote computer via the Internet or the like. Send to.

データ蓄積手段71は、画像データとそれに対応する注文情報(どの駒の画像から何枚プリントを作成するかの情報、プリントサイズの情報等)とを記憶し、順次蓄積する。   The data storage means 71 stores and sequentially stores image data and corresponding order information (information about how many prints are to be created from images of which frames, information on print sizes, etc.).

〈画像処理部70の構成〉
図3に、画像処理部70内部の主要部構成を示す。画像処理部70は、図3に示すように、フィルムスキャンデータ処理部701、反射原稿スキャンデータ処理部702、画像データ書式解読処理部703、画像調整処理部704、CRT固有処理部705、プリンタ固有処理部(1)706、プリンタ固有処理部(2)707、画像データ書式作成処理部708から構成される。
<Configuration of Image Processing Unit 70>
FIG. 3 shows a main part configuration inside the image processing unit 70. As shown in FIG. 3, the image processing unit 70 includes a film scan data processing unit 701, a reflection original scan data processing unit 702, an image data format decoding processing unit 703, an image adjustment processing unit 704, a CRT specific processing unit 705, a printer specific A processing unit (1) 706, a printer specific processing unit (2) 707, and an image data format creation processing unit 708 are configured.

フィルムスキャンデータ処理部701は、フィルムスキャナ部9から入力された画像データに対し、フィルムスキャナ部9固有の校正操作・ネガ原稿の場合のネガポジ反転、ゴミキズ除去、グレーバランス調整、コントラスト調整、粒状ノイズ除去、鮮鋭化強調等を施し、画像調整処理部704に出力する。また、フィルムスキャンデータ処理部701は、フィルムサイズ、ネガポジ種別、フィルムに光学的あるいは磁気的に記録されたISO(International Organization for Standardization)感度、メーカー名、主要被写体に関わる情報・撮影条件に関する情報(例えばAPS(Advanced Photo System)の記載情報内容)等も併せて画像調整処理部704に出力する。   A film scan data processing unit 701 performs proofing operations specific to the film scanner unit 9 on the image data input from the film scanner unit 9, negative reversal in the case of a negative document, dust flaw removal, gray balance adjustment, contrast adjustment, granular noise Removal, sharpening, and the like are performed, and the result is output to the image adjustment processing unit 704. The film scan data processing unit 701 also includes information on film size, negative / positive type, ISO (International Organization for Standardization) sensitivity recorded on the film optically or magnetically, manufacturer name, information on main subject, and shooting conditions ( For example, the description information content of APS (Advanced Photo System) is also output to the image adjustment processing unit 704.

反射原稿スキャンデータ処理部702は、反射原稿入力装置10から入力された画像データに対し、反射原稿入力装置10固有の校正操作、ネガ原稿の場合のネガポジ反転、ゴミキズ除去、グレーバランス調整、コントラスト調整、ノイズ除去、鮮鋭化強調等を施し、画像調整処理部704に出力する。   The reflection document scan data processing unit 702 performs a calibration operation unique to the reflection document input device 10, negative / positive reversal in the case of a negative document, dust flaw removal, gray balance adjustment, and contrast adjustment for the image data input from the reflection document input device 10. , Noise removal, sharpening enhancement, and the like, and output to the image adjustment processing unit 704.

画像データ書式解読処理部703は、画像転送手段30や通信手段(入力)32から入力された画像データのデータ書式に従って、必要に応じて圧縮符号の復元、色データの表現方法の変換等を行い、画像処理部70内の演算に適したデータ形式に変換し、画像調整処理部704に出力する。   The image data format decoding processing unit 703 performs compression code restoration, color data expression method conversion, and the like as necessary according to the data format of the image data input from the image transfer means 30 or the communication means (input) 32. Then, the data is converted into a data format suitable for calculation in the image processing unit 70 and output to the image adjustment processing unit 704.

画像調整処理部704は、操作部11又は制御部7の指令に基づいて、フィルムスキャナ部9、反射原稿入力装置10、画像転送手段30、通信手段(入力)32から受け取った画像に対して各種画像処理を行い、CRT固有処理部705、プリンタ固有処理部(1)706、プリンタ固有処理部(2)707、画像データ書式作成処理部708、データ蓄積手段71へ処理済みの画像データを出力する。実施形態1の画像調整処理部704で実行される画像処理については、後に図4〜図16を参照して詳細に説明する。   The image adjustment processing unit 704 performs various processes on the images received from the film scanner unit 9, the reflective original input device 10, the image transfer unit 30, and the communication unit (input) 32 based on the command from the operation unit 11 or the control unit 7. Performs image processing, and outputs processed image data to the CRT specific processing unit 705, printer specific processing unit (1) 706, printer specific processing unit (2) 707, image data format creation processing unit 708, and data storage means 71. . Image processing executed by the image adjustment processing unit 704 according to the first embodiment will be described in detail later with reference to FIGS.

CRT固有処理部705は、画像調整処理部704から入力された画像データに対して、必要に応じて画素数変更やカラーマッチング等の処理を施し、制御情報等表示が必要な情報と合成した表示用の画像データをCRT8に出力する。   The CRT specific processing unit 705 performs processing such as changing the number of pixels and color matching on the image data input from the image adjustment processing unit 704 as necessary, and combines the information with information that needs to be displayed, such as control information. Image data is output to the CRT 8.

プリンタ固有処理部(1)706は、画像調整処理部704から入力された画像データに対して、必要に応じてプリンタ固有の校正処理、カラーマッチング、画素数変更等を行い、露光処理部4に出力する。   A printer-specific processing unit (1) 706 performs printer-specific calibration processing, color matching, pixel number change, and the like on the image data input from the image adjustment processing unit 704 as necessary. Output.

画像処理装置1に、大判インクジェットプリンタ等の外部プリンタ34が接続されている場合には、接続されたプリンタ毎にプリンタ固有処理部(2)707が設けられている。このプリンタ固有処理部(2)707は、画像調整処理部704から入力された画像データに対して、適正なプリンタ固有の校正処理、カラーマッチング、画素数変更等を行う。   When an external printer 34 such as a large-format ink jet printer is connected to the image processing apparatus 1, a printer specific processing unit (2) 707 is provided for each connected printer. The printer-specific processing unit (2) 707 performs appropriate printer-specific calibration processing, color matching, pixel number change, and the like on the image data input from the image adjustment processing unit 704.

画像データ書式作成処理部708は、画像調整処理部704から入力された画像データに対して、必要に応じてJPEG(Joint Photographic Experts Group)、TIFF(Tagged Image File Format)、Exif(Exchangeable Image File Format)等に代表される各種の汎用画像フォーマットへの変換を行い、画像搬送部31や通信手段(出力)33に出力する。   The image data format creation processing unit 708 applies JPEG (Joint Photographic Experts Group), TIFF (Tagged Image File Format), and Exif (Exchangeable Image File Format) to the image data input from the image adjustment processing unit 704 as necessary. ) And the like, and the image is converted to various general-purpose image formats and output to the image transport unit 31 and the communication means (output) 33.

なお、フィルムスキャンデータ処理部701、反射原稿スキャンデータ処理部702、画像データ書式解読処理部703、画像調整処理部704、CRT固有処理部705、プリンタ固有処理部(1)706、プリンタ固有処理部(2)707、画像データ書式作成処理部708という区分は、画像処理部70の機能の理解を助けるために設けた区分であり、必ずしも物理的に独立したデバイスとして実現される必要はなく、例えば、単一のCPUにおけるソフトウエア処理の種類の区分として実現されてもよい。また、本実施形態1及び2における画像処理装置1は、上述の内容に限定されるものではなく、デジタルフォトプリンタ、プリンタドライバ、各種の画像処理ソフトのプラグイン等、種々の形態に適用することができる。   A film scan data processing unit 701, a reflection original scan data processing unit 702, an image data format decoding processing unit 703, an image adjustment processing unit 704, a CRT specific processing unit 705, a printer specific processing unit (1) 706, a printer specific processing unit. (2) The category 707 and the image data format creation processing unit 708 are provided to help understanding of the function of the image processing unit 70, and need not be realized as a physically independent device. Alternatively, it may be realized as a type of software processing in a single CPU. The image processing apparatus 1 according to the first and second embodiments is not limited to the above-described contents, and may be applied to various forms such as a digital photo printer, a printer driver, and various image processing software plug-ins. Can do.

次に、本実施形態1における動作について説明する。
まず、図4のフローチャートを参照して、画像調整処理部704において実行される画像処理全体の流れを説明する。
Next, the operation in the first embodiment will be described.
First, the overall flow of image processing executed by the image adjustment processing unit 704 will be described with reference to the flowchart of FIG.

まず、フィルムスキャナ部9、反射原稿入力装置10、画像転送手段30、通信手段(入力)32等を介して、画像処理対象の撮影画像データが取得され(ステップS1)、その取得された撮影画像データから撮影時の配光条件(光源状態)を判別する配光条件判別処理が行われる(ステップS2)。撮影時の配光条件には、順光、逆光、ストロボ(フラッシュ光利用状態)が含まれる。ステップS2の配光条件判別処理については、後に図5を参照して詳細に説明する。   First, photographic image data to be image-processed is acquired via the film scanner unit 9, the reflective original input device 10, the image transfer unit 30, the communication unit (input) 32, and the like (step S1), and the acquired photographic image is acquired. A light distribution condition determining process for determining the light distribution condition (light source state) at the time of photographing from the data is performed (step S2). The light distribution conditions at the time of photographing include forward light, backlight, and strobe (flash light use state). The light distribution condition determination process in step S2 will be described in detail later with reference to FIG.

次いで、ステップS2において判別された配光条件に基づいて、所定の画像領域の抽出条件が決定され(ステップS3)、その決定された抽出条件に従って、撮影画像データから画像領域が抽出される(ステップS4)。ここで、所定の画像領域には、空領域、顔領域(人物が撮影された場合)が含まれる。撮影画像データから空領域を抽出する処理、撮影画像データから顔領域を抽出する処理については、後に図16を参照して詳細に説明する。   Next, an extraction condition for a predetermined image area is determined based on the light distribution condition determined in step S2 (step S3), and an image area is extracted from the captured image data according to the determined extraction condition (step S3). S4). Here, the predetermined image area includes an empty area and a face area (when a person is photographed). The process of extracting a sky area from captured image data and the process of extracting a face area from captured image data will be described in detail later with reference to FIG.

次いで、ステップS4において抽出された画像領域に基づいて、撮影画像データの天地を判定する天地判定処理が行われ(ステップS5)、本画像処理が終了する。ステップS5では、撮影画像データ全体に対する空領域の位置から、当該撮影画像データの天方向(上方向)が判定される。また、撮影画像データから顔領域が更に抽出された場合、空領域と顔領域との位置関係から、天地を確実に判定することができる。   Next, a top / bottom determination process for determining the top / bottom of the captured image data is performed based on the image area extracted in step S4 (step S5), and the main image processing is completed. In step S5, the sky direction (upward direction) of the photographed image data is determined from the position of the sky region with respect to the entire photographed image data. In addition, when a face area is further extracted from the captured image data, the top and bottom can be reliably determined from the positional relationship between the sky area and the face area.

次に、図5のフローチャートを参照して、図4のステップS2に示した配光条件判別処理について説明する。   Next, the light distribution condition determination process shown in step S2 of FIG. 4 will be described with reference to the flowchart of FIG.

まず、撮影画像データが所定の画像領域に分割され、各分割領域が撮影画像データ全体に占める割合を示す占有率を算出する占有率算出処理が行われる(ステップS6)。占有率算出処理については、後に図6及び図12を参照して詳細に説明する。   First, the captured image data is divided into predetermined image areas, and an occupancy ratio calculation process is performed to calculate an occupancy ratio indicating the ratio of each divided area to the entire captured image data (step S6). The occupation rate calculation process will be described in detail later with reference to FIGS.

次いで、ステップS6において算出された占有率と、撮影条件に応じて予め設定された係数に基づいて、配光条件を特定する(光源状態を定量的に表す)指標(指標1〜5)が算出される(ステップS7)。ステップS7における指標算出処理は、後に詳細に説明する。   Next, based on the occupancy calculated in step S6 and a coefficient set in advance according to the imaging condition, an index (index 1 to 5) that specifies the light distribution condition (quantitatively represents the light source state) is calculated. (Step S7). The index calculation process in step S7 will be described in detail later.

次いで、ステップS7において算出された指標に基づいて撮影画像データの配光条件が判別され(ステップS8)、本配光条件判別処理が終了する。配光条件の判別方法は、後に詳細に説明する。   Next, the light distribution condition of the photographed image data is determined based on the index calculated in step S7 (step S8), and the main light distribution condition determination process ends. A method for determining the light distribution condition will be described in detail later.

次に、図6のフローチャートを参照して、図5のステップS6に示した占有率算出処理について詳細に説明する。   Next, the occupation rate calculation process shown in step S6 of FIG. 5 will be described in detail with reference to the flowchart of FIG.

まず、撮影画像データのRGB値がHSV表色系に変換される(ステップS10)。図7は、RGBからHSV表色系に変換することにより色相値、彩度値、明度値を得る変換プログラム(HSV変換プログラム)の一例を、プログラムコード(c言語)により示したものである。図7に示すHSV変換プログラムでは、入力画像データであるデジタル画像データの値を、InR、InG、InBと定義し、算出された色相値をOutHとし、スケールを0〜360と定義し、彩度値をOutS、明度値をOutVとし、単位を0〜255と定義している。   First, the RGB values of the photographed image data are converted into the HSV color system (step S10). FIG. 7 shows an example of a conversion program (HSV conversion program) that obtains a hue value, a saturation value, and a lightness value by converting from RGB to the HSV color system in a program code (c language). In the HSV conversion program shown in FIG. 7, the values of digital image data as input image data are defined as InR, InG, and InB, the calculated hue value is defined as OutH, the scale is defined as 0 to 360, and the saturation The value is OutS, the brightness value is OutV, and the unit is defined as 0 to 255.

次いで、撮影画像データが、所定の明度と色相の組み合わせからなる領域に分割され、分割領域毎に累積画素数を算出することにより2次元ヒストグラムが作成される(ステップS11)。以下、撮影画像データの領域分割について詳細に説明する。   Next, the photographed image data is divided into regions composed of combinations of predetermined brightness and hue, and a two-dimensional histogram is created by calculating the cumulative number of pixels for each divided region (step S11). Hereinafter, the area division of the captured image data will be described in detail.

明度(V)は、明度値が0〜25(v1)、26-50(v2)、51〜84(v3)、85〜169(v4)、170〜199(v5)、200〜224(v6)、225〜255(v7)の7つの領域に分割される。色相(H)は、色相値が0〜39、330〜359の肌色色相領域(H1及びH2)、色相値が40〜160の緑色色相領域(H3)、色相値が161〜250の青色色相領域(H4)、赤色色相領域(H5)の4つの領域に分割される。なお、赤色色相領域(H5)は、配光条件の判別への寄与が少ないとの知見から、以下の計算では用いていない。肌色色相領域は、更に、肌色領域(H1)と、それ以外の領域(H2)に分割される。以下、肌色色相領域(H=0〜39、330〜359)のうち、下記の式(1)を満たす色相'(H)を肌色領域(H1)とし、式(1)を満たさない領域を(H2)とする。
10 < 彩度(S) <175、
色相'(H) = 色相(H) + 60 (0 ≦ 色相(H) < 300のとき)、
色相'(H) = 色相(H) - 300 (300 ≦ 色相(H) < 360のとき)、
輝度Y = InR × 0.30 + InG × 0.59 + InB × 0.11
として、
色相'(H)/輝度(Y) < 3.0 ×(彩度(S)/255)+0.7 (1)
従って、撮影画像データの分割領域の数は4×7=28個となる。なお、式(1)において明度(V)を用いることも可能である。
The lightness value (V) is 0-25 (v1), 26-50 (v2), 51-84 (v3), 85-169 (v4), 170-199 (v5), 200-224 (v6) , 225 to 255 (v7). Hue (H) is a skin hue hue area (H1 and H2) with a hue value of 0 to 39, 330 to 359, a green hue area (H3) with a hue value of 40 to 160, and a blue hue area with a hue value of 161 to 250 It is divided into four areas (H4) and a red hue area (H5). Note that the red hue region (H5) is not used in the following calculation because it is known that the contribution to the determination of the light distribution condition is small. The flesh-color hue area is further divided into a flesh-color area (H1) and other areas (H2). Hereinafter, among the flesh color hue regions (H = 0 to 39, 330 to 359), a hue color '(H) that satisfies the following equation (1) is defined as a flesh color region (H1), and a region that does not satisfy the equation (1) is ( H2).
10 <Saturation (S) <175,
Hue '(H) = Hue (H) + 60 (when 0 ≤ Hue (H) <300),
Hue '(H) = Hue (H)-300 (when 300 ≤ Hue (H) <360),
Luminance Y = InR × 0.30 + InG × 0.59 + InB × 0.11
As
Hue '(H) / Luminance (Y) <3.0 × (Saturation (S) / 255) +0.7 (1)
Therefore, the number of divided areas of the captured image data is 4 × 7 = 28. In addition, it is also possible to use the brightness (V) in the formula (1).

2次元ヒストグラムが作成されると、分割領域毎に算出された累積画素数の全画素数(撮影画像全体)に占める割合を示す第1の占有率が算出され(ステップS12)、本占有率算出処理が終了する。明度領域vi、色相領域Hjの組み合わせからなる分割領域において算出された第1の占有率をRijとすると、各分割領域における第1の占有率は表1のように表される。

Figure 2006039666
When the two-dimensional histogram is created, a first occupancy ratio indicating the ratio of the cumulative number of pixels calculated for each divided region to the total number of pixels (the entire captured image) is calculated (step S12), and the main occupancy ratio calculation is performed. The process ends. Assuming that the first occupancy ratio calculated in the divided area composed of the combination of the lightness area vi and the hue area Hj is Rij, the first occupancy ratio in each divided area is expressed as shown in Table 1.
Figure 2006039666

次に、指標1及び指標2の算出方法について説明する。
表2に、判別分析により得られた、ストロボ撮影としての確度、即ち、ストロボ撮影時の顔領域の明度状態を定量的に示す指標1を算出するために必要な第1の係数を分割領域別に示す。表2に示された各分割領域の係数は、表1に示した各分割領域の第1の占有率Rijに乗算する重み係数である。

Figure 2006039666
Next, a method for calculating the index 1 and the index 2 will be described.
Table 2 shows the first coefficient necessary for calculating the index 1 that quantitatively indicates the accuracy of strobe shooting obtained by discriminant analysis, that is, the lightness state of the face area at the time of strobe shooting. Show. The coefficient of each divided area shown in Table 2 is a weighting coefficient by which the first occupation ratio Rij of each divided area shown in Table 1 is multiplied.
Figure 2006039666

図8に、明度(v)−色相(H)平面を示す。表2によると、図8において高明度の肌色色相領域に分布する領域(r1)から算出される第1の占有率には、正(+)の係数が用いられ、それ以外の色相である青色色相領域(r2)から算出される第1の占有率には、負(-)の係数が用いられる。図10は、肌色領域(H1)における第1の係数と、その他の領域(緑色色相領域(H3))における第1の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表2及び図10によると、高明度(V=170〜224)の領域では、肌色領域(H1)における第1の係数の符号は正(+)であり、その他の領域(例えば、緑色色相領域(H3))における第1の係数の符号は負(-)であり、両者の符号が異なっていることがわかる。   FIG. 8 shows a lightness (v) -hue (H) plane. According to Table 2, a positive (+) coefficient is used for the first occupancy calculated from the region (r1) distributed in the skin color hue region of high brightness in FIG. 8, and the other hue is blue. A negative (−) coefficient is used for the first occupancy calculated from the hue region (r2). FIG. 10 shows a curve (coefficient curve) in which the first coefficient in the skin color area (H1) and the first coefficient in the other areas (green hue area (H3)) continuously change over the entire brightness. It is shown. According to Table 2 and FIG. 10, in the region of high brightness (V = 170 to 224), the sign of the first coefficient in the skin color region (H1) is positive (+), and other regions (for example, the green hue region) The sign of the first coefficient in (H3)) is negative (-), and it can be seen that the signs of the two are different.

明度領域vi、色相領域Hjにおける第1の係数をCijとすると、指標1を算出するためのHk領域の和は、式(2)のように定義される。

Figure 2006039666
従って、H1〜H4領域の和は、下記の式(2-1)〜式(2-4)のように表される。
H1領域の和=R11×(-44.0)+R21×(-16.0)+(中略)...+R71×(-11.3) (2-1)
H2領域の和=R12×0.0+R22×8.6+(中略)... +R72×(-11.1) (2-2)
H3領域の和=R13×0.0+R23×(-6.3)+(中略)...+R73×(-10.0) (2-3)
H4領域の和=R14×0.0+R24×(-1.8)+(中略)...+R74×(-14.6) (2-4) When the first coefficient in the lightness region vi and the hue region Hj is Cij, the sum of the Hk regions for calculating the index 1 is defined as in Expression (2).
Figure 2006039666
Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (2-1) to (2-4).
H1 area sum = R11 x (-44.0) + R21 x (-16.0) + (omitted) ... + R71 x (-11.3) (2-1)
Sum of H2 area = R12 x 0.0 + R22 x 8.6 + (omitted) ... + R72 x (-11.1) (2-2)
Sum of H3 area = R13 x 0.0 + R23 x (-6.3) + (omitted) ... + R73 x (-10.0) (2-3)
Sum of H4 area = R14 x 0.0 + R24 x (-1.8) + (omitted) ... + R74 x (-14.6) (2-4)

指標1は、式(2-1)〜(2-4)で示されたH1〜H4領域の和を用いて、式(3)のように定義される。
指標1=H1領域の和+H2領域の和+H3領域の和+H4領域の和+4.424 (3)
The index 1 is defined as Expression (3) using the sum of the H1 to H4 regions shown in Expressions (2-1) to (2-4).
Index 1 = sum of H1 area + sum of H2 area + sum of H3 area + sum of H4 area + 4.424 (3)

表3に、判別分析により得られた、逆光撮影としての確度、即ち、逆光撮影時の顔領域の明度状態を定量的に示す指標2を算出するために必要な第2の係数を分割領域別に示す。表3に示された各分割領域の係数は、表1に示した各分割領域の第1の占有率Rijに乗算する重み係数である。

Figure 2006039666
Table 3 shows, for each divided region, the second coefficient necessary for calculating the index 2 that quantitatively indicates the accuracy of backlight photographing obtained by discriminant analysis, that is, the brightness state of the face region at the time of backlight photographing. Show. The coefficient of each divided area shown in Table 3 is a weighting coefficient that is multiplied by the first occupation ratio Rij of each divided area shown in Table 1.
Figure 2006039666

図9に、明度(v)−色相(H)平面を示す。表3によると、図9において肌色色相領域の中間明度に分布する領域(r4)から算出される占有率には負(-)の係数が用いられ、肌色色相領域の低明度(シャドー)領域(r3)から算出される占有率には正(+)の係数が用いられる。図11は、肌色領域(H1)における第2の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表3及び図11によると、肌色色相領域の、明度値が85〜169(v4)の中間明度領域の第2の係数の符号は負(-)であり、明度値が26〜84(v2,v3)の低明度(シャドー)領域の第2の係数の符号は正(+)であり、両領域での係数の符号が異なっていることがわかる。   FIG. 9 shows a lightness (v) -hue (H) plane. According to Table 3, a negative (-) coefficient is used for the occupancy calculated from the region (r4) distributed in the intermediate lightness of the flesh color hue region in FIG. 9, and the low lightness (shadow) region ( A positive (+) coefficient is used for the occupation ratio calculated from r3). FIG. 11 shows the second coefficient in the skin color region (H1) as a curve (coefficient curve) that continuously changes over the entire brightness. According to Table 3 and FIG. 11, the sign of the second coefficient of the intermediate lightness region of the flesh color hue region having the lightness value of 85 to 169 (v4) is negative (−), and the lightness value is 26 to 84 (v2, It can be seen that the sign of the second coefficient in the low brightness (shadow) region of v3) is positive (+), and the sign of the coefficient in both regions is different.

明度領域vi、色相領域Hjにおける第2の係数をDijとすると、指標2を算出するためのHk領域の和は、式(4)のように定義される。

Figure 2006039666
従って、H1〜H4領域の和は、下記の式(4-1)〜式(4-4)のように表される。
H1領域の和=R11×(-27.0)+R21×4.5+(中略)...+R71×(-24.0) (4-1)
H2領域の和=R12×0.0+R22×4.7+(中略)... +R72×(-8.5) (4-2)
H3領域の和=R13×0.0+R23×0.0+(中略)...+R73×0.0 (4-3)
H4領域の和=R14×0.0+R24×(-5.1)+(中略)...+R74×7.2 (4-4) When the second coefficient in the lightness area vi and the hue area Hj is Dij, the sum of the Hk areas for calculating the index 2 is defined as in Expression (4).
Figure 2006039666
Therefore, the sum of the H1 to H4 regions is expressed by the following formulas (4-1) to (4-4).
H1 area sum = R11 x (-27.0) + R21 x 4.5 + (omitted) ... + R71 x (-24.0) (4-1)
Sum of H2 area = R12 x 0.0 + R22 x 4.7 + (omitted) ... + R72 x (-8.5) (4-2)
Sum of H3 area = R13 x 0.0 + R23 x 0.0 + (omitted) ... + R73 x 0.0 (4-3)
H4 area sum = R14 x 0.0 + R24 x (-5.1) + (omitted) ... + R74 x 7.2 (4-4)

指標2は、式(4-1)〜(4-4)で示されたH1〜H4領域の和を用いて、式(5)のように定義される。
指標2=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.554 (5)
指標1及び指標2は、撮影画像データの明度と色相の分布量に基づいて算出されるため、撮影画像データがカラー画像である場合の配光条件の判別に有効である。
The index 2 is defined as in Expression (5) using the sum of the H1 to H4 regions shown in Expressions (4-1) to (4-4).
Index 2 = sum of H1 area + sum of H2 area + sum of H3 area + sum of H4 area + 1.554 (5)
Since the index 1 and the index 2 are calculated based on the brightness of the captured image data and the distribution amount of the hue, it is effective for determining the light distribution condition when the captured image data is a color image.

次に、図12のフローチャートを参照して、指標3を算出するための占有率算出処理(図5のステップS6)について詳細に説明する。   Next, the occupation rate calculation process (step S6 in FIG. 5) for calculating the index 3 will be described in detail with reference to the flowchart in FIG.

まず、撮影画像データのRGB値がHSV表色系に変換される(ステップS20)。次いで、撮影画像データが、撮影画像画面の外縁からの距離と明度の組み合わせからなる領域に分割され、分割領域毎に累積画素数を算出することにより2次元ヒストグラムが作成される(ステップS21)。以下、撮影画像データの領域分割について詳細に説明する。   First, the RGB values of the photographed image data are converted into the HSV color system (step S20). Next, the photographed image data is divided into regions each composed of a combination of the distance from the outer edge of the photographed image screen and the brightness, and a two-dimensional histogram is created by calculating the cumulative number of pixels for each divided region (step S21). Hereinafter, the area division of the captured image data will be described in detail.

図13(a)〜(d)に、撮影画像データの画面の外縁からの距離に応じて分割された4つの領域n1〜n4を示す。図13(a)に示す領域n1が外枠であり、図13(b)に示す領域n2が、外枠の内側の領域であり、図13(c)に示す領域n3が、領域n2の更に内側の領域であり、図13(d)に示す領域n4が、撮影画像画面の中心部の領域である。また、明度は、上述のようにv1〜v7の7つの領域に分割するものとする。従って、撮影画像データを、撮影画像画面の外縁からの距離と明度の組み合わせからなる領域に分割した場合の分割領域の数は4×7=28個となる。   FIGS. 13A to 13D show four regions n1 to n4 divided according to the distance from the outer edge of the screen of the captured image data. A region n1 shown in FIG. 13A is an outer frame, a region n2 shown in FIG. 13B is a region inside the outer frame, and a region n3 shown in FIG. A region n4 shown in FIG. 13D is an inner region and is a central region of the captured image screen. Further, the lightness is divided into seven regions v1 to v7 as described above. Therefore, when the captured image data is divided into regions composed of combinations of the distance from the outer edge of the captured image screen and the brightness, the number of divided regions is 4 × 7 = 28.

2次元ヒストグラムが作成されると、分割領域毎に算出された累積画素数の全画素数(撮影画像全体)に占める割合を示す第2の占有率が算出され(ステップS22)、本占有率算出処理が終了する。明度領域vi、画面領域njの組み合わせからなる分割領域において算出された第2の占有率をQijとすると、各分割領域における第2の占有率は表4のように表される。

Figure 2006039666
When the two-dimensional histogram is created, a second occupancy ratio indicating the ratio of the cumulative number of pixels calculated for each divided region to the total number of pixels (the entire captured image) is calculated (step S22), and the main occupancy ratio calculation is performed. The process ends. If the second occupancy calculated in the divided area composed of the combination of the brightness area vi and the screen area nj is Qij, the second occupancy in each divided area is expressed as shown in Table 4.
Figure 2006039666

次に、指標3の算出方法について説明する。
表5に、指標3を算出するために必要な第3の係数を分割領域別に示す。表5に示された各分割領域の係数は、表4に示した各分割領域の第2の占有率Qijに乗算する重み係数であり、判別分析により得られる。

Figure 2006039666
図14は、画面領域n1〜n4における第3の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。 Next, a method for calculating the index 3 will be described.
Table 5 shows the third coefficient necessary for calculating the index 3 for each divided region. The coefficient of each divided area shown in Table 5 is a weighting coefficient by which the second occupancy Qij of each divided area shown in Table 4 is multiplied, and is obtained by discriminant analysis.
Figure 2006039666
FIG. 14 shows the third coefficient in the screen areas n1 to n4 as a curve (coefficient curve) that continuously changes over the entire brightness.

明度領域vi、画面領域njにおける第3の係数をEijとすると、指標3を算出するためのnk領域(画面領域nk)の和は、式(6)のように定義される。

Figure 2006039666
従って、n1〜n4領域の和は、下記の式(6-1)〜式(6-4)のように表される。
n1領域の和=Q11×40.1+Q21×37.0+(中略)...+Q71×22.0 (6-1)
n2領域の和=Q12×(-14.8)+Q22×(-10.5)+(中略)...+Q72×0.0 (6-2)
n3領域の和=Q13×24.6+Q23×12.1+(中略)...+Q73×10.1 (6-3)
n4領域の和=Q14×1.5+Q24×(-32.9)+(中略)...+Q74×(-52.2) (6-4) If the third coefficient in the brightness area vi and the screen area nj is Eij, the sum of the nk area (screen area nk) for calculating the index 3 is defined as in Expression (6).
Figure 2006039666
Accordingly, the sum of the n1 to n4 regions is expressed as the following formulas (6-1) to (6-4).
n1 area sum = Q11 x 40.1 + Q21 x 37.0 + (omitted) ... + Q71 x 22.0 (6-1)
Sum of n2 area = Q12 x (-14.8) + Q22 x (-10.5) + (omitted) ... + Q72 x 0.0 (6-2)
n3 area sum = Q13 x 24.6 + Q23 x 12.1 + (omitted) ... + Q73 x 10.1 (6-3)
n4 area sum = Q14 x 1.5 + Q24 x (-32.9) + (omitted) ... + Q74 x (-52.2) (6-4)

指標3は、式(6-1)〜(6-4)で示されたN1〜H4領域の和を用いて、式(7)のように定義される。
指標3=n1領域の和+n2領域の和+n3領域の和+n4領域の和−12.6201 (7)
指標3は、撮影画像データの明度の分布位置による構図的な特徴(撮影画像データの画面の外縁からの距離)に基づいて算出されるため、カラー画像だけでなくモノクロ画像の配光条件を判別するのにも有効である。
The index 3 is defined as in Expression (7) using the sum of the N1 to H4 regions shown in Expressions (6-1) to (6-4).
Index 3 = sum of n1 regions + sum of n2 regions + sum of n3 regions + sum of n4 regions−12.6201 (7)
The index 3 is calculated on the basis of compositional characteristics (distance from the outer edge of the screen of the photographed image data) based on the lightness distribution position of the photographed image data. It is also effective to do.

指標4は、指標1及び指標3を用いて式(8)のように定義され、指標5は、指標1〜3を用いて式(9)のように定義される。
指標4=0.565×指標1+0.565×指標3+0.457 (8)
指標5=(-0.121)×指標1+0.91×指標2+0.113×指標3−0.072 (9)
ここで、式(8)及び式(9)において各指標に乗算される重み係数は、撮影条件に応じて予め設定されている。
The index 4 is defined as Expression (8) using the indices 1 and 3, and the index 5 is defined as Expression (9) using the indices 1 to 3.
Index 4 = 0.565 x Index 1 + 0.565 x Index 3 + 0.457 (8)
Indicator 5 = (-0.121) x Indicator 1 + 0.91 x Indicator 2 + 0.113 x Indicator 3-0.072 (9)
Here, the weighting coefficient by which each index is multiplied in Expression (8) and Expression (9) is set in advance according to the shooting conditions.

〈配光条件の判別方法〉
次に、配光条件の判別方法について説明する。
図15は、順光、逆光、ストロボの各配光条件で60枚ずつ撮影し、合計180枚のデジタル画像データについて、指標4、5を算出し、各配光条件での指標4、5の値をプロットしたものである。図15によれば、指標4の値が0.5より大きい場合、ストロボシーンが多く、指標4の値が0.5以下で、指標5の値が−0.5より大きい場合、逆光シーンが多いことがわかる。表6に、指標4、5の値による配光条件の判別内容を示す。

Figure 2006039666
このように指標4、5の値により配光条件を定量的に判別することができる。 <Determination method of light distribution conditions>
Next, a method for determining light distribution conditions will be described.
In FIG. 15, 60 images were taken under each light distribution condition of forward light, backlight, and strobe, and indexes 4 and 5 were calculated for a total of 180 digital image data, and the indexes 4 and 5 under each light distribution condition were calculated. The values are plotted. According to FIG. 15, when the value of the index 4 is larger than 0.5, there are many strobe scenes, and when the value of the index 4 is 0.5 or less and the value of the index 5 is larger than −0.5, the backlight scene is I understand that there are many. Table 6 shows the determination contents of the light distribution conditions based on the values of the indexes 4 and 5.
Figure 2006039666
Thus, the light distribution condition can be determined quantitatively based on the values of the indices 4 and 5.

次に、図16のフローチャートを参照して、図4のステップS3及びS4に示した画像領域抽出処理について説明する。   Next, the image region extraction process shown in steps S3 and S4 of FIG. 4 will be described with reference to the flowchart of FIG.

まず、図16(a)のフローチャートを参照して、画像領域として領域1(空)領域を抽出する処理について説明する。   First, the process of extracting the region 1 (empty) region as an image region will be described with reference to the flowchart in FIG.

まず、配光条件判別処理(図5参照)において判別された配光条件から配光状態が判定される(ステップS30)。配光状態が逆光である場合(ステップS30;逆光)、逆光に対応する領域1(空)領域の抽出条件が決定される(ステップS31)。次いで、ステップS31で決定された抽出条件に従って、領域1(空)として、撮影画像データから白色の背景領域が抽出され(ステップS32)、本領域1(空)抽出処理が終了する。逆光の場合、撮影画像データ中では、空の色が実際の空の色よりも白っぽく薄い水色に偏ることが多いため、略白乃至薄水色の平坦乃至なだらかな勾配を有する領域を抽出するような抽出条件にすることで、該当する領域を高精度に抽出することができる。   First, the light distribution state is determined from the light distribution condition determined in the light distribution condition determination process (see FIG. 5) (step S30). When the light distribution state is backlight (step S30; backlight), the extraction condition of the region 1 (sky) region corresponding to the backlight is determined (step S31). Next, according to the extraction condition determined in step S31, a white background region is extracted from the captured image data as region 1 (sky) (step S32), and the region 1 (sky) extraction process ends. In the case of backlight, the sky color tends to be whitish and lighter than the actual sky color in the captured image data, so that an area having a flat or gentle gradient of approximately white to light aqua color is extracted. By using the extraction condition, the corresponding region can be extracted with high accuracy.

配光状態が順光である場合(ステップS30;順光)、順光に対応する領域1(空)領域の抽出条件(空色(水色)領域の抽出)が決定される(ステップS33)。次いで、ステップS33で決定された抽出条件に従って、領域1(空)として、撮影画像データから空色(水色)の背景領域が抽出され(ステップS34)、本領域1(空)抽出処理が終了する。   When the light distribution state is the follow light (step S30; follow light), the extraction condition of the region 1 (sky) region (extraction of the sky blue (light blue) region) corresponding to the follow light is determined (step S33). Next, in accordance with the extraction condition determined in step S33, a sky blue (light blue) background region is extracted from the captured image data as region 1 (sky) (step S34), and the region 1 (sky) extraction process ends.

配光状態がストロボである場合(ステップS30;ストロボ)、ストロボに対応する領域1(空)の抽出条件が決定される(ステップS35)。次いで、ステップS35で決定された抽出条件に従って、領域1(空)として、撮影画像データから黒色の背景領域が抽出され(ステップS36)、本領域1(空)抽出処理が終了する。ストロボの場合、周囲が暗い場合に撮影されることが多いため、明度の低い(暗い)空色相当の色相領域を抽出するような抽出条件にすればよい。但し、夜間を想定した極低い明度の領域を抽出する場合には、色相の値が計算上不安定になるため、色相の指定を抽出条件から除外する方が好ましい。   When the light distribution state is strobe (step S30; strobe), the extraction condition for the region 1 (sky) corresponding to the strobe is determined (step S35). Next, according to the extraction condition determined in step S35, a black background region is extracted from the captured image data as region 1 (sky) (step S36), and the region 1 (sky) extraction process ends. In the case of a strobe, since the image is often photographed when the surroundings are dark, an extraction condition may be set such that a hue region corresponding to a low-lightness (dark) sky blue is extracted. However, when extracting an extremely low brightness area assuming nighttime, it is preferable to exclude the designation of the hue from the extraction conditions because the hue value becomes unstable in calculation.

次に、図16(b)のフローチャートを参照して、画像領域として領域2(顔)領域を抽出する処理について説明する。   Next, processing for extracting the region 2 (face) region as the image region will be described with reference to the flowchart of FIG.

まず、配光条件判別処理(図5参照)において判別された配光条件から配光状態が判定される(ステップS40)。配光状態が逆光である場合(ステップS40;逆光)、逆光に対応する顔候補領域の抽出条件(低明度の肌色領域の抽出)が決定され(ステップS41)、その決定された抽出条件に従って、撮影画像データから低明度の肌色領域が抽出される(ステップS42)。   First, the light distribution state is determined from the light distribution condition determined in the light distribution condition determination process (see FIG. 5) (step S40). When the light distribution state is backlight (step S40; backlight), a face candidate region extraction condition (extraction of low brightness skin color region) corresponding to the backlight is determined (step S41), and according to the determined extraction condition, A low brightness skin color region is extracted from the photographed image data (step S42).

配光状態が順光である場合(ステップS40;順光)、順光に対応する顔候補領域の抽出条件(所定の肌色領域の抽出)が決定され(ステップS43)、その決定された抽出条件に従って、撮影画像データから所定の肌色領域が抽出される(ステップS44)。   When the light distribution state is the follow light (step S40; follow light), a face candidate region extraction condition (extraction of a predetermined skin color region) corresponding to the follow light is determined (step S43), and the determined extraction condition is determined. Accordingly, a predetermined skin color region is extracted from the photographed image data (step S44).

配光状態がストロボである場合(ステップS40;ストロボ)、ストロボに対応する顔候補領域の抽出条件(略白から高明度の肌色領域の抽出)が決定され(ステップS45)、その決定された抽出条件に従って、撮影画像データから、略白から高明度の肌色領域が抽出される(ステップS46)。   When the light distribution state is strobe (step S40; strobe), the extraction condition of the face candidate region corresponding to the strobe (extraction of the skin color region of high brightness from substantially white) is determined (step S45), and the determined extraction In accordance with the conditions, a skin color region having high brightness from substantially white is extracted from the photographed image data (step S46).

ステップS42、S44及びS46で適用される顔候補領域の抽出処理として、単純領域拡張法を利用することができる。単純領域拡張法とは、画素間のデータ差が閾値以下の互いに隣接する画素を同一画像領域に属するものとして当該領域を拡張していくことにより画像領域の抽出を行う画像処理方法である。即ち、指定された特定条件に合致する初期画素から出発し、当該初期画素に対して隣接する画素(4連結、8連結の何れでも可)のデータ差が閾値以下である場合に当該隣接画素と初期画素とを同一画像領域に属するものとし、更に、当該同一画素に属するとした画素に対し隣接する画素についても同様の判定を行っていき、初期画素から出発して同一領域を除々に拡張させることによって画像領域の抽出を行う画像処理方法である。本実施形態では、更に、画像中のエッジ成分を抽出し、画像エッジに達した場合に単純領域拡張を終了することで、顔候補領域を確定する処理を用いることが好ましい。   As the face candidate region extraction processing applied in steps S42, S44, and S46, the simple region expansion method can be used. The simple region expansion method is an image processing method for extracting an image region by expanding adjacent regions with pixels adjacent to each other whose data difference between pixels is equal to or less than a threshold value belonging to the same image region. That is, starting from an initial pixel that matches a specified specific condition, if the data difference between adjacent pixels (either 4-connected or 8-connected) is equal to or less than a threshold value, It is assumed that the initial pixel belongs to the same image area, and the same determination is performed for pixels adjacent to the pixel that belongs to the same pixel, and the same area is gradually expanded starting from the initial pixel. This is an image processing method for extracting an image region. In the present embodiment, it is preferable to further use a process for extracting a face component region by extracting an edge component in an image and ending simple region expansion when the image edge is reached.

初期画素の特定条件としては、人物の肌を表す画素を特定する条件を採用すればよい。人物の肌を表す画素を特定する条件としては、予め決められたRGB値に基づいて設定されるものであればよく、人物の肌色は略同一の光源下では一定範囲内の色相値を有するため、肌色の初期画素は、色相を規定した条件に基づいて選択するのが好ましい。例えば、HSV表色系の色相値(Hue)で0〜30及び330〜359の範囲の画素を選択するのが好ましい。   As the initial pixel specifying condition, a condition for specifying a pixel representing a person's skin may be employed. A condition for specifying a pixel representing a person's skin may be any condition as long as it is set based on a predetermined RGB value, and the person's skin color has a hue value within a certain range under substantially the same light source. The flesh-color initial pixel is preferably selected based on a condition that defines the hue. For example, it is preferable to select pixels in the range of 0 to 30 and 330 to 359 with the hue value (Hue) of the HSV color system.

また、彩度(Satulation)を合わせて規定することも好ましい。色相、彩度を規定した条件は、撮影時の光源種により変更されるのが好ましく、更に、撮影時の光源種は公知の方法により自動的に判別されるのが好ましい。   It is also preferable to define the saturation (Satulation) together. The conditions defining the hue and saturation are preferably changed according to the light source type at the time of photographing, and the light source type at the time of photographing is preferably automatically determined by a known method.

更に、初期画素の特定条件に、明るさに関する配光条件に応じた条件を加えればよい。Th1、Th2、Th3、Th4、Th5、Th6を、抽出対象の領域の明るさを制限するための閾値とし、領域内における明るさを表すパラメータ(例えば、輝度成分の平均値)をVaveとすると、予め、個々の配光状態にある複数の顔画像のRGB値に基づいて、下記の関係式を満たすように設定されるものであればよい。
逆光 :Th1<Vave<Th2
順光 :Th3<Vave<Th4
ストロボ:Th5<Vave<Th6
ここで、Th1〜6は、Th1< Th2 ≦ Th3 < Th4 ≦ Th5 < Th6 を満たしており、例えば、
逆光 :20<Vave<65
順光 :65<Vave<200
ストロボ:200<Vave<255
の条件を設定すればよい。また、処理能力に余裕があれば、下記式のような条件(範囲が重なっている場合)を設けると、顔候補領域の抽出精度を向上させることができる。
Th1<Th3<Th5
Th2<Th4<Th6
Th1<Th2<Th3
Th5<Th4<Th6
Furthermore, a condition corresponding to the light distribution condition related to brightness may be added to the initial pixel specifying condition. When Th1, Th2, Th3, Th4, Th5, Th6 are thresholds for limiting the brightness of the extraction target area, and the parameter representing the brightness in the area (for example, the average value of the luminance component) is Vave, It may be set in advance so as to satisfy the following relational expression based on the RGB values of a plurality of face images in individual light distribution states.
Backlight: Th1 <Vave <Th2
Forward light: Th3 <Vave <Th4
Strobe: Th5 <Vave <Th6
Here, Th1 to 6 satisfy Th1 <Th2 ≦ Th3 <Th4 ≦ Th5 <Th6, for example,
Backlight: 20 <Vave <65
Forward light: 65 <Vave <200
Strobe: 200 <Vave <255
It is sufficient to set the conditions. In addition, if there is a margin in processing capability, it is possible to improve the extraction accuracy of the face candidate region by providing a condition such as the following formula (when the ranges overlap).
Th1 <Th3 <Th5
Th2 <Th4 <Th6
Th1 <Th2 <Th3
Th5 <Th4 <Th6

ステップS42、S44、S46の何れか一つにおいて顔候補領域が抽出されると、その抽出された顔候補領域から顔領域を抽出するために、当該顔候補領域に対して顔判定処理が行われる(ステップS47)。そして、顔判定処理の判定結果に基づいて顔候補領域から顔領域が抽出され(ステップS48)、本領域2(顔)抽出処理が終了する。   When a face candidate area is extracted in any one of steps S42, S44, and S46, a face determination process is performed on the face candidate area in order to extract a face area from the extracted face candidate area. (Step S47). Then, a face area is extracted from the face candidate area based on the determination result of the face determination process (step S48), and the main area 2 (face) extraction process ends.

ステップS47の顔判定処理は、パターンマッチングやニューラルネットワークを用いた公知の判定方法を適用することが可能である。例えば、抽出された顔候補領域から目画素、口画素等の特徴部位を抽出し、顔候補領域に対する特徴部位の面積率、当該顔候補領域の平均色相値、平均彩度値等を入力信号、顔らしさを表すパラメータを出力信号としたニューラルネットワークを用いて、当該顔候補領域が顔であるか否かを判定することができる。   For the face determination process in step S47, a known determination method using pattern matching or a neural network can be applied. For example, a feature part such as an eye pixel and a mouth pixel is extracted from the extracted face candidate area, and an area ratio of the feature part with respect to the face candidate area, an average hue value of the face candidate area, an average saturation value, and the like are input signals, It is possible to determine whether or not the face candidate region is a face by using a neural network whose output signal is a parameter representing the likelihood of a face.

以上のように、本実施形態1の画像処理装置1によれば、撮影画像データから、配光条件に応じて決定された画像領域を抽出して、抽出された画像領域に基づいて天地判定を行うことにより、どのような撮影環境であっても天地判定の判定精度を向上させることができる。   As described above, according to the image processing apparatus 1 of the first embodiment, the image area determined according to the light distribution condition is extracted from the captured image data, and the top / bottom determination is performed based on the extracted image area. By doing so, it is possible to improve the determination accuracy of the top-and-bottom determination in any shooting environment.

特に、空のようなテクスチャの少ない背景領域に基づいて天地判定を行うと、判定精度を更に向上させることができる。また、撮影画像データに人物が含まれている場合、背景領域だけでなく人物の顔領域に基づいて天地判定を行うと、背景領域と顔領域との位置関係を考慮した天地判定を行うことができるため、判定精度を一層高めることができる。   In particular, if the top / bottom determination is performed based on a background region with a small texture such as the sky, the determination accuracy can be further improved. In addition, when the photographed image data includes a person, if the top / bottom determination is performed based on the person's face area as well as the background area, the top / bottom determination may be performed in consideration of the positional relationship between the background area and the face area. Therefore, the determination accuracy can be further increased.

[実施形態2]
次に、図17〜図22を参照して、本発明の実施形態2について説明する。
実施形態2の画像処理装置の外観構成及び内部構成は、実施形態1において図1〜3に示した構成と同一ゆえ、以下では、実施形態1と同一の符号を用い、構成説明を省略する。
[Embodiment 2]
Next, Embodiment 2 of the present invention will be described with reference to FIGS.
Since the external configuration and internal configuration of the image processing apparatus according to the second embodiment are the same as those illustrated in FIGS. 1 to 3 in the first embodiment, the same reference numerals as those in the first embodiment are used, and the description of the configuration is omitted.

次に、本実施形態2の画像処理装置1における動作について説明する。
まず、図17のフローチャートを参照して、実施形態2の画像調整処理部704において実行される画像処理全体の流れについて説明する。
Next, the operation of the image processing apparatus 1 according to the second embodiment will be described.
First, the flow of the entire image processing executed in the image adjustment processing unit 704 of the second embodiment will be described with reference to the flowchart of FIG.

まず、フィルムスキャナ部9、反射原稿入力装置10、画像転送手段30、通信手段(入力)32等を介して、画像処理対象の撮影画像データが取得され(ステップS50)、その取得された撮影画像データから撮影時の配光条件(光源状態)を判別する配光条件判別処理が行われる(ステップS51)。ステップS51の配光条件判別処理は、実施形態1において図5に示した処理と同一である。   First, photographic image data to be image processed is acquired via the film scanner unit 9, the reflective original input device 10, the image transfer means 30, the communication means (input) 32, and the like (step S50), and the acquired photographic image is acquired. A light distribution condition determination process for determining the light distribution condition (light source state) at the time of photographing from the data is performed (step S51). The light distribution condition determination processing in step S51 is the same as the processing shown in FIG.

次いで、ステップS51において判別された配光条件に基づいて、所定の画像領域の抽出条件が決定され(ステップS52)、その決定された抽出条件に従って、撮影画像データから画像領域が抽出される(ステップS53)。ステップS52及びS53の処理は、実施形態1において図16に示した処理と同一である。   Next, an extraction condition for a predetermined image area is determined based on the light distribution condition determined in step S51 (step S52), and an image area is extracted from the captured image data according to the determined extraction condition (step S52). S53). The processing in steps S52 and S53 is the same as the processing shown in FIG. 16 in the first embodiment.

次いで、ステップS53において抽出された画像領域から所定の特徴量を算出する特徴量算出処理が行われる(ステップS54)。ここで、所定の特徴量とは、抽出された画像領域の重心、面積率、色値の勾配等のデータである。ステップS54の特徴量算出処理については、後に図18を参照して詳細に説明する。   Next, a feature amount calculation process for calculating a predetermined feature amount from the image region extracted in step S53 is performed (step S54). Here, the predetermined feature amount is data such as the center of gravity, the area ratio, and the gradient of the color value of the extracted image region. The feature amount calculation process in step S54 will be described in detail later with reference to FIG.

次いで、ステップS54において算出された特徴量と、ステップS51において判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて撮影画像データの天地判定が行われ(ステップS55)、本画像処理が終了する。ここで、配光条件に基づいて算出された特徴量とは、順光度(順光の程度)、逆光度(逆光の程度)、ストロボ度(ストロボの程度)であり、指標4、5の値に基づいて算出される。ステップS55のニューラルネットワークを用いた天地判定処理については、後に図21及び図22を参照して詳細に説明する。   Next, using the feature value calculated in step S54 and the feature value calculated based on the light distribution condition determined in step S51 as an input signal, the top and bottom determination of the captured image data is performed using a neural network (step S51). (S55) The main image processing ends. Here, the feature quantities calculated based on the light distribution conditions are forward light intensity (degree of forward light), reverse light intensity (degree of backlight), and strobe degree (degree of strobe). Is calculated based on The top / bottom determination process using the neural network in step S55 will be described in detail later with reference to FIGS.

次に、図18のフローチャートを参照して、図17のステップS54に示した特徴量算出処理について詳細に説明する。   Next, the feature quantity calculation process shown in step S54 of FIG. 17 will be described in detail with reference to the flowchart of FIG.

図16(a)の領域1(空)抽出処理により領域1(空)が抽出されると、領域1の特徴量1として、領域1の重心が算出され(ステップS60)、特徴量2として、領域1の面積率が算出され(ステップS61)、特徴量3として、領域1の色値の勾配(グラデーションの方向)が算出される(ステップS62)。領域1の面積率とは、領域1が、撮影画像データ全体を構成する画素数に対してどの程度の比率を占めるかを示すパラメータであり、(領域1の画素数)/(撮影画像データ全体の画素数)として求められる。   When region 1 (sky) is extracted by region 1 (sky) extraction processing in FIG. 16A, the center of gravity of region 1 is calculated as feature amount 1 of region 1 (step S60), and feature amount 2 is The area ratio of the region 1 is calculated (step S61), and the gradient (gradation direction) of the color value of the region 1 is calculated as the feature amount 3 (step S62). The area ratio of the region 1 is a parameter indicating how much the region 1 occupies with respect to the number of pixels constituting the entire captured image data, and is expressed as (number of pixels in the region 1) / (total captured image data). Number of pixels).

また、領域1のその他の特徴量nとして、明度・色相・彩度の統計値、明度・色相・彩度の勾配、領域1が画像の4辺を占める割合等も算出される(ステップS63)。   Further, as other feature quantities n of the region 1, the lightness / hue / saturation statistical values, the lightness / hue / saturation gradients, the ratio of the region 1 to the four sides of the image, and the like are also calculated (step S63). .

また、図16(b)の領域2(顔)抽出処理により領域2(顔)が抽出されると、領域2の特徴量1として、領域2の重心が算出され(ステップS70)、特徴量2として、領域2の面積率が算出され(ステップS71)、特徴量3として、領域2の個数(即ち、顔の個数)が算出される(ステップS72)。また、領域2のその他の特徴量nも算出される(ステップS73)。   When region 2 (face) is extracted by region 2 (face) extraction processing in FIG. 16B, the center of gravity of region 2 is calculated as feature amount 1 of region 2 (step S70). The area ratio of the region 2 is calculated (step S71), and the number of regions 2 (that is, the number of faces) is calculated as the feature amount 3 (step S72). Further, the other feature amount n of the region 2 is also calculated (step S73).

〈ニューラルネットワーク〉
次に、図17の天地判定処理(ステップS55)において使用されるニューラルネットワークについて簡単に説明する。このニューラルネットワークは、図19に示すように、入力層、中間層、及び出力層を有する階層型のニューラルネットワーク(以下、単にニューラルネットワークという。)である。ニューラルネットワークは、デジタルニューラルネットワークチップを利用することが望ましいが、汎用のDSP(Digital Signal Processor)と専用のエミュレートプログラムを用いても実現することができるし、通常のCPUとエミュレートプログラムを用いても構わない。
<neural network>
Next, the neural network used in the top / bottom determination process (step S55) in FIG. 17 will be briefly described. As shown in FIG. 19, this neural network is a hierarchical neural network having an input layer, an intermediate layer, and an output layer (hereinafter simply referred to as a neural network). The neural network preferably uses a digital neural network chip, but can also be realized by using a general-purpose DSP (Digital Signal Processor) and a dedicated emulation program, or using a normal CPU and an emulation program. It doesn't matter.

ニューラルネットワークの各層は、ニューロンと呼ばれる構成単位からなっている。入力層を除けば、任意のニューロンは図20に示すようにシナプスと呼ばれる入力を多数受け取り、各々の入力値xiに対して結合強度と呼ばれる所定の重みwiを掛けてその総和を求め、それを所定の出力関数fで評価した結果を出力yとして与える機能素子として機能する。出力関数fは、式(10)のように表される。

Figure 2006039666
ここで、f(x)は一般に式(11)に示すような非線形のシグモイド関数が用いられるが、必ずしもこれに限定されるわけではない。
Figure 2006039666
Each layer of the neural network is composed of structural units called neurons. Except for the input layer, an arbitrary neuron receives a large number of inputs called synapses as shown in FIG. 20, and multiplies each input value x i by a predetermined weight w i called bond strength to obtain a sum, It functions as a functional element that gives the output y as a result of evaluating it with a predetermined output function f. The output function f is expressed as in Expression (10).
Figure 2006039666
Here, f (x) is generally a non-linear sigmoid function as shown in Equation (11), but is not necessarily limited thereto.
Figure 2006039666

ここで、各ニューロンの入力の重みwiはニューラルネットワークの入力・出力の関係、言い替えればニューラルネットワークの動作を決定する重要な情報であり、ニューラルネットワークに対して学習作業を行うことによって決定する。なお、図19では中間層は1層のみ記してあるが、これは1以上の任意の階層の構成とすることができる。階層型ネットワークでは、中間層は1層あれば、合成可能な任意の関数を実現できることが知られているが、中間層を多くした方が学習効率や、ニューロンの個数の点から有利であることが知られている。 Here, the input weight w i of each neuron is important information for determining the relationship between the input and output of the neural network, in other words, the operation of the neural network, and is determined by performing a learning operation on the neural network. In FIG. 19, only one intermediate layer is shown, but this may have a configuration of one or more arbitrary layers. Hierarchical networks are known to be able to achieve any function that can be synthesized if there is only one intermediate layer, but increasing the number of intermediate layers is advantageous in terms of learning efficiency and the number of neurons. It has been known.

ニューラルネットワークは以下のような特徴を有している。
(1)比較的単純な構成でありながら、多入力・多出力の非線形システムを実現できる。(2)各層内の各ニューロンは独立して動作させることができ、並列処理によって高速な動作が期待できる。
(3)適切な教師データを与えて学習させることにより、任意の入出力関係を実現させることができる。
(4)系として汎化能力がある。すなわち、必ずしも教師データとして与えていない、未学習の入力パターンに対しても、おおむね正しい出力を与える能力がある。
The neural network has the following characteristics.
(1) A multi-input / multi-output nonlinear system can be realized with a relatively simple configuration. (2) Each neuron in each layer can be operated independently, and high-speed operation can be expected by parallel processing.
(3) Arbitrary input / output relations can be realized by providing appropriate teacher data for learning.
(4) The system has generalization ability. That is, there is an ability to give a generally correct output even to an unlearned input pattern that is not necessarily given as teacher data.

ここで、教師データとは、入力パターンと、その入力パターンに対する望ましい出力パターンの対であり、通常複数個用意する。特定の入力パターンに対して望ましい出力パターンを決定する作業は、一般に熟練者の主観的な判断に頼って決定する。ニューラルネットワークの主な応用としては(a)非線形の関数近似、(b)クラスタリング(識別、認識、分類)が挙げられる。   Here, the teacher data is a pair of an input pattern and a desired output pattern for the input pattern, and a plurality of teacher data are usually prepared. The operation of determining a desired output pattern for a specific input pattern is generally determined by relying on the subjective judgment of an expert. Major applications of neural networks include (a) nonlinear function approximation and (b) clustering (identification, recognition, classification).

一般に非線形関数近似は実現が容易であり、汎化能力も高い系を得やすい。一方、クラスタリングへの応用は教師データへの依存性が高く、かつ複雑な入力に関しては、複数の教師データ相互の間に矛盾関係が存在する可能性が高い。このため、クラスタリングへ応用した場合には、入力が非常に簡単な場合を除けば、結果的に汎化能力が低いのみならず、特定の教師データに対する適合性という意味でも不満足な系しか得られないことも少なくない。   In general, nonlinear function approximation is easy to implement and it is easy to obtain a system with high generalization ability. On the other hand, application to clustering is highly dependent on teacher data, and there is a high possibility that there is a contradiction between a plurality of teacher data for complex input. For this reason, when applied to clustering, unless the input is very simple, the result is not only a low generalization ability, but also an unsatisfactory system in terms of suitability for specific teacher data. There are many things that are not.

次に、ニューラルネットワークに対する教師データを用いた学習方法について説明する。p番目の入力パターンに対する、第L層のi番目のニューロンの状態を式(12)及び式(13)のように表現する。

Figure 2006039666
Figure 2006039666
ここで、式(12)の関数f(x)は、式(11)に示した非線形のシグモイド関数、YiLはニューロンの出力、UiLはニューロンの内部状態、Yi<L−1>はL−1層のニューロンの出力=L層のニューロンの入力、wij<L>は結合強度である。 Next, a learning method using teacher data for the neural network will be described. The state of the i-th neuron in the L-th layer with respect to the p-th input pattern is expressed as in Expression (12) and Expression (13).
Figure 2006039666
Figure 2006039666
Here, the function f (x) in Expression (12) is the nonlinear sigmoid function shown in Expression (11), Y iL is the output of the neuron, U iL is the internal state of the neuron, and Y i <L−1> is L-1 layer neuron output = L layer neuron input, w ij <L> is the connection strength.

このように定義した場合に、広く用いられている誤差逆伝搬学習法(バックプロパゲーション学習法、以下BP法と略す。)では、誤差評価関数として平均自乗誤差を用いて、以下のようにエラーEを定義する。

Figure 2006039666
ただしkは出力層の番号であり、Ti(p)はp番目の入力パターンに対する望ましい出力パターンである。 In such a definition, the widely used error back propagation learning method (back propagation learning method, hereinafter referred to as BP method) uses the mean square error as an error evaluation function, and the error Define E.
Figure 2006039666
Where k is the output layer number and T i (p) is the desired output pattern for the pth input pattern.

この場合、BP法に基づく各結合強度の修正量Δwは次式で定められる。

Figure 2006039666
ここで、∂は偏微分記号(ラウンド)、ηは学習率を表す係数である。Δwij<L>を各々のwij<L>に加算することによって学習が進む。なお、この形式のBP法では学習が進んだ結果、教師データとの誤差の絶対値が小さくなってくると、Δwの絶対値も小さくなり、学習が進まなくなるという現象が指摘されており、その問題点を回避するために、種々の改良が提案されている。 In this case, the correction amount Δw of each bond strength based on the BP method is determined by the following equation.
Figure 2006039666
Here, ∂ is a partial differential symbol (round), and η is a coefficient representing a learning rate. Learning proceeds by adding Δw ij <L> to each w ij <L>. In addition, as a result of learning progressed in the BP method of this form, if the absolute value of the error from the teacher data becomes small, the absolute value of Δw also becomes small, and the phenomenon that learning does not progress has been pointed out. Various improvements have been proposed in order to avoid problems.

例えば、Δwの定義を次のように変更するという提案がある。

Figure 2006039666
式(16)の第二項は慣性項(モーメンタム項)と呼ばれ、現在の修正量だけでなく、過去の修正量も考慮することで収束時の振動を抑え、学習を高速化する効果がある。安定化定数αは1.0以下の正の実数で、過去の修正量の考慮の度合いを規定する係数である。 For example, there is a proposal to change the definition of Δw as follows.
Figure 2006039666
The second term in equation (16) is called an inertial term (momentum term), and has the effect of suppressing the vibration at the time of convergence by considering not only the current correction amount but also the past correction amount, and speeding up learning. is there. The stabilization constant α is a positive real number of 1.0 or less, and is a coefficient that defines the degree of consideration of past correction amounts.

あるいは、学習率ηを学習回数nに応じて、次式を満たすように動的に変化させるという提案もある。

Figure 2006039666
Alternatively, there is also a proposal of dynamically changing the learning rate η so as to satisfy the following expression according to the number of learnings n.
Figure 2006039666

さらには、エラーの評価を平均自乗誤差ではなく、シグモイド関数の導関数を打ち消すような形式にするという提案もある。いずれにせよ、BP法を用いて十分な回数学習作業を施すことにより、教師データに対して近似した出力を得ることができるようになる。   Furthermore, there is also a proposal to make the error evaluation in a form that cancels out the derivative of the sigmoid function instead of the mean square error. In any case, an output approximate to the teacher data can be obtained by performing the learning operation a sufficient number of times using the BP method.

図21に、実施形態2の天地判定処理で適用されるニューラルネットワークの一例を示す。ここで用いるニューラルネットワークは、領域1(空)の特徴量1、特徴量2及び特徴量n、領域2(顔)の特徴量1、特徴量2及び特徴量n、配光条件に基づいて算出された特徴量(逆光の程度、ストロボの程度等)を入力信号とし、画像のx方向(横方向)における天方向を表す出力値Outx、画像のy方向(縦方向)における天方向を表す出力値Outyを出力信号とするニューラルネットワークである。   FIG. 21 shows an example of a neural network applied in the top / bottom determination process of the second embodiment. The neural network used here is calculated based on the feature amount 1, feature amount 2 and feature amount n of region 1 (sky), feature amount 1, feature amount 2 and feature amount n of region 2 (face), and light distribution conditions. The output value Outx representing the sky direction in the x direction (horizontal direction) of the image, and the output representing the sky direction in the y direction (vertical direction) of the image, using the obtained feature amount (backlight level, strobe level, etc.) as input signals It is a neural network that uses the value Outy as an output signal.

図22に、出力値Outx、Outyと、画像の天方向の関係を示す。例えば、Outxが、画像の左から右に向かって0.0〜1.0の範囲の値をとる場合、Outx〜1.0であれば、画像の右方向を天方向とし、Outx〜0.0であれば、画像の左方向を天方向とする。また、Outyが、画像の下から上に向かって0.0〜1.0の範囲の値を取る場合、Outy〜1.0であれば、画像の上方向を天方向とし、Outy〜0.0であれば、画像の下方向を天方向とする。従って、この2つの出力値Outx、Outyの大小に応じて、天方向を決定することができる。例えば、Outx〜0.5で、Outy〜1.0である場合、上方向が天方向であるとみなされる。   FIG. 22 shows the relationship between the output values Outx and Outy and the top direction of the image. For example, when Outx takes a value in the range of 0.0 to 1.0 from the left to the right of the image, if Outx is 1.0, the right direction of the image is the celestial direction, and if Outx is 0.0, the left side of the image The direction is the celestial direction. When Outy takes a value in the range of 0.0 to 1.0 from the bottom to the top of the image, if Outy is 1.0, the top direction of the image is the top direction, and if Outy is 0.0, the bottom of the image The direction is the celestial direction. Accordingly, the sky direction can be determined according to the magnitude of the two output values Outx and Outy. For example, when Outx is 0.5 and Outy is 1.0, the upward direction is regarded as the top direction.

なお、図21では、出力層の要素数が2個になっているが、上下左右の4方向に対応して4個にしてもよい。また、ニューラルネットワークの構成は、中間層の数が2層以上でもよく、各層の要素数も合わせて最も認識率が高くなるように決定すればよい。   In FIG. 21, the number of elements in the output layer is two, but may be four corresponding to the four directions of up, down, left, and right. The configuration of the neural network may be two or more intermediate layers, and the number of elements in each layer may be determined so that the recognition rate is the highest.

以上のように、本実施形態2の画像処理装置1によれば、撮影画像データから、配光条件に応じて決定された画像領域を抽出して、抽出された画像領域の特徴量と、配光条件の特徴量を入力信号、画像の天方向を表す出力値を出力信号としたニューラルネットワークを用いて天地を判定することにより、どのような撮影環境であっても天地判定の判定精度を向上させることができるとともに、ユーザの撮影状況が反映された天地判定を行うことができる。   As described above, according to the image processing apparatus 1 of the second embodiment, the image area determined according to the light distribution condition is extracted from the captured image data, and the feature amount and the distribution of the extracted image area are extracted. Improve the accuracy of the top / bottom determination in any shooting environment by using a neural network that uses the feature value of the light condition as the input signal and the output value that represents the top direction of the image as the output signal. And the top / bottom determination reflecting the user's shooting situation.

特に、空などのテクスチャの少ない背景領域から算出された特徴量に基づいて天地判定を行うと、判定精度を更に向上させることができる。また、撮影画像データに人物が含まれている場合、空領域だけでなく人物の顔領域を抽出し、空領域の特徴量及び顔領域の特徴量に基づいて天地判定を行うと、ユーザの撮影意図にそった天地判定を行うことができ、天地判定の判定精度を一層高めることができる。   In particular, when the top / bottom determination is performed based on the feature amount calculated from the background region with a small texture such as the sky, the determination accuracy can be further improved. In addition, when a person is included in the captured image data, not only the sky area but also the person's face area is extracted, and when the top and bottom determination is performed based on the feature amount of the sky area and the feature amount of the face area, the user's shooting is performed. It is possible to perform the top / bottom determination according to the intention, and the determination accuracy of the top / bottom determination can be further enhanced.

なお、上記各実施形態及びにおける記述内容は、本発明の趣旨を逸脱しない範囲で適宜変更可能である。   In addition, the description content in each of the above embodiments can be changed as appropriate without departing from the spirit of the present invention.

本発明の実施形態1及び2における画像処理装置の外観構成を示す斜視図。FIG. 3 is a perspective view showing an external configuration of the image processing apparatus according to Embodiments 1 and 2 of the present invention. 実施形態1及び2の画像処理装置の主要部構成を示すブロック図。FIG. 3 is a block diagram illustrating a main configuration of the image processing apparatus according to the first and second embodiments. 図2の画像処理部の主要部構成を示すブロック図。The block diagram which shows the principal part structure of the image processing part of FIG. 実施形態1の画像調整処理部において実行される画像処理全体の流れを示すフローチャート。5 is a flowchart showing the overall flow of image processing executed by the image adjustment processing unit of the first embodiment. 配光条件判別処理を示すフローチャート。The flowchart which shows a light distribution condition discrimination | determination process. 明度・色相の領域毎に第1の占有率を算出する占有率算出処理を示すフローチャート。The flowchart which shows the occupation rate calculation process which calculates the 1st occupation rate for every area | region of brightness and hue. RGBからHSV表色系に変換するプログラムの一例を示す図。The figure which shows an example of the program which converts from RGB to HSV color system. 明度(V)−色相(H)平面と、V−H平面上の領域r1及び領域r2を示す図。The figure which shows the brightness | luminance (V) -hue (H) plane, and the area | region r1 and the area | region r2 on a VH plane. 明度(V)−色相(H)平面と、V−H平面上の領域r3及び領域r4を示す図。The figure which shows the brightness | luminance (V) -hue (H) plane, and the area | region r3 and the area | region r4 on a VH plane. 指標1を算出するための、第1の占有率に乗算する第1の係数を表す曲線を示す図。The figure which shows the curve showing the 1st coefficient by which the 1st occupation rate for calculating the parameter | index 1 is multiplied. 指標2を算出するための、第1の占有率に乗算する第2の係数を表す曲線を示す図。The figure which shows the curve showing the 2nd coefficient by which the 1st occupation rate for calculating the parameter | index 2 is multiplied. 撮影画像データの構図に基づいて第2の占有率を算出する占有率算出処理を示すフローチャート。The flowchart which shows the occupation rate calculation process which calculates a 2nd occupation rate based on the composition of picked-up image data. 撮影画像データの画面の外縁からの距離に応じて決定される領域n1〜n4を示す図。The figure which shows the area | regions n1-n4 determined according to the distance from the outer edge of the screen of picked-up image data. 指標3を算出するための、第2の占有率に乗算する第3の係数を表す曲線を領域別(n1〜n4)に示す図。The figure which shows the curve showing the 3rd coefficient for multiplying the 2nd occupation rate for calculating the parameter | index 3 according to area | region (n1-n4). 配光条件(順光、ストロボ、逆光)別に算出された指標4及び指標5のプロット図。The plot figure of the parameter | index 4 and the parameter | index 5 calculated according to light distribution conditions (forward light, strobe, backlight). 領域1(空)抽出処理を示すフローチャート(a)と、領域2(顔)抽出処理を示すフローチャート(b)。The flowchart (a) which shows an area | region 1 (sky) extraction process, and the flowchart (b) which shows an area | region 2 (face) extraction process. 実施形態2の画像調整処理部において実行される画像処理全体の流れを示すフローチャート。9 is a flowchart showing the overall flow of image processing executed by an image adjustment processing unit according to the second embodiment. 特徴量算出処理を示すフローチャート。The flowchart which shows a feature-value calculation process. 階層型ニューラルネットワークの構造を模式的に示す図。The figure which shows the structure of a hierarchical neural network typically. ニューラルネットワークを構成するニューロンの構造を示す図。The figure which shows the structure of the neuron which comprises a neural network. 実施形態2で適用されるニューラルネットワークを示す図。FIG. 5 is a diagram showing a neural network applied in the second embodiment. 図21のニューラルネットワークの出力値と撮影画像との関係を示す図。The figure which shows the relationship between the output value of the neural network of FIG. 21, and a picked-up image.

符号の説明Explanation of symbols

1 画像処理装置
4 露光処理部
5 プリント作成部
7 制御部
8 CRT
9 フィルムスキャナ部
10 反射原稿入力装置
11 操作部
14 画像読込部
15 画像書込部
30 画像転送手段
31 画像搬送部
32 通信手段(入力)
33 通信手段(出力)
34 外部プリンタ
70 画像処理部
701 フィルムスキャンデータ処理部
702 反射原稿スキャンデータ処理部
703 画像データ書式解読処理部
704 画像調整処理部
705 CRT固有処理部
706 プリンタ固有処理部(1)
707 プリンタ固有処理部(2)
708 画像データ書式作成処理部
71 データ蓄積手段
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 4 Exposure processing part 5 Print preparation part 7 Control part 8 CRT
DESCRIPTION OF SYMBOLS 9 Film scanner part 10 Reflective original input device 11 Operation part 14 Image reading part 15 Image writing part 30 Image transfer means 31 Image conveyance part 32 Communication means (input)
33 Communication means (output)
34 External Printer 70 Image Processing Unit 701 Film Scan Data Processing Unit 702 Reflected Original Scan Data Processing Unit 703 Image Data Format Decoding Processing Unit 704 Image Adjustment Processing Unit 705 CRT Specific Processing Unit 706 Printer Specific Processing Unit (1)
707 Printer-specific processing unit (2)
708 Image data format creation processing unit 71 Data storage means

Claims (15)

撮影画像データから、撮影時の配光条件を判別する判別工程と、
前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定工程と、
前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出工程と、
前記抽出された画像領域に基づいて前記撮影画像データの天地を判定する判定工程と、
を含むことを特徴とする画像処理方法。
A discrimination process for discriminating light distribution conditions at the time of shooting from the shot image data,
A determining step of determining an extraction condition of a predetermined image region from the determined light distribution condition;
An extraction step of extracting at least one image region from the captured image data according to the determined extraction condition;
A determination step of determining the top and bottom of the captured image data based on the extracted image region;
An image processing method comprising:
撮影画像データから、撮影時の配光条件を判別する判別工程と、
前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定工程と、
前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出工程と、
前記抽出された画像領域から所定の特徴量を算出する算出工程と、
前記算出された特徴量及び前記判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて前記撮影画像データの天地を判定する判定工程と、
を含むことを特徴とする画像処理方法。
A discrimination process for discriminating light distribution conditions at the time of shooting from the shot image data,
A determining step of determining an extraction condition of a predetermined image region from the determined light distribution condition;
An extraction step of extracting at least one image region from the captured image data according to the determined extraction condition;
A calculation step of calculating a predetermined feature amount from the extracted image region;
A determination step of determining the top and bottom of the captured image data using a neural network, using the calculated feature amount and the feature amount calculated based on the determined light distribution condition as an input signal;
An image processing method comprising:
前記撮影時の配光条件には、逆光状態及び/又はフラッシュ光利用状態が含まれることを特徴とする請求項1又は2に記載の画像処理方法。   The image processing method according to claim 1, wherein the light distribution condition at the time of photographing includes a backlight state and / or a flash light utilization state. 前記抽出工程において抽出される画像領域には、少なくとも主要被写体の背景領域が含まれることを特徴とする請求項1〜3の何れか一項に記載の画像処理方法。   The image processing method according to claim 1, wherein the image area extracted in the extraction step includes at least a background area of a main subject. 前記抽出工程において抽出される画像領域には、少なくとも人物の顔領域が含まれることを特徴とする請求項4に記載の画像処理方法。   The image processing method according to claim 4, wherein the image area extracted in the extraction step includes at least a human face area. 撮影画像データから、撮影時の配光条件を判別する判別手段と、
前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定手段と、
前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出手段と、
前記抽出された画像領域に基づいて前記撮影画像データの天地を判定する判定手段と、
を備えることを特徴とする画像処理装置。
Discriminating means for discriminating light distribution conditions at the time of shooting from the shot image data;
Determining means for determining an extraction condition of a predetermined image region from the determined light distribution condition;
Extracting means for extracting at least one image region from the captured image data according to the determined extraction condition;
Determining means for determining the top and bottom of the captured image data based on the extracted image region;
An image processing apparatus comprising:
撮影画像データから、撮影時の配光条件を判別する判別手段と、
前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定手段と、
前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出手段と、
前記抽出された画像領域から所定の特徴量を算出する算出手段と、
前記算出された特徴量及び前記判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて前記撮影画像データの天地を判定する判定手段と、
を備えることを特徴とする画像処理装置。
Discriminating means for discriminating light distribution conditions at the time of shooting from the shot image data;
Determining means for determining an extraction condition of a predetermined image region from the determined light distribution condition;
Extracting means for extracting at least one image region from the captured image data according to the determined extraction condition;
Calculating means for calculating a predetermined feature amount from the extracted image region;
Determination means for determining the top of the photographed image data using a neural network, using the calculated feature value and the feature value calculated based on the determined light distribution condition as an input signal;
An image processing apparatus comprising:
前記撮影時の配光条件には、逆光状態及び/又はフラッシュ光利用状態が含まれることを特徴とする請求項6又は7に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the light distribution condition at the time of photographing includes a backlight state and / or a flash light use state. 前記抽出手段は、前記撮影画像データから、少なくとも主要被写体の背景領域を抽出することを特徴とする請求項6〜8の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the extraction unit extracts at least a background area of a main subject from the captured image data. 前記抽出手段は、前記撮影画像データから、少なくとも人物の顔領域を抽出することを特徴とする請求項9に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the extraction unit extracts at least a human face area from the captured image data. 画像処理を実行するコンピュータに、
撮影画像データから、撮影時の配光条件を判別する判別機能と、
前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定機能と、
前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出機能と、
前記抽出された画像領域に基づいて前記撮影画像データの天地を判定する判定機能と、
を実現させるための画像処理プログラム。
On the computer that performs image processing,
A discriminating function for discriminating light distribution conditions at the time of shooting from shot image data,
A determination function for determining a predetermined image region extraction condition from the determined light distribution condition;
An extraction function for extracting at least one image region from the captured image data according to the determined extraction condition;
A determination function for determining the top and bottom of the captured image data based on the extracted image region;
An image processing program for realizing
画像処理を実行するコンピュータに、
撮影画像データから、撮影時の配光条件を判別する判別機能と、
前記判別された配光条件から、所定の画像領域の抽出条件を決定する決定機能と、
前記決定された抽出条件に従って、前記撮影画像データから少なくとも1つの画像領域を抽出する抽出機能と、
前記抽出された画像領域から所定の特徴量を算出する算出機能と、
前記算出された特徴量及び前記判別された配光条件に基づいて算出された特徴量を入力信号として、ニューラルネットワークを用いて前記撮影画像データの天地を判定する判定機能と、
を実現させるための画像処理プログラム。
On the computer that performs image processing,
A discriminating function for discriminating light distribution conditions at the time of shooting from shot image data,
A determination function for determining a predetermined image region extraction condition from the determined light distribution condition;
An extraction function for extracting at least one image region from the captured image data according to the determined extraction condition;
A calculation function for calculating a predetermined feature amount from the extracted image region;
A determination function for determining the top and bottom of the photographed image data using a neural network, using the calculated feature amount and the feature amount calculated based on the determined light distribution condition as an input signal,
An image processing program for realizing
前記撮影時の配光条件には、逆光状態及び/又はフラッシュ光利用状態が含まれることを特徴とする請求項11又は12に記載の画像処理プログラム。   The image processing program according to claim 11 or 12, wherein the light distribution condition at the time of photographing includes a backlight state and / or a flash light utilization state. 前記抽出機能を実現させる際に、前記撮影画像データから、少なくとも主要被写体の背景領域を抽出させることを特徴とする請求項11〜13の何れか一項に記載の画像処理プログラム。   The image processing program according to any one of claims 11 to 13, wherein when the extraction function is realized, at least a background area of a main subject is extracted from the captured image data. 前記抽出機能を実現させる際に、前記撮影画像データから、少なくとも人物の顔領域を抽出させることを特徴とする請求項14に記載の画像処理プログラム。   15. The image processing program according to claim 14, wherein when the extraction function is realized, at least a human face area is extracted from the photographed image data.
JP2004214589A 2004-07-22 2004-07-22 Image processing method, image processor and image processing program Pending JP2006039666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004214589A JP2006039666A (en) 2004-07-22 2004-07-22 Image processing method, image processor and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004214589A JP2006039666A (en) 2004-07-22 2004-07-22 Image processing method, image processor and image processing program

Publications (1)

Publication Number Publication Date
JP2006039666A true JP2006039666A (en) 2006-02-09

Family

ID=35904637

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004214589A Pending JP2006039666A (en) 2004-07-22 2004-07-22 Image processing method, image processor and image processing program

Country Status (1)

Country Link
JP (1) JP2006039666A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7893969B2 (en) * 2006-07-25 2011-02-22 Fujifilm Corporation System for and method of controlling a parameter used for detecting an objective body in an image and computer program
WO2013089051A1 (en) * 2011-12-14 2013-06-20 シャープ株式会社 Image processing device, image processing method, image processing program, and recording medium storing image processing program
JP2013146813A (en) * 2012-01-18 2013-08-01 Seiko Epson Corp Robot apparatus, and position and orientation detecting method
US9313416B2 (en) 2013-03-14 2016-04-12 Canon Kabushiki Kaisha Image processing apparatus that performs gradation correction of photographed image, method of controlling the same, and storage medium
US9542734B2 (en) 2013-10-23 2017-01-10 Canon Kabushiki Kaisha Information processing apparatus, image processing method, and storage medium that determine tone characteristics for respective object signals
US10313649B2 (en) 2016-10-20 2019-06-04 Canon Kabushiki Kaisha Image processing apparatus, control method thereof, and storage medium
US10410329B2 (en) 2016-07-29 2019-09-10 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer readable storage medium
US10902244B2 (en) 2017-03-27 2021-01-26 Samsung Electronics Co., Ltd. Apparatus and method for image processing

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7893969B2 (en) * 2006-07-25 2011-02-22 Fujifilm Corporation System for and method of controlling a parameter used for detecting an objective body in an image and computer program
US8797423B2 (en) 2006-07-25 2014-08-05 Fujifilm Corporation System for and method of controlling a parameter used for detecting an objective body in an image and computer program
WO2013089051A1 (en) * 2011-12-14 2013-06-20 シャープ株式会社 Image processing device, image processing method, image processing program, and recording medium storing image processing program
JP2013146813A (en) * 2012-01-18 2013-08-01 Seiko Epson Corp Robot apparatus, and position and orientation detecting method
US9313416B2 (en) 2013-03-14 2016-04-12 Canon Kabushiki Kaisha Image processing apparatus that performs gradation correction of photographed image, method of controlling the same, and storage medium
US9542734B2 (en) 2013-10-23 2017-01-10 Canon Kabushiki Kaisha Information processing apparatus, image processing method, and storage medium that determine tone characteristics for respective object signals
US10410329B2 (en) 2016-07-29 2019-09-10 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer readable storage medium
US10313649B2 (en) 2016-10-20 2019-06-04 Canon Kabushiki Kaisha Image processing apparatus, control method thereof, and storage medium
US10902244B2 (en) 2017-03-27 2021-01-26 Samsung Electronics Co., Ltd. Apparatus and method for image processing

Similar Documents

Publication Publication Date Title
US8170364B2 (en) Image processing method, image processing device, and image processing program
US8194992B2 (en) System and method for automatic enhancement of seascape images
US8285059B2 (en) Method for automatic enhancement of images containing snow
US8254679B2 (en) Content-based image harmonization
JP4248812B2 (en) Digital image processing method for brightness adjustment
JP2005190435A (en) Image processing method, image processing apparatus and image recording apparatus
JP5810628B2 (en) Image processing apparatus and image processing program
JP2006325015A (en) Image processing method, image processing apparatus, imaging apparatus, and image processing program
US20050259282A1 (en) Image processing method, image processing apparatus, image recording apparatus, and image processing program
JP2007184888A (en) Imaging apparatus, image processor, image processing method, and image processing program
JP2006039666A (en) Image processing method, image processor and image processing program
JP2006318255A (en) Image processing method, image processor and image processing program
JP2005192162A (en) Image processing method, image processing apparatus, and image recording apparatus
WO2006033235A1 (en) Image processing method, image processing device, imaging device, and image processing program
JP4449619B2 (en) Image processing method, image processing apparatus, and image processing program
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2007293686A (en) Imaging apparatus, image processing apparatus, image processing method and image processing program
JP2007221678A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2005192158A (en) Image processing method, image processing apparatus, and image recording apparatus
JP2006039657A (en) Image processing method, image processor and image processing program
JP2006094000A (en) Image processing method, image processing apparatus, and image processing program
JP2006293898A (en) Image processing method, image processing apparatus, and image processing program
JP4507673B2 (en) Image processing apparatus, image processing method, and program
JP2006203573A (en) Imaging apparatus, image processor, and image recording apparatus
JP2005332054A (en) Image processing method, image processor, image recording device and image processing program