JP4366286B2 - Image processing method, image processing apparatus, and computer program - Google Patents

Image processing method, image processing apparatus, and computer program Download PDF

Info

Publication number
JP4366286B2
JP4366286B2 JP2004294268A JP2004294268A JP4366286B2 JP 4366286 B2 JP4366286 B2 JP 4366286B2 JP 2004294268 A JP2004294268 A JP 2004294268A JP 2004294268 A JP2004294268 A JP 2004294268A JP 4366286 B2 JP4366286 B2 JP 4366286B2
Authority
JP
Japan
Prior art keywords
image
shooting
roll angle
information
angle information
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.)
Expired - Fee Related
Application number
JP2004294268A
Other languages
Japanese (ja)
Other versions
JP2006109175A (en
JP2006109175A5 (en
Inventor
信二郎 堀
清 梅田
信孝 三宅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2004294268A priority Critical patent/JP4366286B2/en
Publication of JP2006109175A publication Critical patent/JP2006109175A/en
Publication of JP2006109175A5 publication Critical patent/JP2006109175A5/ja
Application granted granted Critical
Publication of JP4366286B2 publication Critical patent/JP4366286B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Circuits (AREA)
  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Description

本発明は、撮影画像を処理するための技術に関するものである。   The present invention relates to a technique for processing a captured image.

近年、デジタルカメラの普及によって、撮影画像のデジタル化が容易になっている。加えて印刷装置、特にインクジェット方式の高画質化が進み、ユーザが撮影したデジタル画像から写真調の印刷結果を得ることができるようになった。更に、パーソナルコンピュータ上で各種アプリケーションソフトウェアを使用して撮影した画像データを編集、加工処理することも容易になっている。   In recent years, with the spread of digital cameras, digitization of captured images has become easier. In addition, the quality of printing apparatuses, particularly inkjet systems, has been improved, and photographic print results can be obtained from digital images taken by users. Furthermore, it is also easy to edit and process image data captured using various application software on a personal computer.

このような背景から、撮影した画像をきれいに且つ簡単に印刷できる環境の開発が更に進められている。そのひとつとして、デジタルカメラで撮影したときの撮影条件、時間、機種などの様々な情報を撮影情報として画像データに付加し、そのデータをもとに最適な画像処理を行う方法が多く提案されている(例えば特許文献1を参照)。
特開2003-087717
Against this background, development of an environment that allows a photographed image to be printed cleanly and easily has been further advanced. As one of them, many methods have been proposed for adding various information such as shooting conditions, time, and model when shooting with a digital camera to the image data as shooting information and performing optimal image processing based on that data. (For example, refer to Patent Document 1).
JP 2003-087717 A

しかし実際には撮影情報と撮影された画像データとが一致していないために間違った処理を行うことがある。これは撮影情報が必ずしも撮影時の状況を反映できないからである。   However, actually, since the photographing information and the photographed image data do not match, an incorrect process may be performed. This is because the shooting information cannot necessarily reflect the situation at the time of shooting.

例えば、デジタルカメラの一機能として、撮影時の縦横の姿勢、つまり画角を検知するものがある。これはカメラにフォトインタラプター、傾きセンサー、重力センサー、加速度センサー、メカ的なセンサーをカメラに内蔵し、撮影時の姿勢を計測するものである。   For example, as one function of a digital camera, there is one that detects a vertical and horizontal posture at the time of shooting, that is, a field angle. The camera incorporates a photo interrupter, tilt sensor, gravity sensor, acceleration sensor, and mechanical sensor in the camera, and measures the posture during shooting.

これによって撮影時の縦横の姿勢を撮影情報として格納しておき、縦長な画角で撮影された撮影画像データをパーソナルコンピュータで表示するときに自動的に回転させて表示するといった機能を実現することが可能になる。   This realizes the function of storing the vertical and horizontal postures at the time of shooting as shooting information, and automatically rotating and displaying the shot image data shot at a vertical angle of view when displayed on a personal computer. Is possible.

この機能は高級機には搭載されているが、低価格普及機、カメラ付き携帯などにはまだ搭載されていない。更に画像の方向を格納する機能が搭載されているにもかかわらず、ユーザがこの機能をoffにして撮影することもある。また、急にカメラを動かしたり回転して撮影した場合には、正確に撮影方向を認識できない場合がある。したがって、撮影された画像の方向と格納された撮影データが一致していない場合が多く存在する。   This function is installed in high-end models, but it is not yet installed in low-priced popular machines and mobile phones with cameras. Furthermore, even though a function for storing the direction of the image is installed, the user may take a picture with this function turned off. In addition, when the camera is suddenly moved or rotated for shooting, the shooting direction may not be accurately recognized. Therefore, there are many cases where the direction of the captured image does not match the stored captured data.

この結果、画像を表示する際に画像の方向を元に表示方向を自動的に修正して表示できるアプリケーションを利用していても、表示方向と画角を一致させることができない場合が発生するという問題があった。   As a result, even when using an application that can automatically display and display the image based on the direction of the image when displaying the image, the display direction may not match the angle of view. There was a problem.

さらに、デジタルカメラには撮影モードの設定が可能であり、ユーザは、AUTO、ポートレート、風景、夜景などのモードを選択して撮影を行える。しかし、ユーザがあるモードを選択して撮影を行い、そのままのモードで使い続けてしまうといったことが起こる。例えば、風景モードで風景に適した撮影を行った後で、人物をそのモードのまま撮影してしまうといったことがある。   Furthermore, a shooting mode can be set for the digital camera, and the user can select a mode such as AUTO, portrait, landscape, night view, and so on. However, there are cases where the user selects a certain mode for shooting and continues to use the mode as it is. For example, after shooting suitable for a landscape in the landscape mode, a person may be shot in that mode.

この様な場合、撮影情報を元に自動的に画像処理を行うと、ポートレートモードとして処理されるべき画像であるにもかかわらず、風景モードとして処理されてしまい、処理の不整合が発生するといった問題があった。   In such a case, if the image processing is automatically performed based on the shooting information, the image is processed as the landscape mode even though the image should be processed as the portrait mode, and processing inconsistency occurs. There was a problem.

本発明は以上の問題に鑑みて成されたものであり、撮影情報と画像とで、撮影条件につての整合性を一致させるための技術を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique for matching the matching of shooting information and images with respect to shooting conditions.

本発明の目的を達成するために、例えば本発明の画像処理方法は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing method of the present invention comprises the following arrangement.

即ち、撮影画像に添付された、当該撮影画像の撮影時における撮影条件を示す情報から、当該撮影画像を撮影した撮影装置の撮影時におけるロールを示す撮影ロール角情報を抽出する抽出工程と、
前記撮影画像から顔を検出する検出工程と、
前記検出工程で検出した顔の、前記撮影画像内におけるロール方向の傾斜を検出し、検出した傾斜に基づいて、前記撮影画像を撮影した撮影装置の撮影時におけるロール、計算ロール角情報として求める計算工程と、
前記撮影ロール角情報と前記計算ロール角情報とを比較する比較工程と、
前記比較工程による比較結果、前記撮影ロール角情報と前記計算ロール角情報とが一致していない場合には、前記撮影ロール角情報を前記計算ロール角情報と一致するように変更する変更工程と
を備えることを特徴とする。
That is, an extraction step of extracting shooting roll angle information indicating a roll angle at the time of shooting of a shooting apparatus that has shot the shot image from information attached to the shot image and indicating shooting conditions at the time of shooting the shot image;
A detection step of detecting a face from the captured image;
As the calculated roll angle information, the roll angle at the time of photographing of the photographing device that photographed the photographed image based on the detected tilt of the face detected in the detection step is detected in the roll direction in the photographed image. The desired calculation process;
A comparison step of comparing the shooting roll angle information with the calculated roll angle information ;
As a result of the comparison in the comparison step, when the shooting roll angle information and the calculated roll angle information do not match, the changing step of changing the shooting roll angle information to match the calculated roll angle information ; It is characterized by providing.

本発明の目的を達成するために、例えば本発明の画像処理装置は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement.

即ち、撮影画像に添付された、当該撮影画像の撮影時における撮影条件を示す情報から、当該撮影画像を撮影した撮影装置の撮影時におけるロールを示す撮影ロール角情報を抽出する抽出手段と、
前記撮影画像から顔を検出する検出手段と、
前記検出手段で検出した顔の、前記撮影画像内におけるロール方向の傾斜を検出し、検出した傾斜に基づいて、前記撮影画像を撮影した撮影装置の撮影時におけるロール、計算ロール角情報として求める計算手段と、
前記撮影ロール角情報と前記計算ロール角情報とを比較する比較手段と、
前記比較手段による比較結果、前記撮影ロール角情報と前記計算ロール角情報とが一致していない場合には、前記撮影ロール角情報を前記計算ロール角情報と一致するように変更する変更手段と
を備えることを特徴とする。
That is, an extraction unit that extracts shooting roll angle information indicating a roll angle at the time of shooting of a shooting apparatus that shot the shot image from information attached to the shot image and indicating shooting conditions at the time of shooting the shot image;
Detecting means for detecting a face from the captured image;
The roll angle of the face detected by the detection means in the roll image in the photographed image is detected, and the roll angle at the time of photographing of the photographing device that photographed the photographed image based on the detected tilt is calculated roll angle information. A calculation means to obtain;
Comparison means for comparing the shooting roll angle information and the calculated roll angle information ;
A change means for changing the shooting roll angle information to match the calculated roll angle information when the shooting roll angle information and the calculated roll angle information do not match as a result of the comparison by the comparing means; It is characterized by providing.

本発明の構成により、撮影情報と画像とで、撮影条件につての整合性を一致させることができる。   According to the configuration of the present invention, it is possible to match the matching of the shooting information and the image with respect to the shooting conditions.

以下添付図面を参照して、本発明を好適な実施形態に従って詳細に説明する。   Hereinafter, the present invention will be described in detail according to preferred embodiments with reference to the accompanying drawings.

[第1の実施形態]
図1は、本実施形態に係る画像処理装置の基本構成を示すブロック図である。101は画像処理装置本体で、PC(パーソナルコンピュータ)やWS(ワークステーション)等の汎用の汎用コンピュータである。このコンピュータ101は基本的には以下の各部により構成されている。
[First Embodiment]
FIG. 1 is a block diagram showing a basic configuration of an image processing apparatus according to the present embodiment. An image processing apparatus main body 101 is a general-purpose general-purpose computer such as a PC (personal computer) or WS (workstation). The computer 101 basically includes the following units.

102はCPUで、ROM103やRAM104に格納されているプログラムやデータを用いてコンピュータ全体の制御を行うと共に、本実施形態に係る画像処理装置が行うべき後述の各処理を行う。   Reference numeral 102 denotes a CPU that controls the entire computer using programs and data stored in the ROM 103 and the RAM 104, and performs each process described later that should be performed by the image processing apparatus according to the present embodiment.

103はROMで、BIOS(basic input/output system)と呼ばれる周辺機器の入出力を制御するプログラムが格納されている。CPU102はコンピュータの電源投入時にこのプログラムを実行し、RAM104やその他の入出力装置の初期化を行う。   A ROM 103 stores a program called BIOS (basic input / output system) for controlling input / output of peripheral devices. The CPU 102 executes this program when the computer is turned on, and initializes the RAM 104 and other input / output devices.

104はRAMで、CPU102が各処理を行う際に使用するワークエリアを備えると共に、2次記憶装置105からロードされたプログラムやデータを一時的に記憶するためのエリアを備える。また、インターフェース108を介して受信したデータを一時的に記憶するためのエリアを備える。   A RAM 104 includes a work area used when the CPU 102 performs each process, and an area for temporarily storing programs and data loaded from the secondary storage device 105. In addition, an area for temporarily storing data received via the interface 108 is provided.

105は2次記憶装置で、ハードディスクドライブ装置等の大容量情報記憶装置であり、ここにOS(オペレーティングシステム)や、本実施形態に係る画像処理装置が行うべき処理として後述する各処理をCPU102に実行させるためのプログラムやデータが保存されており、これらの一部、もしくは全部はCPU102の制御に基づいてRAM104にロードされ、CPU102の処理対象となる。   Reference numeral 105 denotes a secondary storage device, which is a large-capacity information storage device such as a hard disk drive device. Programs and data to be executed are stored, and some or all of them are loaded into the RAM 104 based on the control of the CPU 102 and are processed by the CPU 102.

106は表示装置で、CRTや液晶画面などにより構成されており、CPU102による処理結果を画像や文字などでもって表示することができる。   Reference numeral 106 denotes a display device, which includes a CRT, a liquid crystal screen, and the like, and can display a processing result by the CPU 102 using an image, text, or the like.

107は入力装置で、キーボードやマウスなどのポインティングデバイスにより構成されており、各種の指示をCPU102に対して入力することができると共に、各種のデータ入力を行うこともできる。   An input device 107 includes a pointing device such as a keyboard or a mouse, and can input various instructions to the CPU 102 and can also input various data.

108はI/Fで、ここに後述する各周辺機器を接続することができ、本実施形態に係る画像処理装置は、各周辺機器とこのI/F108を介してデータ通信を行うことができる。I/F108としては、パラレルポートとも呼ばれるIEEE1284やSCSI(small computer system interface)、更にはUSB(universal serial bus)、IEEE1394といったシリアルバスなどが使用できる。どのインターフェースを使用するかは画像処理装置101の構成、外部周辺機器の対応によって決まる。   Reference numeral 108 denotes an I / F, which can connect each peripheral device described later, and the image processing apparatus according to the present embodiment can perform data communication with each peripheral device via the I / F 108. As the I / F 108, a serial bus such as IEEE 1284, which is also called a parallel port, SCSI (small computer system interface), USB (universal serial bus), IEEE 1394, or the like can be used. Which interface is used depends on the configuration of the image processing apparatus 101 and the correspondence of external peripheral devices.

150は上述の各部を繋ぐバスである。   A bus 150 connects the above-described units.

次に、I/F108に接続する周辺機器について説明する。周辺機器には、デジタルスチルカメラ109、メモリカードリーダ/ライタ110、プリンター111がある。   Next, peripheral devices connected to the I / F 108 will be described. Peripheral devices include a digital still camera 109, a memory card reader / writer 110, and a printer 111.

デジタルスチルカメラ109は周知の通り撮影装置であり、撮影した撮影画像データをデジタルスチルカメラ109内部に挿入している不図示の記録メディアに保持している。   As is well known, the digital still camera 109 is a photographing device, and the photographed image data is held in a recording medium (not shown) inserted in the digital still camera 109.

この保持している撮影画像データは、I/F108にこのデジタルスチルカメラ109を接続し、入力装置107により取り込み指示を入力することで、CPU102による制御に従って、デジタルスチルカメラ109からコンピュータ101のRAM104もしくは2次記憶装置105にダウンロードすることができる。   The captured image data held by connecting the digital still camera 109 to the I / F 108 and inputting an input instruction by the input device 107, from the digital still camera 109 to the RAM 104 of the computer 101 or according to the control of the CPU 102. It can be downloaded to the secondary storage device 105.

また、上記記録メディアをデジタルスチルカメラ109から取り出し、メモリカードリーダ/ライタ110に挿入し、そしてI/F108にこのメモリカードリーダ/ライタ110を接続し、入力装置107により取り込み指示を入力することで、CPU102による制御に従ってメモリカードリーダ/ライタ110に記録メディアに記録されている撮影画像データを読み出させることができ、これにより、メモリカードリーダ/ライタ110からコンピュータ101のRAM104もしくは2次記憶装置105にダウンロードすることができる。   Further, the recording medium is taken out from the digital still camera 109, inserted into the memory card reader / writer 110, the memory card reader / writer 110 is connected to the I / F 108, and an input instruction is input by the input device 107. The image data recorded on the recording medium can be read out by the memory card reader / writer 110 in accordance with the control by the CPU 102, whereby the RAM 104 or the secondary storage device 105 of the computer 101 can be read from the memory card reader / writer 110. Can be downloaded.

また、コンピュータ101に一反ダウンロードした撮影画像は、プリンター111によって記録媒体上に印刷することもできる。   Also, the captured image downloaded to the computer 101 can be printed on a recording medium by the printer 111.

なお、本実施形態に係る画像処理装置の基本構成はこれに限定するものではなく、例えばCD−ROMやDVD−ROMなどの記憶媒体に記録されているプログラムやデータを読み出してRAM104や2次記憶装置105にロードするための装置を更に所定のインターフェースを介してバス150に接続するようにしても良い。   The basic configuration of the image processing apparatus according to the present embodiment is not limited to this. For example, a program or data recorded in a storage medium such as a CD-ROM or a DVD-ROM is read and the RAM 104 or secondary storage is read. A device for loading into the device 105 may be further connected to the bus 150 via a predetermined interface.

<撮影画像のフォーマット>
図2は、本実施形態に係る撮影画像のフォーマットを示す図である。このフォーマットは上記記録メディアに格納する際のフォーマット、あるいは画像処理装置101に転送する際のフォーマットである。
<Image format>
FIG. 2 is a diagram illustrating a format of a captured image according to the present embodiment. This format is a format for storing in the recording medium or a format for transferring to the image processing apparatus 101.

デジタルスチルカメラ109は、1つの画像を撮影すると、この撮影画像のデータを含む画像ファイルを作成する。201は、この画像ファイル全体を示す。画像ファイル201内は撮影情報領域202と撮影画像データ領域203とに大別される。撮影情報領域202には、後述する撮影情報が記録され、撮影画像データ領域203には、撮影画像のデータが記録される。即ち、撮影画像のデータは、撮影情報を添付する形態で上記記録メディアに格納されている、あるいは画像処理装置101に転送される。   When the digital still camera 109 captures one image, the digital still camera 109 creates an image file including the captured image data. Reference numeral 201 denotes the entire image file. The image file 201 is roughly divided into a shooting information area 202 and a shooting image data area 203. Shooting information described later is recorded in the shooting information area 202, and shot image data is recorded in the shot image data area 203. In other words, the captured image data is stored in the recording medium with the captured information attached or transferred to the image processing apparatus 101.

一般的には、領域202内のデータ(撮影情報)の量はさほど大きくないので非圧縮で保持し、領域203内のデータ(撮影画像のデータ)の量は大きくなるので圧縮で保持するので、この画像ファイル201は所謂ハイブリッドな構成をとる。しかし、各領域における圧縮/非圧縮についてはこれに限定するものではなく、撮影画像データが非圧縮であっても、逆に撮影情報が圧縮されていても問題ない。   In general, since the amount of data (photographing information) in the area 202 is not so large, it is held uncompressed, and since the amount of data (photographed image data) in the area 203 is large, it is held compressed. The image file 201 has a so-called hybrid configuration. However, compression / non-compression in each region is not limited to this, and there is no problem even if the photographed image data is uncompressed or the photographed information is compressed.

先ず、領域202に記録されている撮影情報について説明する。   First, shooting information recorded in the area 202 will be described.

領域202にはデジタルスチルカメラ109で撮影したときの撮影条件、例えば、撮影する画像の縦/横の画素数、露出条件、ストロボ発行の有無、ホワイトバランスの条件、撮影モード、撮影時刻等の「複数の撮影条件を示す情報」が記録されている。よって図2の場合、領域202には、領域203に記録されている撮影画像データを撮影したときの撮影条件を示す情報が記録されている。   The area 202 includes “shooting conditions when shooting with the digital still camera 109, such as the number of vertical / horizontal pixels of an image to be shot, exposure conditions, presence / absence of strobe issuance, white balance conditions, shooting mode, shooting time, and the like. "Information indicating a plurality of photographing conditions" is recorded. Therefore, in the case of FIG. 2, information indicating the shooting conditions when shooting the shot image data recorded in the area 203 is recorded in the area 202.

撮影情報は、その撮影情報に対応するID番号、データ形式、データ長、オフセット値、撮影情報固有のデータで構成される。例えば、JEIDA(japan electronic industry development association)の定めるExif(exchangeable image format)などが使用できる。   The shooting information includes an ID number corresponding to the shooting information, a data format, a data length, an offset value, and data unique to the shooting information. For example, Exif (exchangable image format) defined by JEIDA (Japan electrical development development association) can be used.

ExifではIDがTagとして定義されおり、例えばTag=274が画像方向(Orientation)となっている。画像方向の値は、1:上左(0番目の行(X方向)が画像の上、0番目の列(Y方向)が左側)、6:右上(0番目の行が画像の右側、0番目の列が上)、8:左下(0番目の行が画像の左側、0番目の列(Y方向)が下)(その他は省略)と定義されている。よって、本実施形態に係る画像ファイルのフォーマットがExifに従っている場合に、領域202内の撮影情報において、ID=274の撮影条件(1,6,8の何れか)を参照すれば、撮影時における画像方向を得ることができる。   In Exif, ID is defined as Tag. For example, Tag = 274 is an image direction (Orientation). Values in the image direction are as follows: 1: Upper left (0th row (X direction) is the top of the image, 0th column (Y direction) is the left), 6: Upper right (0th row is the right side of the image, 0 The 8th column is defined as “upper”, 8: lower left (the 0th row is the left side of the image, the 0th column (Y direction) is the lower) (others are omitted). Therefore, when the format of the image file according to the present embodiment conforms to Exif, the shooting information in the area 202 refers to the shooting condition of ID = 274 (any one of 1, 6 and 8). The image direction can be obtained.

このように、領域202に記録される各撮影条件には固有のIDが付けられており、IDを指定すると、これに対応する撮影条件は1つに特定されるので、これをこの領域202から抽出し、参照することができる。図2の例では、ID=3を指定すると、これに対応する撮影条件は「撮影モード」であるので、「撮影モード」を参照することで、領域203に記録されている撮影画像データを撮影した際の撮影モードが何であったかを得ることができる。   As described above, each shooting condition recorded in the area 202 is assigned a unique ID. When an ID is specified, one shooting condition corresponding to this ID is specified. Can be extracted and referenced. In the example of FIG. 2, when ID = 3 is designated, the shooting condition corresponding to this is “shooting mode”. Therefore, the shot image data recorded in the area 203 is shot by referring to the “shooting mode”. It is possible to obtain what was the shooting mode at the time.

一方、領域203には上述の通り、撮影画像のデータが記録されるのであるが、この画像データにはRGBデータやYCC(輝度色差)データを用いることができる。例えば、領域203に記録されている撮影画像データがYCCデータである場合、画像処理装置101側ではこのYCCデータをRGBデータに変換して用いる。本実施形態では、領域203に記録される画像はJPEG圧縮されているものとするが、圧縮方式はJPEG圧縮方式に限定するものではなく、他の圧縮方式を用いても良いし、上述の通り、必ずしも圧縮されていることに限定しなくても良い。   On the other hand, as described above, captured image data is recorded in the region 203, and RGB data and YCC (luminance color difference) data can be used as the image data. For example, when the captured image data recorded in the area 203 is YCC data, the YCC data is converted into RGB data and used on the image processing apparatus 101 side. In this embodiment, it is assumed that the image recorded in the area 203 is JPEG compressed, but the compression method is not limited to the JPEG compression method, and other compression methods may be used as described above. However, it is not necessarily limited to being compressed.

<本実施形態に係る画像処理装置が行うメインの処理>
図3は、本実施形態に係る画像処理装置が行う処理のフローチャートである。同図のフローチャートに従った処理は大まかには、表示装置106の表示画面上に一覧表示された撮影画像のうちユーザに選択された撮影画像について、この撮影画像に対する撮影情報と、撮影画像から求められる「この撮影情報に該当する情報」とを比較し、その比較の結果が一致していない場合には一致させるべく、撮影情報、撮影画像データの何れを変更するのかをユーザに問い合わせる処理のフローチャートである。
<Main processing performed by the image processing apparatus according to the present embodiment>
FIG. 3 is a flowchart of processing performed by the image processing apparatus according to the present embodiment. The process according to the flowchart of FIG. 6 is roughly obtained from the shooting information and the shot image for the shot image selected by the user among the shot images displayed in a list on the display screen of the display device 106. Flowchart of processing for inquiring of the user whether to change the photographing information or the photographed image data so as to match if the comparison result does not match. It is.

尚、同図のフローチャートに従った処理をCPU102に実行させるためのプログラムやデータは2次記憶装置105に保存されており、これをCPU102の制御によってRAM104に読み出し、CPU102がこれを実行することで、本実施形態に係る画像処理装置は以下説明する各処理を行うことになる。   Note that programs and data for causing the CPU 102 to execute the processing according to the flowchart of FIG. 10 are stored in the secondary storage device 105, read out to the RAM 104 by the control of the CPU 102, and executed by the CPU 102. The image processing apparatus according to the present embodiment performs each process described below.

また、同図のフローチャートに従った処理の前段で、RAM104には、デジタルスチルカメラ109から、複数の画像ファイル(図2に示したフォーマットに従った画像ファイル)がRAM104にダウンロードされているものとする。   In addition, a plurality of image files (image files according to the format shown in FIG. 2) are downloaded to the RAM 104 from the digital still camera 109 in the first stage of the processing according to the flowchart of FIG. To do.

先ずステップS101では、CPU102はRAM104にダウンロードされた各画像ファイルの領域203を参照し、各画像ファイルに記録されている撮影画像のデータを読み出し、復号し、更に、画像データがYCCフォーマットである場合にはこれをRGBフォーマットに変換し、ユーザにどの画像を以下の処理の対象とするのかを選択させる為に、復号後の撮影画像(RGB画像データ)をサムネイルサイズで表示装置106の表示画面上に一覧表示する。表示の形態は特に限定するものではないし、サムネイルサイズの画像を得る手段についても特に限定するものではない。   First, in step S101, the CPU 102 refers to the area 203 of each image file downloaded to the RAM 104, reads and decodes the captured image data recorded in each image file, and the image data is in YCC format. Is converted into the RGB format, and the captured image (RGB image data) after decoding is displayed in the thumbnail size on the display screen of the display device 106 in order to allow the user to select which image is the target of the following processing. To list. The display form is not particularly limited, and the means for obtaining thumbnail-sized images is not particularly limited.

ユーザは入力装置107を用いて1つ以上の撮影画像を選択し、選択が終了したら、その旨の指示を入力装置107を用いて入力するので、CPU102がこの指示を検知すると、選択された撮影画像のリストを作成する。このリストとして本実施形態では、選択された画像ファイルのファイル名のリストとするが、特に限定するものではない。また本実施形態では、人の顔が含まれている撮影画像が選択されたものとして説明する。   When the user selects one or more captured images using the input device 107 and the selection is completed, an instruction to that effect is input using the input device 107. When the CPU 102 detects this instruction, the selected shooting is performed. Create a list of images. In this embodiment, this list is a list of file names of selected image files, but is not particularly limited. In the present embodiment, a description will be given assuming that a captured image including a human face is selected.

次に、ステップS102では、CPU102は、ステップS101で作成したリストの先頭の画像ファイル名を参照し、該当する画像ファイルをRAM104に読み出す。なお、ステップS102における処理が2回目以降である場合(処理がステップS111からステップS102に移行して、ステップS102における処理を実行する場合、今回のステップS102における処理は2回目以降の処理となる)には、前回読み出された画像ファイルの次の順にリストに登録されている画像ファイルを読み出すことになる。   Next, in step S <b> 102, the CPU 102 refers to the name of the top image file in the list created in step S <b> 101 and reads the corresponding image file into the RAM 104. In addition, when the process in step S102 is the second time or later (when the process proceeds from step S111 to step S102 and the process in step S102 is executed, the current process in step S102 is the second or later process). In this case, the image files registered in the list in the order of the image files read out last time are read out.

次に、ステップS103における処理と、ステップS104,S105による処理とを並行して行う。なお、ステップS103における処理と、ステップS104,S105による処理とを並行に行うことに限定するものではなく、シリアルに行うようにしても良い。先ずステップS103における処理について説明する。   Next, the process in step S103 and the processes in steps S104 and S105 are performed in parallel. Note that the process in step S103 and the processes in steps S104 and S105 are not limited to being performed in parallel, and may be performed serially. First, the process in step S103 will be described.

ステップS103では、ステップS102で参照した画像ファイル内の領域202内に記録されている撮影情報を解析する。図4は、ステップS103における撮影情報解析処理の詳細を示すフローチャートである。   In step S103, the shooting information recorded in the area 202 in the image file referred to in step S102 is analyzed. FIG. 4 is a flowchart showing details of the photographing information analysis processing in step S103.

先ずステップS200では、ステップS102で参照した画像ファイル内の領域202内に撮影情報が記録されているのか否かをチェックする。一般的にデジタルスチルカメラ109で撮影された撮影画像データには撮影情報が付加されているが、アプリケーションで編集、加工などをするとこの撮影情報が消去される場合がある。   First, in step S200, it is checked whether shooting information is recorded in the area 202 in the image file referred to in step S102. In general, shooting information is added to the shot image data shot by the digital still camera 109, but this shooting information may be deleted when editing or processing is performed by an application.

そしてそのチェックの結果、撮影情報が記録されていなかった場合には処理をステップS207に進め、撮影情報エラーとしてステップS103における処理を終了する。   As a result of the check, if shooting information has not been recorded, the process proceeds to step S207, and the process in step S103 ends as a shooting information error.

一方、ステップS102で参照した画像ファイル内の領域202内に撮影情報が記録されている場合には処理をステップS200からステップS201に進め、この撮影情報から読み出すべき情報をRAM104中の所定のエリアに読み出すために、この所定のエリアをRAM104中に確保する処理を行う。このエリアの確保については、例えばこの撮影情報のデータサイズ分を確保するようにすれば、少なくとも、撮影情報からどれだけの情報を読み出しても、エリア不足にはならない。   On the other hand, if shooting information is recorded in the area 202 in the image file referenced in step S102, the process proceeds from step S200 to step S201, and information to be read from this shooting information is stored in a predetermined area in the RAM 104. In order to read out, a process of securing this predetermined area in the RAM 104 is performed. As for securing the area, for example, if the data size of the photographing information is secured, at least how much information is read from the photographing information, the area does not become insufficient.

ここで、確保できなかった場合には処理をステップS202からステップS207に進め、撮影情報エラーとしてステップS103における処理を終了する。   Here, if it cannot be secured, the process proceeds from step S202 to step S207, and the process in step S103 ends as a shooting information error.

一方、確保できた場合には処理をステップS202からステップS203に進め、撮影情報に含まれている撮影条件を、対応するIDと共に1つ読み出す。ここで、ステップS203において読み出しができなかった場合、即ち、撮影情報に含まれる全てのID、撮影条件を読み出した場合には本フローチャートに従った処理を終了する。   On the other hand, if it can be secured, the process proceeds from step S202 to step S203, and one shooting condition included in the shooting information is read together with the corresponding ID. Here, when reading is not possible in step S203, that is, when all IDs and shooting conditions included in the shooting information are read, the processing according to this flowchart is terminated.

一方、まだ全てのID、撮影条件を読み出していない場合には処理をステップS204に進め、ステップS203で読み出したIDが「撮影情報から読み出すべき撮影条件のID」であるか否かをチェックする。なお、「撮影情報から読み出すべき撮影条件のID」は予め撮影情報IDテーブルとして作成され、2次記憶装置105に保存されており、本処理の前段で予めRAM104にロードしているものとする。そしてこのテーブルを検索し、ステップS203で読み出したIDがこのテーブルに登録されているか否かをチェックする。   On the other hand, if not all IDs and shooting conditions have been read, the process proceeds to step S204, and it is checked whether or not the ID read in step S203 is “ID of shooting conditions to be read from shooting information”. It should be noted that “ID of shooting condition to be read from shooting information” is created in advance as a shooting information ID table, stored in the secondary storage device 105, and loaded in the RAM 104 in advance before this processing. Then, this table is searched, and it is checked whether or not the ID read in step S203 is registered in this table.

ここでは説明を簡単にするためにその一例として、「撮影情報から読み出すべき撮影条件のID」を「0」と「1」とする。即ち図2の例では、「露光」と「ストロボ」の撮影条件が「撮影情報から読み出すべき撮影条件」となる。   Here, in order to simplify the explanation, “0” and “1” are set as “ID of shooting conditions to be read from shooting information” as an example. That is, in the example of FIG. 2, the shooting conditions of “exposure” and “strobe” are “shooting conditions to be read from the shooting information”.

そしてステップS204におけるチェックの結果、ステップS203で読み出したIDが「0」の場合には処理をステップS205に進め、ID=0に対応する撮影条件の情報をこの撮影情報から抽出してステップS201で確保したエリアに読み出す。   If the ID read in step S203 is “0” as a result of the check in step S204, the process proceeds to step S205, and shooting condition information corresponding to ID = 0 is extracted from the shooting information, and in step S201. Read to the reserved area.

また、ステップS204におけるチェックの結果、ステップS203で読み出したIDが「1」の場合には処理をステップS206に進め、ID=1に対応する撮影条件の情報をこの撮影情報から抽出してステップS201で確保したエリアに読み出す。   If the ID read in step S203 is “1” as a result of the check in step S204, the process proceeds to step S206, and shooting condition information corresponding to ID = 1 is extracted from the shooting information. Read to the area secured by.

また、ステップS204におけるチェックの結果、ステップS203で読み出したIDが「0」、「1」の何れでもない場合には処理をステップS203に戻し、次のIDを読み出し、以降の処理を繰り返す。   If the ID read in step S203 is neither “0” nor “1” as a result of the check in step S204, the process returns to step S203, the next ID is read, and the subsequent processes are repeated.

この解析処理では、期待するすべての撮影条件が必ずしもすべて得られるとは限らない。これはデジタルスチルカメラ109の機種によって対応している撮影条件の種類が異なっているからである。このため収集できた撮影条件を利用して後の処理を実行しなければならない。   In this analysis process, not all of the expected imaging conditions are necessarily obtained. This is because the types of shooting conditions that are supported vary depending on the model of the digital still camera 109. For this reason, the subsequent processing must be executed using the captured imaging conditions.

なお、本実施形態では、「撮影情報から読み出すべき撮影条件」を「画像方向」であるとする。従って、画像ファイルのフォーマットがExifに準拠している場合には、撮影情報に含まれる全てのIDのうちID=274を検索し、検索したID=274の撮影条件をステップS201で確保したエリアに読み出すことになる。   In the present embodiment, it is assumed that the “shooting condition to be read from the shooting information” is “image direction”. Therefore, when the format of the image file conforms to Exif, ID = 274 is searched from all the IDs included in the shooting information, and the shooting condition of the searched ID = 274 is set in the area secured in step S201. Will be read.

図3に戻って、次に、ステップS104,S105における処理について説明する。ステップS104では、ステップS102で参照した画像ファイル内の領域203に記録されている撮影画像のデータを読み出し、復号し、更に、画像データがYCCフォーマットである場合にはこれをRGBフォーマットに変換する。   Returning to FIG. 3, the processing in steps S104 and S105 will be described. In step S104, the captured image data recorded in the area 203 in the image file referred to in step S102 is read and decoded. If the image data is in YCC format, it is converted into RGB format.

そして次にステップS105では、復号後の撮影画像(RGBデータ)中で、人の顔を検出する処理を行う。ステップS105における顔検出手段としては、すでに様々な手法が提案されている。   In step S105, a process of detecting a human face in the decoded captured image (RGB data) is performed. Various methods have already been proposed as the face detection means in step S105.

特開2002−183731によれば、入力画像から目領域を検出し、目領域周辺を顔候補領域とする。そして、この顔候補領域に対して、画素毎の輝度勾配、および輝度勾配の重みを算出し、これらの値が、あらかじめ設定されている理想的な顔基準画像の勾配、および勾配の重みと比較した時に、各勾配間の平均角度が所定の閾値以下であった場合、入力画像は顔領域を有すると判定する方法が記載されている。   According to Japanese Patent Laid-Open No. 2002-183731, an eye area is detected from an input image, and the periphery of the eye area is set as a face candidate area. Then, a luminance gradient for each pixel and a luminance gradient weight are calculated for this face candidate region, and these values are compared with a preset ideal face reference image gradient and gradient weight. When the average angle between the gradients is equal to or less than a predetermined threshold, the input image is determined to have a face area.

また、特開2003−30667によれば、まず画像中から肌色領域を検出し、同領域内において、人間の虹彩色画素を検出することにより、目の位置を検出することが可能であるとしている。   According to Japanese Patent Laid-Open No. 2003-30667, it is possible to detect the position of the eyes by first detecting a skin color area from the image and detecting human iris color pixels in the area. .

さらに、特開平8−63597によれば、複数の顔の形状をしたテンプレートと画像とのマッチング度を計算し、マッチング度が最も高いテンプレートを選択し、最も高かったマッチング度があらかじめ定められた閾値以上であれば、選択されたテンプレート内の領域を顔候補領域とする。同テンプレートを用いるこことで、目の位置を検出することが可能であるとしている。   Further, according to Japanese Patent Laid-Open No. 8-63597, the degree of matching between a template having a plurality of face shapes and an image is calculated, the template having the highest matching degree is selected, and the highest matching degree is a predetermined threshold value. If it is above, the area | region in the selected template is made into a face candidate area | region. It is assumed here that the position of the eye can be detected using the template.

さらに、特開2000−105829によれば、まず、鼻画像パターンをテンプレートとし、画像全体、あるいは画像中の指定された領域を走査し最もマッチする位置を鼻の位置として出力する。次に、画像の鼻の位置よりも上の領域を目が存在する領域と考え、目画像パターンをテンプレートとして目存在領域を走査してマッチングをとり、ある閾値よりもマッチ度が大きい画素の集合である目存在候補位置集合を求める。さらに、目存在候補位置集合に含まれる連続した領域をクラスタとして分割し、各クラスタと鼻位置との距離を算出する。その距離が最も短くなるクラスタを目が存在するクラスタと決定することで、器官位置の検出が可能であるとしている。   Further, according to Japanese Patent Laid-Open No. 2000-105829, first, a nose image pattern is used as a template, and the entire image or a specified area in the image is scanned and the most matching position is output as the nose position. Next, the region above the nose position of the image is considered as the region where the eyes exist, and the eye presence region is scanned and matched using the eye image pattern as a template, and a set of pixels having a degree of matching greater than a certain threshold An eye presence candidate position set is obtained. Further, continuous regions included in the eye presence candidate position set are divided as clusters, and the distance between each cluster and the nose position is calculated. It is said that the organ position can be detected by determining the cluster having the shortest distance as the cluster in which the eye exists.

その他、顔および器官位置を検出する方法としては、特開平8-77334、特開2001-216515、特開平5-197793、特開平11-53525、特開2000-132688、特開2000-235648、特開平11-250267、特登録2541688など、数多くの手法が提案されている。   As other methods for detecting the face and organ position, JP-A-8-77334, JP-A-2001-216515, JP-A-5-197793, JP-A-11-53525, JP-A-2000-132688, JP-A-2000-235648, A number of methods such as Kaihei 11-250267 and special registration 2541688 have been proposed.

本実施形態では画像中の顔領域の検出、及び、この領域の画像における位置を求める方法については上記何れの文献による技術を用いても良いし、またそれらを組み合わせた技術を用いても良い。また、上記文献による技術に限定するものではなく、その技術については特に限定するものではない。   In the present embodiment, as a method for detecting a face area in an image and obtaining a position of the area in the image, any of the above-described techniques may be used, or a technique combining them may be used. Moreover, it is not limited to the technique by the said literature, and it does not specifically limit about the technique.

図7A〜図7Cは、デジタルスチルカメラ109を様々な回転角度に配置した場合に撮影された、画像ファイル内の領域203に記録されている撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。   7A to 7C show faces detected by the face detection process in step S105 from captured images recorded in the area 203 in the image file, which are captured when the digital still camera 109 is arranged at various rotation angles. It is a figure which shows an area | region.

図7Aは、デジタルスチルカメラ109を回転させずに(ロール値=0)撮影される撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。   FIG. 7A is a diagram showing a face area detected by the face detection process in step S105 from a photographed image taken without rotating the digital still camera 109 (roll value = 0).

図7Aにおいて701はデジタルスチルカメラ109を回転させずに人を撮影した場合に撮影される撮影画像であって、702はステップS105において検出される顔領域である。また、LTはこの顔領域702の左上隅における座標(原点は撮影画像701の左上隅とする)、RBはこの顔領域702の右下隅における座標を示すもので、顔検出処理で得られた座標である。ここで座標LTを(x1,y1)、座標RBを(x2,y2)とする。   In FIG. 7A, reference numeral 701 denotes a photographed image taken when a person is photographed without rotating the digital still camera 109, and reference numeral 702 denotes a face area detected in step S105. Further, LT indicates the coordinates at the upper left corner of the face area 702 (the origin is the upper left corner of the captured image 701), and RB indicates the coordinates at the lower right corner of the face area 702. The coordinates obtained by the face detection process It is. Here, the coordinate LT is (x1, y1), and the coordinate RB is (x2, y2).

ここで、デジタルスチルカメラ109を回転させずに撮影される撮影画像における顔領域のLT、RBには以下のような関係がある。   Here, the LT and RB of the face area in the photographed image taken without rotating the digital still camera 109 have the following relationship.

x2>x1
y2>y1
このように、デジタルスチルカメラ109を回転させずに撮影を行った場合、デジタルスチルカメラ109に撮影方向を検出する為のセンサが備わっている場合には、撮影画像701に添付される撮影情報中の「画像方向」にはこのセンサの計測結果である「デジタルスチルカメラ109が回転していない」ことを示す「1」なるデータが登録される。例えば画像ファイルがExifに準拠している場合には、撮影情報中のID=274における撮影条件が「画像方向」であるので、274なるIDと共に「画像方向」を示す「1」なるデータを登録する。
x2> x1
y2> y1
As described above, when shooting is performed without rotating the digital still camera 109, when the digital still camera 109 includes a sensor for detecting the shooting direction, the shooting information attached to the shot image 701 is included in the shooting information. In the “image direction”, data “1” indicating that the digital still camera 109 is not rotating is registered as the measurement result of this sensor. For example, if the image file conforms to Exif, the shooting condition at ID = 274 in the shooting information is “image direction”, and therefore data “1” indicating “image direction” is registered together with ID 274. To do.

図7Bは、デジタルスチルカメラ109を反時計方向に90度回転させて(ロール値=270)撮影される撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。   FIG. 7B is a diagram showing a face area detected by the face detection process in step S105 from a photographed image obtained by rotating the digital still camera 109 90 degrees counterclockwise (roll value = 270).

図7Bにおいて703はデジタルスチルカメラ109を反時計方向に90度回転させて撮影される撮影画像であって、704はステップS105において検出される顔領域である。デジタルスチルカメラ109を反時計方向に90度回転させて撮影される撮影画像における顔領域のLT、RBには以下のような関係がある。   In FIG. 7B, reference numeral 703 denotes a photographed image photographed by rotating the digital still camera 109 by 90 degrees counterclockwise, and reference numeral 704 denotes a face area detected in step S105. The LT and RB of the face area in a photographed image photographed by rotating the digital still camera 109 90 degrees counterclockwise has the following relationship.

x2>x1
y2<y1
このように、デジタルスチルカメラ109を反時計方向に90度回転させて撮影を行った場合、デジタルスチルカメラ109に撮影方向を検出する為のセンサが備わっている場合には、撮影画像701に添付される撮影情報中の「画像方向」にはこのセンサの計測結果である「デジタルスチルカメラ109が反時計方向に90度回転している」ことを示す「6」なるデータが登録される。例えば画像ファイルがExifに準拠している場合には、撮影情報中のID=274における撮影条件が「画像方向」であるので、274なるIDと共に「画像方向」を示す「6」なるデータを登録する。
x2> x1
y2 <y1
As described above, when the digital still camera 109 is rotated 90 degrees counterclockwise for shooting, and the digital still camera 109 includes a sensor for detecting the shooting direction, the digital still camera 109 is attached to the shot image 701. In the “image direction” in the captured information, data “6” indicating that the digital still camera 109 is rotated 90 degrees counterclockwise, which is a measurement result of this sensor, is registered. For example, when the image file conforms to Exif, the shooting condition at ID = 274 in the shooting information is “image direction”, and therefore data “6” indicating “image direction” is registered together with ID 274. To do.

図7Cは、デジタルスチルカメラ109を時計方向に90度回転させて(ロール値=90)撮影される撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。   FIG. 7C is a diagram illustrating a face area detected by the face detection process in step S105 from a captured image that is obtained by rotating the digital still camera 109 90 degrees clockwise (roll value = 90).

図7Cにおいて705はデジタルスチルカメラ109を時計方向に90度回転させて撮影される撮影画像であって、706はステップS105において検出される顔領域である。デジタルスチルカメラ109を時計方向に90度回転させて撮影される撮影画像における顔領域のLT、RBには以下のような関係がある。   In FIG. 7C, reference numeral 705 denotes a photographed image taken by rotating the digital still camera 109 by 90 degrees clockwise, and reference numeral 706 denotes a face area detected in step S105. The LT and RB of the face area in the photographed image photographed by rotating the digital still camera 109 by 90 degrees clockwise has the following relationship.

x2<x1
y2>y1
このように、デジタルスチルカメラ109を時計方向に90度回転させて撮影を行った場合、デジタルスチルカメラ109に撮影方向を検出する為のセンサが備わっている場合には、撮影画像701に添付される撮影情報中の「画像方向」にはこのセンサの計測結果である「デジタルスチルカメラ109が時計方向に90度回転している」ことを示す「8」なるデータが登録される。例えば画像ファイルがExifに準拠している場合には、撮影情報中のID=274における撮影条件が「画像方向」であるので、274なるIDと共に「画像方向」を示す「8」なるデータを登録する。
x2 <x1
y2> y1
As described above, when the digital still camera 109 is rotated 90 degrees in the clockwise direction and the image is taken, if the digital still camera 109 has a sensor for detecting the shooting direction, the digital still camera 109 is attached to the shot image 701. The data “8” indicating that the digital still camera 109 is rotated 90 degrees in the clockwise direction is registered in the “image direction” in the shooting information. For example, if the image file conforms to Exif, the shooting condition at ID = 274 in the shooting information is “image direction”, and therefore data “8” indicating “image direction” is registered together with ID 274. To do.

以上のことから以下の2点が分かる。   From the above, the following two points can be understood.


・ 撮影画像から顔領域を検出し、そして検出した顔領域におけるLT、RBの各座標値を参照し、x1,y1,x2,y2の互いの関係が上記関係式の何れに該当するのかをチェックすれば、撮影画像内における被写体の向きが分かるので、その結果、この撮影画像を撮影したデジタルスチルカメラ109の回転方向が分かる。例えば顔領域のLT、RBを参照し、x2>x1,y2<y1である場合には、デジタルスチルカメラ109は反時計方向に90度回転していることが分かる。このように、撮影画像から、デジタルスチルカメラ109の回転方向を求めることができる。

-Detecting a face area from a photographed image, referring to the coordinate values of LT and RB in the detected face area, and checking which of the above relational expressions the relationship between x1, y1, x2, and y2 corresponds to Then, the orientation of the subject in the captured image can be known, and as a result, the rotation direction of the digital still camera 109 that captured the captured image can be determined. For example, referring to LT and RB of the face area, if x2> x1, y2 <y1, it can be seen that the digital still camera 109 is rotated 90 degrees counterclockwise. Thus, the rotation direction of the digital still camera 109 can be obtained from the captured image.


・ デジタルスチルカメラ109に撮影方向を計測するセンサが備わっている場合には、デジタルスチルカメラ109側でセンサの計測結果である撮影方向を示す情報を「画像方向」として上述のようにID=274と共に撮影情報に含め、撮影画像に添付して画像ファイルとして本実施形態に係る画像処理装置101に転送されるので、本実施形態に係る画像処理装置101は、画像ファイル中の撮影情報内の「画像方向」を参照すれば、この撮影画像の撮影時における実際のデジタルスチルカメラ109の方向を獲得することができる。なお、デジタルスチルカメラ109に撮影方向を計測するセンサが備わっていない場合には、撮影情報中の「画像方向」には、デフォルトのデータ「1」が登録されるか、もしくは何も登録されない。

If the digital still camera 109 has a sensor for measuring the shooting direction, the information indicating the shooting direction as the measurement result of the sensor on the digital still camera 109 side is set to “image direction”, and ID = 274 as described above. At the same time, it is included in the shooting information, attached to the shot image, and transferred as an image file to the image processing apparatus 101 according to the present embodiment. Therefore, the image processing apparatus 101 according to the present embodiment includes “ With reference to “image direction”, the actual direction of the digital still camera 109 at the time of photographing of the photographed image can be acquired. When the digital still camera 109 is not provided with a sensor for measuring the shooting direction, default data “1” or nothing is registered in “image direction” in the shooting information.


しかし、従来技術として説明したとおり、種々の原因により、撮影時における実際のデジタルスチルカメラ109の撮影方向と、撮影画像から求められるデジタルスチルカメラ109の撮影方向とが一致しない場合がある。そこで、本実施形態では、撮影情報中の「画像方向」のデータを参照し、このデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とを比較し、異なっている場合には、「画像方向」のデータが示す「撮影方向」と撮影画像から求められる「撮影方向」とが一致するように、ユーザに撮影情報中の「画像方向」のデータ、撮影画像の何れを操作するのかを選択させるためのインターフェースを提供する。

However, as described in the related art, the actual shooting direction of the digital still camera 109 at the time of shooting may not match the shooting direction of the digital still camera 109 obtained from the shot image due to various causes. Therefore, in this embodiment, the “image direction” data in the shooting information is referred to, and the “shooting direction” indicated by this data is compared with the “shooting direction” obtained from the shot image. The user operates either the “image direction” data or the captured image in the shooting information so that the “shooting direction” indicated by the “image direction” data matches the “shooting direction” obtained from the shot image. Provides an interface for selecting whether to do.

よって、図3に戻って、ステップS106では、撮影情報中の「画像方向」のデータを参照し、このデータが示す「撮影方向」(ロール値)と、撮影画像から求められる「撮影方向」(ロール値)とを比較し、一致しているか否かを判定する。そして一致している場合には、処理をステップS111に進め、リストに登録されている全ての画像ファイルについてステップS102以降の処理を行う。処理を行っていないものがある場合には処理をステップS102に戻し、ステップS101で作成したリストに登録されている各画像ファイルのうち、次の画像ファイルについてステップS102以降の処理を行う。   Therefore, referring back to FIG. 3, in step S106, the “image direction” data in the shooting information is referred to, and the “shooting direction” (roll value) indicated by this data and the “shooting direction” ( Roll value) and determine whether or not they match. If they match, the process proceeds to step S111, and the processes in and after step S102 are performed for all image files registered in the list. If there is a file that has not been processed, the process returns to step S102, and among the image files registered in the list created in step S101, the process after step S102 is performed for the next image file.

一方、ステップS106における判定処理で、一致していないと判定した場合には、処理をステップS107に進め、一致していないので、一致するように撮影画像を回転させるのか否かをユーザに選択させるためのインターフェースを表示装置106の表示画面上に表示する。図8Aは、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように撮影画像を回転させるのか否かをユーザに選択させるためのインターフェースの表示例を示す図である。   On the other hand, if it is determined in the determination process in step S106 that they do not match, the process proceeds to step S107, and since it does not match, the user selects whether to rotate the captured image so as to match. The interface for displaying is displayed on the display screen of the display device 106. FIG. 8A allows the user to select whether or not to rotate the shot image so that the “shooting direction” indicated by the “image direction” data in the shooting information matches the “shooting direction” obtained from the shot image. It is a figure which shows the example of a display of the interface for.

同図において801はこのインターフェースとしてのウィンドウを示す。ここでユーザが「はい」のボタン画像を入力装置107を用いて指示すると、処理をステップS107からステップS108に進め、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように、撮影画像を回転させ、回転後の撮影画像を回転前の撮影画像の代わりに保存する。   In the figure, reference numeral 801 denotes a window as this interface. Here, when the user designates a “Yes” button image using the input device 107, the process proceeds from step S 107 to step S 108, the “shooting direction” indicated by the “image direction” data in the shooting information, and the shot image. The photographed image is rotated so that the “photographing direction” obtained from (1) matches, and the photographed image after rotation is stored instead of the photographed image before rotation.

例えば図7Bに示した撮影画像703に添付されている撮影情報中の「画像方向」のデータが登録されていない、もしくは「0」のデータが登録されている場合、ステップS105における顔検出処理によって検出されたLT、RBの座標値の関係を参照するとx2>x1、y2<y1であるので、デジタルスチルカメラ109は反時計方向に90度回転していることになり、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致していないことになる。そこでこのような場合には、撮影画像703を反時計方向に90度回転させることで、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致することになる。撮影画像に添付されている撮影情報中の「画像方向」のデータが登録されていない、もしくは「0」のデータが登録されている場合の例として、例えば、デジタルカメラに角度センサーが装備されていない場合や、センサーが正常に作動しなくて角度を測定できない場合がある。   For example, when the “image direction” data in the shooting information attached to the shot image 703 shown in FIG. 7B is not registered or “0” data is registered, the face detection processing in step S105 is performed. Referring to the relationship between the detected LT and RB coordinate values, since x2> x1 and y2 <y1, the digital still camera 109 is rotated 90 degrees counterclockwise. The “shooting direction” indicated by the “direction” data does not match the “shooting direction” obtained from the shot image. Therefore, in such a case, by rotating the captured image 703 by 90 degrees counterclockwise, the “imaging direction” indicated by the “image direction” data in the imaging information and the “imaging direction” obtained from the captured image are displayed. Will match. As an example of the case where the “image direction” data in the shooting information attached to the shot image is not registered or “0” data is registered, for example, the digital camera is equipped with an angle sensor. In some cases, the angle cannot be measured because the sensor does not work properly.

一方、ユーザが「いいえ」のボタン画像を入力装置107を用いて指示すると、処理をステップS107からステップS109に進め、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように撮影情報中の「画像方向」のデータを変更するのか否かをユーザに選択させるためのインターフェースを表示装置106の表示画面上に表示する。   On the other hand, when the user designates a “NO” button image using the input device 107, the process proceeds from step S107 to step S109, and the “shooting direction” indicated by the “image direction” data in the shooting information and the shot image are displayed. On the display screen of the display device 106, an interface for allowing the user to select whether or not to change the “image direction” data in the shooting information so as to match the “shooting direction” obtained from the above is displayed.

図8Bは、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように撮影情報中の「画像方向」のデータを変更するのか否かをユーザに選択させるためのインターフェースの表示例を示す図である。   FIG. 8B changes the “image direction” data in the shooting information so that the “shooting direction” indicated by the “image direction” data in the shooting information matches the “shooting direction” obtained from the shot image. It is a figure which shows the example of a display of the interface for making a user select whether or not.

同図において802はこのインターフェースとしてのウィンドウを示す。ここでユーザが「はい」のボタン画像を入力装置107を用いて指示すると、処理をステップS109からステップS110に進め、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように、撮影情報中の「画像方向」のデータを変更し、変更前の「画像方向」に上書きする。   In the figure, reference numeral 802 denotes a window as this interface. Here, when the user designates a “Yes” button image using the input device 107, the process proceeds from step S 109 to step S 110, the “shooting direction” indicated by the “image direction” data in the shooting information, and the shot image. The “image direction” data in the shooting information is changed so that the “imaging direction” obtained from the above matches, and the “image direction” before the change is overwritten.

例えば図7Bに示した撮影画像703に添付されている撮影情報中の「画像方向」のデータが登録されていない、もしくは「0」のデータが登録されている場合、LT、RBの座標値の関係を参照するとx2>x1、y2<y1であるので、デジタルスチルカメラ109は反時計方向に90度回転していることになり、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致していないことになる。そこでこのような場合には、撮影情報中の「画像方向」のデータを「6」に変更することで、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致することになる。   For example, when the data of “image direction” in the shooting information attached to the shot image 703 shown in FIG. 7B is not registered or data of “0” is registered, the coordinate values of LT and RB are changed. Referring to the relationship, since x2> x1 and y2 <y1, the digital still camera 109 is rotated 90 degrees counterclockwise, and the “shooting direction” indicated by the “image direction” data in the shooting information. And the “shooting direction” obtained from the shot image do not match. Therefore, in such a case, the “image direction” data in the shooting information is changed to “6” to obtain the “shooting direction” indicated by the “image direction” data in the shooting information and the shot image. The “photographing direction” is the same.

なお本実施形態ではステップS108,S109では元のデータに上書きするようにしているが、上書きするのか否か、しない場合には新たなファイル名で保存するのかをユーザに問い合わせるためのウィンドウを表示装置106の表示画面上に表示するようにしても良い。   In this embodiment, the original data is overwritten in steps S108 and S109, but a window for inquiring the user whether to overwrite or not to save with a new file name is displayed on the display device. It may be displayed on the display screen 106.

また、図3のフローチャートにおいて、ステップS107,S109をまとめて、「撮影情報、撮影画像の何れを変更するのか?」をユーザに選択させるためのインターフェースを表示するようにしても良い。   In the flowchart of FIG. 3, steps S107 and S109 may be combined to display an interface for allowing the user to select “Which image information or captured image to change?”.

図5はこのインターフェースの表示例を示す図である。同図において803がこのインターフェースとしてのウィンドウであり、804,805がそれぞれ「画像を回転させる」ことを選択するためのラジオボタン、「撮影情報を変更させる」ことを選択するためのラジオボタンである。同図ではラジオボタン804が選択されている。   FIG. 5 is a diagram showing a display example of this interface. In the figure, reference numeral 803 denotes a window as this interface, and reference numerals 804 and 805 denote radio buttons for selecting “rotate the image” and radio buttons for selecting “change the shooting information”, respectively. . In the figure, a radio button 804 is selected.

806は上記ラジオボタン804,もしくはラジオボタン805に何れかで選択した方の変更を指示するためのボタン画像である。   Reference numeral 806 denotes a button image for instructing the radio button 804 or the radio button 805 to change whichever is selected.

よってこのインターフェースにおいてユーザが入力装置107を用いてラジオボタン805を指示する(「撮影情報を変更する」を選択する)と、ステップS110における処理を行い、ラジオボタン804を選択する(「撮影画像を回転させる」を選択する)と、ステップS108における処理を行う。   Therefore, when the user instructs the radio button 805 using the input device 107 in this interface (selects “change photographing information”), the processing in step S110 is performed, and the radio button 804 is selected (“captured image”). If "Rotate" is selected), the process in step S108 is performed.

以上の説明により、本実施形態によって、撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致していない場合には、撮影画像、撮影情報中の「画像方向」のデータの何れかを変更し、一致させることができる。またこれにより、撮影情報を元に自動画像補正を行う時に補正の不適合をなくすことが可能になる。   From the above description, according to the present embodiment, when the “shooting direction” indicated by the “image direction” data in the shooting information does not match the “shooting direction” obtained from the shot image, Any of the “image direction” data in the shooting information can be changed to match. This also makes it possible to eliminate correction incompatibility when automatic image correction is performed based on shooting information.

[第2の実施形態]
第1の実施形態では、撮影情報に記録されている撮影条件と、撮像画像から求められる撮影条件とを比較し、一致していなければ何れか一方を変更させるという技術の一例として、この撮影条件を「画像方向」とした場合について説明した。
[Second Embodiment]
In the first embodiment, the imaging condition recorded as the imaging information and the imaging condition obtained from the captured image are compared, and if they do not match, the imaging condition is changed as one example of the technique. In the above description, “image direction” is described.

本実施形態ではこのような技術の別の例として、この撮影条件を「シーン」とした場合について説明する。   In the present embodiment, as another example of such a technique, a case where the shooting condition is “scene” will be described.

なお、本実施形態に係る画像処理装置の基本構成については第1の実施形態と同じであるとする。また、本実施形態に係る画像処理装置が行う処理のフローチャートは基本的には図3に示したフローチャートと同じであるが、ステップS105における画像解析処理、ステップS106における比較対象、ステップS107〜S110における変更内容が異なるのみである。   Note that the basic configuration of the image processing apparatus according to this embodiment is the same as that of the first embodiment. The flowchart of the process performed by the image processing apparatus according to the present embodiment is basically the same as the flowchart shown in FIG. 3, but the image analysis process in step S105, the comparison target in step S106, and the steps in steps S107 to S110. Only the changes are different.

以下、本実施形態に係る画像処理装置が行う処理について説明する。   Hereinafter, processing performed by the image processing apparatus according to the present embodiment will be described.

図6は、本実施形態に係るステップS105における処理のフローチャートである。ステップS401では、先ずステップS104で復号した撮影画像を所定のサイズの画像に縮小し、縮小画像(サムネイル画像)を作成する。本実施形態では、ステップS104で復号した撮影画像の画素数が所定の画素数よりも多い場合に、この画像のサムネイル画像を作成するのであるが、そのサイズは例えば、160画素×120画素とする。なお、サムネイル画像を作成する処理は必須なものではない。   FIG. 6 is a flowchart of the process in step S105 according to the present embodiment. In step S401, first, the captured image decoded in step S104 is reduced to an image of a predetermined size to create a reduced image (thumbnail image). In the present embodiment, when the number of pixels of the captured image decoded in step S104 is larger than the predetermined number of pixels, a thumbnail image of this image is created. The size is, for example, 160 pixels × 120 pixels. . Note that the process of creating a thumbnail image is not essential.

次に、このサムネイル画像に対して色空間変換処理を行う。例えばサムネイル画像がRGB画像データであるとすると、これをYCC(輝度色差)、HSV(Hue:色相、Saturation:彩度、Value:輝度)、XYZ,LAB色空間の何れかの色空間の画像データに変換する。本実施形態では、HSV色空間への変換を行ったとして説明する。   Next, a color space conversion process is performed on the thumbnail image. For example, if the thumbnail image is RGB image data, this is image data in any color space of YCC (luminance color difference), HSV (Hue: hue, Saturation: saturation, Value: luminance), XYZ, or LAB color space. Convert to In the present embodiment, description will be made assuming that conversion to the HSV color space has been performed.

よって、ステップS401では、「HSV色空間におけるサムネイル画像」を生成したことになる。   Therefore, in step S401, a “thumbnail image in the HSV color space” is generated.

次にステップS402では、ステップS401で生成したサムネイル画像から、H成分、V成分についてのヒストグラムを生成する。即ち、H成分の各値(H、S、Vの各成分が8ビットで表現される場合には、値の範囲は0〜255)を有する画素の数、V成分の各値を有する画素の数を示すものを生成する。   In step S402, histograms for the H component and the V component are generated from the thumbnail image generated in step S401. That is, the number of pixels having each value of the H component (the range of values is 0 to 255 when each component of H, S, and V is expressed by 8 bits) and the number of pixels having each value of the V component. Generate something that shows a number.

次にステップS403では、ヒストグラムの解析処理を行う。   In step S403, histogram analysis processing is performed.

先ずV成分について生成したヒストグラムの解析処理について説明する。ここで、ステップS401で生成したサムネイル画像が、図9Aに示した夜景の撮像画像901に基づいて生成されたものである場合、夜景の画像には全体的に黒い部分が多く、また、被写体部分も暗い。従ってステップS401で生成したサムネイル画像に対する輝度成分(V成分)の分布としては、分布902に示す如く、V成分値の低いものに画素数が多くなる。   First, analysis processing of a histogram generated for the V component will be described. Here, if the thumbnail image generated in step S401 is generated based on the captured image 901 of the night view shown in FIG. 9A, the night view image as a whole has a lot of black portions, and the subject portion. Is too dark. Accordingly, as the distribution of the luminance component (V component) with respect to the thumbnail image generated in step S401, as shown in the distribution 902, the number of pixels increases with the low V component value.

図9Bは、ステップS401で生成したサムネイル画像が、図9Aに示した夜景の撮像画像901に基づいて生成されたものである場合に、このサムネイル画像から求めた、V成分についてのヒストグラムの一例を示す図である。図9Aは、夜景の撮像画像901の一例を示す図である。図9Bにおいて横軸がV成分値で、同図の場合、V成分が8ビットで表現されているので、V成分値の範囲は0〜255となっている。縦軸は画素の個数を表しており、同図のヒストグラムにより、各V成分値を有する画素の数を得ることができる。   FIG. 9B shows an example of a histogram for the V component obtained from the thumbnail image when the thumbnail image generated in step S401 is generated based on the captured image 901 of the night view shown in FIG. 9A. FIG. FIG. 9A is a diagram illustrating an example of a captured image 901 of a night view. In FIG. 9B, the horizontal axis is the V component value, and in the case of FIG. 9B, the V component value is represented by 8 bits, and therefore the range of the V component value is 0 to 255. The vertical axis represents the number of pixels, and the number of pixels having each V component value can be obtained from the histogram of FIG.

よって、ステップS403では、ステップS401で生成したサムネイル画像が夜景の画像であるのか否かを判定するために、このヒストグラムを参照し、比較的輝度値の低い範囲内のV成分値(例えばV成分値が0〜100の範囲)を有する画素の個数の合計が所定個数以上であるか否かをチェックする。なお、ステップS401で生成したサムネイル画像が夜景の画像であるのか否かを判定するために、ヒストグラムをどのようにして用いるのかについては特に限定するものではなく、このほかにも例えば、ヒストグラムの形状によって判定するようにしても良い。   Therefore, in step S403, in order to determine whether or not the thumbnail image generated in step S401 is a night scene image, this histogram is referred to, and a V component value (for example, a V component) within a relatively low luminance value range is referred to. It is checked whether or not the total number of pixels having a value in the range of 0 to 100 is greater than or equal to a predetermined number. Note that there is no particular limitation on how the histogram is used to determine whether or not the thumbnail image generated in step S401 is a night scene image. For example, the shape of the histogram is not limited. You may make it determine by.

一方、ステップS401で生成したサムネイル画像が、図7Aに示したような人物の拡大写真といったポートレートに基づいて生成されたものである場合、このサムネイル画像には、肌色成分が多く含まれることになる。従ってこのようなサムネイル画像について生成されたH成分のヒストグラムを参照すれば、肌色成分を有する画素の数が多い。   On the other hand, when the thumbnail image generated in step S401 is generated based on a portrait such as an enlarged photograph of a person as shown in FIG. 7A, the thumbnail image contains a lot of skin color components. Become. Therefore, referring to the H component histogram generated for such a thumbnail image, the number of pixels having a flesh color component is large.

よって、ステップS403では、ステップS401で生成したサムネイル画像がポートレートであるのか否かを判定するために、H成分のヒストグラムを参照し、肌色成分のH成分値を有する画素の個数の合計が所定個数以上であるか否かをチェックする。なお、ステップS401で生成したサムネイル画像がポートレートであるのか否かを判定するために、ヒストグラムをどのようにして用いるのかについては特に限定するものではなく、このほかにも例えば、ヒストグラムの形状によって判定するようにしても良い。   Therefore, in step S403, in order to determine whether the thumbnail image generated in step S401 is a portrait, the H component histogram is referred to, and the total number of pixels having the H component value of the skin color component is predetermined. Check if it is more than the number. Note that there is no particular limitation on how the histogram is used to determine whether or not the thumbnail image generated in step S401 is a portrait. For example, depending on the shape of the histogram It may be determined.

このように、ステップS403では、V成分のヒストグラムを用いて撮影画像が夜景の画像であるか否か、H成分のヒストグラムを用いて撮影画像がポートレートであるか否かをチェックすることができる。   As described above, in step S403, it is possible to check whether the captured image is a night scene image using the V component histogram and whether the captured image is a portrait using the H component histogram. .

そして処理をステップS404に進め、撮影画像が夜景の画像である場合には処理をステップS405に進め、その旨を示すデータをRAM104中の所定のエリアに記録する。   Then, the process proceeds to step S404. If the captured image is a night scene image, the process proceeds to step S405, and data indicating that is recorded in a predetermined area in the RAM 104.

また、撮影画像がポートレートである場合には処理をステップS404,S406を介してステップS407に進め、その旨を示すデータをRAM104中の所定のエリアに記録する。   If the captured image is a portrait, the process proceeds to steps S407 via steps S404 and S406, and data indicating that fact is recorded in a predetermined area in the RAM 104.

そして本フローチャートに従った処理を終了し、処理をステップS106に進める。   And the process according to this flowchart is complete | finished and a process is advanced to step S106.

また、本実施形態に係るステップS103における処理について説明する。本実施形態では撮影情報から、「シーン」に係る撮影条件を抽出する。従って、撮影情報中の「撮影モード」を対象にする。画像ファイルがExifに準拠している場合には、Tag(ID)=34850の露出プログラム(ExposureProgram)を参照する。   Further, the process in step S103 according to the present embodiment will be described. In the present embodiment, shooting conditions related to “scene” are extracted from the shooting information. Therefore, the “shooting mode” in the shooting information is targeted. If the image file conforms to Exif, an exposure program (ExposureProgram) with Tag (ID) = 34850 is referred to.

Tag(ID)=34850の露出プログラム(ExposureProgram)には、カメラの撮影時に使用した露出プログラムのクラスを示す値が格納されている。例えば値が3のときは露出優先、7はポートレートモードを示す。   In the exposure program (ExposureProgram) with Tag (ID) = 34850, a value indicating the class of the exposure program used at the time of shooting by the camera is stored. For example, a value of 3 indicates exposure priority, and 7 indicates a portrait mode.

さらにはメーカ独自のExif情報を使用できればさらに詳細な「シーン」を解析することができる。例えばフラッシュの動作モードがある。フラッシュの動作モードがスローシンクロモードであれば夜景を撮影したものと判断できる。   Furthermore, if the manufacturer's unique Exif information can be used, a more detailed “scene” can be analyzed. For example, there is a flash operation mode. If the operation mode of the flash is slow sync mode, it can be determined that the night view was taken.

よってステップS103では、「シーン」に係る情報(換言すれば、「シーン」を特定できる情報)を撮影情報から検索して読み出す。その処理については基本的には図4に示したフローチャートに従った処理となる。尚その際には撮影情報IDテーブルには、「シーン」に係る情報のIDが登録されており、ステップS203で読み出したIDがこの登録されているIDと一致した場合には、このIDに対応する情報(即ち、「シーン」に係る情報)をステップS201で確保したエリアに読み出す。   Therefore, in step S103, information related to the “scene” (in other words, information that can specify the “scene”) is retrieved from the shooting information and read out. The processing is basically processing according to the flowchart shown in FIG. In this case, the ID of information related to the “scene” is registered in the shooting information ID table, and if the ID read in step S203 matches the registered ID, the ID corresponds to this ID. Information (ie, information related to “scene”) is read out to the area secured in step S201.

図3に戻って、次にステップS106では、ステップS103で読み出した「シーン」を特定する情報と、ステップS105において撮影画像から求めた「シーン」を特定する情報とを比較し、互いに同じシーンを示しているのか否かをチェックする(ステップS106)。   Returning to FIG. 3, in step S106, the information specifying the “scene” read in step S103 is compared with the information specifying the “scene” obtained from the captured image in step S105, and the same scene is compared. It is checked whether or not it is shown (step S106).

そして一致している場合には第1の実施形態と同じである。一致していない場合には処理をステップS107に進め、第1の実施形態と同様に、画像を変更するか否かをユーザに選択させるためのインターフェースを表示し、ユーザが「はい」のボタン画像を入力装置107を用いて指示すると、処理をステップS107からステップS108に進め、ステップS103で読み出した「シーン」を特定する情報と、ステップS105において撮影画像から求めた「シーン」を特定する情報とが一致するように、撮影画像に対して補正処理を行う。例えば、ステップS103で読み出した「シーン」を特定する情報が「夜景の画像ではない(例えばポートレート)」ことを示す情報であって、ステップS105において撮影画像から求めた「シーン」を特定する情報が「夜景を示す画像」であることを示す場合には、撮影画像の輝度を上げる為にこの撮影画像に対してトーン補正を行うようにしたりすれば良いし、逆に、ステップS103で読み出した「シーン」を特定する情報が「夜景を示す画像」であることを示す情報であって、ステップS105において撮影画像から求めた「シーン」を特定する情報が「夜景の画像ではない(例えばポートレート)」である場合には、撮影画像における肌色成分の彩度を上げる彩度補正を行うようにすれば良い。なお、撮影画像に対する処理はこれに限定するものではない。   And when it corresponds, it is the same as 1st Embodiment. If they do not match, the process proceeds to step S107, and an interface for allowing the user to select whether or not to change the image is displayed as in the first embodiment. Is input using the input device 107, the process proceeds from step S107 to step S108. Information for specifying the “scene” read in step S103 and information for specifying the “scene” obtained from the captured image in step S105 are provided. Correction processing is performed on the captured image so that the two match. For example, the information specifying the “scene” read in step S103 is information indicating that the image is not a night scene image (for example, portrait), and the information specifying the “scene” obtained from the captured image in step S105. Indicates that it is an “image showing a night view”, tone correction may be performed on the captured image in order to increase the brightness of the captured image. Conversely, the image is read in step S103. The information specifying the “scene” is information indicating that the “image showing the night view”, and the information specifying the “scene” obtained from the captured image in step S105 is not the image of the night view (for example, portrait ) ”, Saturation correction for increasing the saturation of the skin color component in the photographed image may be performed. In addition, the process with respect to a picked-up image is not limited to this.

以上の処理によって、撮影情報に記録されている「シーン」を特定する情報と、実際に画像中のシーンとが一致しているのか否かをチェックすることができ、一致していない場合には、この情報、もしくは画像の何れを変更するのかをユーザに選択させることができる。   With the above processing, it is possible to check whether or not the information for identifying the “scene” recorded in the shooting information matches the scene in the image. This information or the image can be changed by the user.

なお、画像の変更はユーザが行うようにしてもよく、その場合、ステップS108で画像の色成分などを変更するためのGUIを表示装置106の表示画面上に表示するようにしても良い。   The image may be changed by the user, and in that case, a GUI for changing the color component of the image may be displayed on the display screen of the display device 106 in step S108.

また、本実施形態では、撮影画像がポートレートであるか否かについてのチェックにはH成分のヒストグラムを用いていたが、第1の実施形態で説明した顔検出処理を行い、顔領域として求まった矩形のサイズが撮影画像全体のサイズに比べて所定の割合以上(例えば75%以上)であれば、ポートレートであると判定するようにしても良い。   In this embodiment, the H component histogram is used to check whether the captured image is a portrait. However, the face detection process described in the first embodiment is performed to obtain a face area. If the size of the rectangle is equal to or greater than a predetermined ratio (for example, 75% or more) as compared with the size of the entire captured image, it may be determined that the portrait.

また本実施形態ではシーンが夜景、ポートレートの何れかであったが、これ以外のシーンであっても良いことはいうまでもない。   In this embodiment, the scene is either a night view or a portrait, but it goes without saying that the scene may be other than this.

また、以上の実施形態では、撮影画像から得られる情報と、この撮影画像に添付されている撮影情報から得られる情報とを比較し、一致していない場合には一致させるべく、撮影情報、撮影画像の何れかを変更するという技術の一例として、画像方向やシーンを用いたが、比較する対象については特に限定するものではない。また、この「一致」については、単に比較対象の情報が示す値が全く同じであるということに限定するものではなく、ある許容範囲内で同じであっても良い。   In the above embodiment, the information obtained from the photographed image is compared with the information obtained from the photograph information attached to the photographed image. As an example of the technique of changing any of the images, the image direction and the scene are used, but the object to be compared is not particularly limited. Further, this “match” is not limited to the fact that the values indicated by the information to be compared are exactly the same, and may be the same within a certain allowable range.

また、比較対象の情報が意味するところでもって一致するか否かをチェックするようにしても良い。   Further, it may be checked whether or not the information to be compared matches in the meaning.

[その他の実施形態]
本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体(または記憶媒体)を、カメラのCPUやMPUが記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。
[Other Embodiments]
An object of the present invention is to read and execute a program code stored in a recording medium by a camera CPU or MPU from a recording medium (or storage medium) that records a program code of software that realizes the functions of the above-described embodiments. Needless to say, this is achieved. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention.

また、カメラが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、カメラ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, by executing the program code read by the camera, not only the functions of the above-described embodiments are realized, but also an operating system (OS) operating on the camera based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

さらに、記録媒体から読み出されたプログラムコードが、カメラに挿入された機能拡張カードやカメラに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Furthermore, after the program code read from the recording medium is written in a memory provided in a function expansion card inserted into the camera or a function expansion unit connected to the camera, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.

本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャート(機能構成)に対応するプログラムコードが格納されることになる。   When the present invention is applied to the recording medium, program code corresponding to the flowchart (functional configuration) described above is stored in the recording medium.

本発明の第1の実施形態に係る画像処理装置の基本構成を示すブロック図である。1 is a block diagram illustrating a basic configuration of an image processing apparatus according to a first embodiment of the present invention. 本発明の第1の実施形態に係る撮影画像のフォーマットを示す図である。It is a figure which shows the format of the picked-up image which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る画像処理装置が行う処理のフローチャートである。3 is a flowchart of processing performed by the image processing apparatus according to the first embodiment of the present invention. ステップS103における撮影情報解析処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the imaging | photography information analysis process in step S103. 「撮影情報、撮影画像の何れを変更するのか?」をユーザに選択させるためのインターフェースの表示例を示す図である。It is a figure which shows the example of a display of the interface for making a user select "Which image information and a captured image should be changed?" 本発明の第1の実施形態に係るステップS105における処理のフローチャートである。It is a flowchart of the process in step S105 which concerns on the 1st Embodiment of this invention. デジタルスチルカメラ109を回転させずに(ロール値=0)撮影される撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。It is a figure which shows the face area | region detected by the face detection process in step S105 from the picked-up image image | photographed without rotating the digital still camera 109 (roll value = 0). デジタルスチルカメラ109を反時計方向に90度回転させて(ロール値=270)撮影される撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。It is a figure which shows the face area | region detected by the face detection process in step S105 from the picked-up image imaged by rotating the digital still camera 109 90 degree | times counterclockwise (roll value = 270). デジタルスチルカメラ109を時計方向に90度回転させて(ロール値=90)撮影される撮影画像からステップS105における顔検出処理によって検出された顔領域を示す図である。It is a figure which shows the face area | region detected by the face detection process in step S105 from the picked-up image imaged by rotating the digital still camera 109 90 degree | times clockwise (roll value = 90). 撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように撮影画像を回転させるのか否かをユーザに選択させるためのインターフェースの表示例を示す図である。An interface for allowing the user to select whether or not to rotate the shot image so that the “shooting direction” indicated by the “image direction” data in the shooting information matches the “shooting direction” obtained from the shot image. It is a figure which shows the example of a display. 撮影情報中の「画像方向」のデータが示す「撮影方向」と、撮影画像から求められる「撮影方向」とが一致するように撮影情報中の「画像方向」のデータを変更するのか否かをユーザに選択させるためのインターフェースの表示例を示す図である。Whether or not to change the "image direction" data in the shooting information so that the "shooting direction" indicated by the "image direction" data in the shooting information matches the "shooting direction" obtained from the shot image It is a figure which shows the example of a display of the interface for making a user select. 夜景の撮像画像901の一例を示す図である。It is a figure which shows an example of the captured image 901 of a night view. ステップS401で生成したサムネイル画像が、図9Aに示した夜景の撮像画像901に基づいて生成されたものである場合に、このサムネイル画像から求めた、V成分についてのヒストグラムの一例を示す図である。FIG. 9B is a diagram showing an example of a histogram for a V component obtained from the thumbnail image when the thumbnail image generated in step S401 is generated based on the captured image 901 of the night view shown in FIG. 9A. .

Claims (5)

撮影画像に添付された、当該撮影画像の撮影時における撮影条件を示す情報から、当該撮影画像を撮影した撮影装置の撮影時におけるロールを示す撮影ロール角情報を抽出する抽出工程と、
前記撮影画像から顔を検出する検出工程と、
前記検出工程で検出した顔の、前記撮影画像内におけるロール方向の傾斜を検出し、検出した傾斜に基づいて、前記撮影画像を撮影した撮影装置の撮影時におけるロール、計算ロール角情報として求める計算工程と、
前記撮影ロール角情報と前記計算ロール角情報とを比較する比較工程と、
前記比較工程による比較結果、前記撮影ロール角情報と前記計算ロール角情報とが一致していない場合には、前記撮影ロール角情報を前記計算ロール角情報と一致するように変更する変更工程と
を備えることを特徴とする画像処理方法。
An extraction step for extracting shooting roll angle information indicating a roll angle at the time of shooting of the shooting apparatus that shot the shot image from information indicating shooting conditions at the time of shooting the shot image attached to the shot image;
A detection step of detecting a face from the captured image;
As the calculated roll angle information, the roll angle at the time of photographing of the photographing device that photographed the photographed image based on the detected tilt of the face detected in the detection step is detected in the roll direction in the photographed image. The desired calculation process;
A comparison step of comparing the shooting roll angle information with the calculated roll angle information ;
As a result of the comparison in the comparison step, when the shooting roll angle information and the calculated roll angle information do not match, the changing step of changing the shooting roll angle information to match the calculated roll angle information ; An image processing method comprising:
前記検出工程では前記撮影画像から前記顔を検出する際に、前記顔を包含し且つ前記顔の前記撮影画像内における傾斜に伴って傾斜している矩形領域を求め、
前記計算工程では、前記矩形領域において対向する2隅の座標値の大小関係を前記傾斜として検出することを特徴とする請求項に記載の画像処理方法。
In the detection step, when the face is detected from the captured image, a rectangular region that includes the face and is inclined with an inclination in the captured image of the face is obtained.
The image processing method according to claim 1 , wherein in the calculation step, a magnitude relationship between coordinate values of two corners facing each other in the rectangular region is detected as the inclination .
撮影画像に添付された、当該撮影画像の撮影時における撮影条件を示す情報から、当該撮影画像を撮影した撮影装置の撮影時におけるロールを示す撮影ロール角情報を抽出する抽出手段と、
前記撮影画像から顔を検出する検出手段と、
前記検出手段で検出した顔の、前記撮影画像内におけるロール方向の傾斜を検出し、検出した傾斜に基づいて、前記撮影画像を撮影した撮影装置の撮影時におけるロール、計算ロール角情報として求める計算手段と、
前記撮影ロール角情報と前記計算ロール角情報とを比較する比較手段と、
前記比較手段による比較結果、前記撮影ロール角情報と前記計算ロール角情報とが一致していない場合には、前記撮影ロール角情報を前記計算ロール角情報と一致するように変更する変更手段と
を備えることを特徴とする画像処理装置。
Extraction means for extracting shooting roll angle information indicating a roll angle at the time of shooting of the shooting apparatus that shot the shot image from information attached to the shot image and indicating shooting conditions at the time of shooting the shot image;
Detecting means for detecting a face from the captured image;
The roll angle of the face detected by the detection means in the roll image in the photographed image is detected, and the roll angle at the time of photographing of the photographing device that photographed the photographed image based on the detected tilt is calculated roll angle information. A calculation means to obtain;
Comparison means for comparing the shooting roll angle information and the calculated roll angle information ;
A change means for changing the shooting roll angle information to match the calculated roll angle information when the shooting roll angle information and the calculated roll angle information do not match as a result of the comparison by the comparing means; An image processing apparatus comprising:
前記検出手段では前記撮影画像から前記顔を検出する際に、前記顔を包含し且つ前記顔の前記撮影画像内における傾斜に伴って傾斜している矩形領域を求め、
前記計算手段では、前記矩形領域において対向する2隅の座標値の大小関係を前記傾斜として検出することを特徴とする請求項に記載の画像処理装置
When the detection means detects the face from the captured image, a rectangular region that includes the face and is inclined with the inclination of the face in the captured image is obtained.
The image processing apparatus according to claim 3 , wherein the calculation unit detects a magnitude relationship between coordinate values of two corners facing each other in the rectangular area as the inclination .
コンピュータに請求項1又は請求項に記載の画像処理方法を実行させるためのプログラム。 A program for causing a computer to execute the image processing method according to claim 1 or 2 .
JP2004294268A 2004-10-06 2004-10-06 Image processing method, image processing apparatus, and computer program Expired - Fee Related JP4366286B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004294268A JP4366286B2 (en) 2004-10-06 2004-10-06 Image processing method, image processing apparatus, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004294268A JP4366286B2 (en) 2004-10-06 2004-10-06 Image processing method, image processing apparatus, and computer program

Publications (3)

Publication Number Publication Date
JP2006109175A JP2006109175A (en) 2006-04-20
JP2006109175A5 JP2006109175A5 (en) 2007-11-22
JP4366286B2 true JP4366286B2 (en) 2009-11-18

Family

ID=36378362

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004294268A Expired - Fee Related JP4366286B2 (en) 2004-10-06 2004-10-06 Image processing method, image processing apparatus, and computer program

Country Status (1)

Country Link
JP (1) JP4366286B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4888132B2 (en) * 2007-01-25 2012-02-29 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP4992519B2 (en) * 2007-04-02 2012-08-08 セイコーエプソン株式会社 Information processing method, information processing apparatus, and program
JP2008273171A (en) * 2007-04-04 2008-11-13 Seiko Epson Corp Information processing method, information processing device, and program
JP2008284868A (en) * 2007-04-20 2008-11-27 Seiko Epson Corp Printing method, printer, and program
JP6232839B2 (en) * 2013-08-26 2017-11-22 株式会社リコー REPRODUCTION SYSTEM, REPRODUCTION CONTROL SYSTEM, INFORMATION TERMINAL, DISPLAY DEVICE, REPRODUCTION CONTROL PROGRAM, REPRODUCTION PROGRAM, AND REPRODUCTION METHOD

Also Published As

Publication number Publication date
JP2006109175A (en) 2006-04-20

Similar Documents

Publication Publication Date Title
US7940965B2 (en) Image processing apparatus and method and program storage medium
US20040233301A1 (en) Digital camera
US7756343B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
JP4285290B2 (en) Image processing apparatus, image processing method, and program
US7848588B2 (en) Method and apparatus for judging direction of blur and computer-readable recording medium storing a program therefor
US20050062856A1 (en) Camera equipped with red-eye correction feature
JP5127592B2 (en) Image processing apparatus, image processing method, program, and computer-readable recording medium
US20050179780A1 (en) Face detecting apparatus and method
US20020080251A1 (en) Digital imaging device, image processing device, digital imaging method, and image processing program
EP1292108A2 (en) Image processing apparatus for print process of photographed image
US20070070440A1 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
JP2008022240A (en) Photographing device, image processor, image file generating method, image processing method, and image processing program
JPH11127323A (en) Image memory device, digital camera, image processing system, data processing method for image processing system, and storage medium storing computer-readable program
CN101151639A (en) Image processing apparatus and image processing method
JP4618153B2 (en) Image processing apparatus, digital camera, image data structure, printing apparatus with automatic color correction function, method for generating captured image with face object information, and color correction method
US20070014483A1 (en) Apparatus, method and program for image processing
US20060115148A1 (en) Similar image extraction device, similar image extraction method, and similar image extraction program
JP4366286B2 (en) Image processing method, image processing apparatus, and computer program
JP2005151130A (en) Device and method for outputting image, storage medium, and program
JP4760044B2 (en) Determination of main subject in image
US7609425B2 (en) Image data processing apparatus, method, storage medium and program
JP4290080B2 (en) Image processing apparatus, image processing method, and computer program
JP4336492B2 (en) Image data processing device
JP2004054201A (en) Controller for photographing device, photographing device, and program
JP2006048223A (en) Image processor, image processing method and computer program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071003

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071003

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20071003

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090501

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090511

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090708

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090807

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090824

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

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130828

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees