JP2010072761A - Image processing device, image processing method, and program - Google Patents

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

Info

Publication number
JP2010072761A
JP2010072761A JP2008237183A JP2008237183A JP2010072761A JP 2010072761 A JP2010072761 A JP 2010072761A JP 2008237183 A JP2008237183 A JP 2008237183A JP 2008237183 A JP2008237183 A JP 2008237183A JP 2010072761 A JP2010072761 A JP 2010072761A
Authority
JP
Japan
Prior art keywords
image processing
image
face
image data
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008237183A
Other languages
Japanese (ja)
Other versions
JP5336798B2 (en
JP2010072761A5 (en
Inventor
Kiyoshi Kusama
澄 草間
Naoki Matsuki
直紀 松木
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 JP2008237183A priority Critical patent/JP5336798B2/en
Priority to US12/550,058 priority patent/US8699760B2/en
Publication of JP2010072761A publication Critical patent/JP2010072761A/en
Publication of JP2010072761A5 publication Critical patent/JP2010072761A5/ja
Application granted granted Critical
Publication of JP5336798B2 publication Critical patent/JP5336798B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing technology for executing distortion aberration correction processing without omission of a subject's face or non-detection of the face. <P>SOLUTION: The image processing device includes an image processing means which performs image processing with shape change of the outer edge of image data; a face detection means which detects a face area included in the image data; a comparison means which compares face detection results related to the image data before and after the image processing; and a parameter change means which changes a parameter of the image processing according to the comparison result by the comparison means. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、デジタル画像データの画像処理装置および画像処理方法に関するものである。   The present invention relates to an image processing apparatus and an image processing method for digital image data.

近年、デジタルカメラの性能向上により、撮影される画像の解像度は非常に高くなり、銀塩写真に勝るとも劣らない高品質の写真画像を得ることが可能となった。撮影した画像は、パーソナルコンピュータ等に搭載される画像処理アプリケーションを使用して閲覧したり、画像編集処理を施したりすることができる。   In recent years, due to the improvement in performance of digital cameras, the resolution of captured images has become very high, and it has become possible to obtain high-quality photographic images that are not inferior to silver halide photographs. The photographed image can be viewed using an image processing application installed in a personal computer or the like, or subjected to image editing processing.

一般に、カメラで撮影した画像には、レンズの歪曲収差に起因する幾何学的な歪みが生ずる。この歪みを補正するため、撮影レンズなどの撮影時情報を利用して、収差補正を行うための画像処理アプリケーションも登場している。このような歪曲収差補正処理を行うことで、より均質で高画質な画像を得ることができる。   In general, geometric distortion caused by lens distortion occurs in an image taken by a camera. In order to correct this distortion, an image processing application for correcting aberration using information at the time of shooting such as a shooting lens has also appeared. By performing such distortion correction processing, a more uniform and high-quality image can be obtained.

図2は歪曲収差補正処理を示し、(a)は樽形に歪んだ画像を補正する場合、(b)は糸巻形に歪んだ画像を補正する場合をそれぞれ表している。   2A and 2B show distortion aberration correction processing. FIG. 2A shows a case where an image distorted in a barrel shape is corrected, and FIG. 2B shows a case where an image distorted in a pincushion shape is corrected.

歪曲収差補正処理は、画素位置の移動を伴う補正であるため、画像の外縁の形状も変化する。これに対して、画像の外縁の形状は一般的に矩形状である。そこで、歪曲収差補正処理後に画像を最大サイズの矩形あるいは、撮影したカメラのアスペクト比にトリミングすることにより周辺部の画像を切り取って矩形状の画像とするのが一般的である(例えば、特許文献1参照)。
特開2007−129587号公報
Since the distortion correction process is a correction involving movement of the pixel position, the shape of the outer edge of the image also changes. On the other hand, the outer edge shape of the image is generally rectangular. In view of this, it is common to trim a peripheral image by trimming the image to the maximum size rectangle or the aspect ratio of the photographed camera after the distortion correction processing (see, for example, Patent Documents). 1).
JP 2007-129487 A

しかしながら、周辺部に人の顔が写っている写真を歪曲収差補正処理後にトリミングした場合、レンズの幾何学的歪みは正しく補正されるが、被写体の顔の一部が欠けてしまうことや顔の全部が切り取られてしまうことがある。例えば、画面の端部に被写体の顔がある場合に、このトリミングによって顔の一部が欠けてしまう場合がある(図3参照)。   However, if a photograph of a human face in the periphery is trimmed after distortion correction processing, the geometric distortion of the lens is corrected correctly, but the subject's face may be missing or Sometimes everything is cut off. For example, when there is a face of the subject at the edge of the screen, a part of the face may be lost due to this trimming (see FIG. 3).

本発明は、上記課題に鑑みてなされ、歪曲収差補正処理を実行する際に画像中の被写体の顔が欠けたり、顔が検出できなくなることを防ぐ画像処理技術を実現する。   The present invention is made in view of the above problems, and realizes an image processing technique for preventing a face of a subject in an image from being lost or being unable to be detected when executing distortion correction processing.

上記課題を解決するために、本発明の画像処理装置は、画像データの外縁の形状変化を伴う画像処理を行う画像処理手段と、画像データに含まれる顔領域を検出する顔検出手段と、前記画像処理の前後の画像データに関する顔検出結果を比較する比較手段と、前記比較手段による比較結果に応じて、前記画像処理のパラメータを変更するパラメータ変更手段と、を有する。   In order to solve the above-described problems, an image processing apparatus according to the present invention includes an image processing unit that performs image processing with a change in shape of an outer edge of image data, a face detection unit that detects a face area included in image data, Comparing means for comparing face detection results relating to image data before and after image processing, and parameter changing means for changing parameters of the image processing according to the comparison result by the comparing means.

また、本発明の画像処理方法は、画像データの外縁の形状変化を伴う画像処理を行う画像処理工程と、画像データに含まれる顔領域を検出する顔検出工程と、前記画像処理の前後の画像データに関する顔検出結果を比較する比較工程と、前記比較工程による比較結果に応じて、前記画像処理のパラメータを変更するパラメータ変更工程と、を有する。   The image processing method of the present invention includes an image processing step for performing image processing accompanied by a shape change of the outer edge of the image data, a face detection step for detecting a face area included in the image data, and images before and after the image processing. A comparison step of comparing face detection results relating to data, and a parameter changing step of changing the parameters of the image processing in accordance with the comparison result of the comparison step.

本発明によれば、歪曲収差補正処理を実行する際に画像中の被写体の顔が欠けたり、顔が検出できなくなることを防ぐことができる。   According to the present invention, it is possible to prevent the face of the subject in the image from being lost or the face from becoming undetectable when performing the distortion correction process.

以下に、添付図面を参照して本発明を実施するための最良の形態について詳細に説明する。   The best mode for carrying out the present invention will be described below in detail with reference to the accompanying drawings.

尚、以下に説明する実施の形態は、本発明の実現手段としての一例であり、本発明が適用される装置の構成や各種条件によって適宜修正又は変更されるべきものであり、本発明は以下の実施の形態に限定されるものではない。   The embodiment described below is an example as means for realizing the present invention, and should be appropriately modified or changed according to the configuration and various conditions of the apparatus to which the present invention is applied. It is not limited to the embodiment.

[第1の実施形態]
図1は、本発明に係る実施形態の画像処理装置の構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to an embodiment of the present invention.

図1において、CPU101は、システム全体の動作を統括制御し、一次記憶部102に格納されたプログラムなどを実行する。   In FIG. 1, a CPU 101 performs overall control of the overall system operation, and executes a program stored in the primary storage unit 102.

一次記憶部102は主にメモリであり、二次記憶部103に記憶されたプログラムなどを読み込んで格納する。   The primary storage unit 102 is mainly a memory, and reads and stores programs stored in the secondary storage unit 103.

二次記憶部103は、例えばハードディスクなどが該当する。一次記憶部102の容量は二次記憶部103の容量より小さく、一次記憶部102に格納しきれないプログラムやデータなどは二次記憶部103に格納される。また、長時間記憶しておく必要があるデータなども二次記憶部103に格納される。本実施形態の処理手順を実現するようなプログラムは二次記憶部103に格納され、プログラム実行時に一次記憶部102に読み出して、CPU101が実行する。   The secondary storage unit 103 corresponds to, for example, a hard disk. The capacity of the primary storage unit 102 is smaller than the capacity of the secondary storage unit 103, and programs and data that cannot be stored in the primary storage unit 102 are stored in the secondary storage unit 103. Data that needs to be stored for a long time is also stored in the secondary storage unit 103. A program that realizes the processing procedure of the present embodiment is stored in the secondary storage unit 103, read to the primary storage unit 102 when the program is executed, and executed by the CPU 101.

入力デバイス104は、例えばユーザ操作を受け付けるマウスやキーボードなどが該当し、プログラムなどに割り込み信号を送るために用いられる。   The input device 104 corresponds to, for example, a mouse or a keyboard that accepts a user operation, and is used to send an interrupt signal to a program or the like.

出力デバイス105は、例えば表示装置としてのモニタやプリンタなどが該当する。   The output device 105 corresponds to, for example, a monitor or a printer as a display device.

読込デバイス106は、CCDなどの撮像素子により生成された画像データを直接又は間接的に一次記憶部102や二次記憶部103に対して書き込み/読み出しを行う。   The reading device 106 writes / reads image data generated by an image sensor such as a CCD directly or indirectly to / from the primary storage unit 102 or the secondary storage unit 103.

特性データ供給部107は、不図示のメモリを有する。このメモリは、各種レンズに応じたレンズ特性の情報、具体的には撮影レンズに対応した補正係数を格納している。後述する歪曲収差補正処理は、補正関数を予め定めておき、補正関数に特性データ供給部107から読み出した補正係数を適用することで補正量を算出し、補正量に応じて画像を変形して、画像の外縁の形状変化を伴う画像処理である。なお、レンズ特性は特性データ供給部107のメモリに限らず、二次記憶部103や不図示の外部記憶装置に格納されたデータを参照しても良い。   The characteristic data supply unit 107 has a memory (not shown). This memory stores information on lens characteristics corresponding to various lenses, specifically, correction coefficients corresponding to photographing lenses. In distortion aberration correction processing described later, a correction function is determined in advance, a correction amount read from the characteristic data supply unit 107 is applied to the correction function, a correction amount is calculated, and the image is deformed according to the correction amount. The image processing is accompanied by the shape change of the outer edge of the image. The lens characteristics are not limited to the memory of the characteristic data supply unit 107, and data stored in the secondary storage unit 103 or an external storage device (not shown) may be referred to.

図4は、本実施形態における画像処理装置(以下、画像処理アプリケーション)のユーザインタフェース(GUI)を例示している。   FIG. 4 exemplifies a user interface (GUI) of the image processing apparatus (hereinafter referred to as an image processing application) in the present embodiment.

図4において、画像表示部401には、処理対象画像をフィット表示する(ウィンドウ内に処理対象画像の全領域が表示される範囲内で、処理対象画像を最大まで拡大して表示する)。処理対象画像は、オペレーティングシステムのファイル管理システム上から、画像表示部401にファイルをドラッグアンドドロップするなどの方法で指定される。また、処理対象画像に何らかの画像処理を施した結果の画像を表示することもできる。   In FIG. 4, the processing target image is fit-displayed on the image display unit 401 (the processing target image is enlarged and displayed to the maximum within a range where the entire region of the processing target image is displayed in the window). The processing target image is designated by a method such as dragging and dropping a file on the image display unit 401 from the file management system of the operating system. It is also possible to display an image obtained as a result of performing some image processing on the processing target image.

歪曲収差補正実行ボタン(以下、実行ボタン)402が押下されると、歪曲収差補正処理が実行され、補正結果の画像が画像表示部401に表示される。歪曲収差補正処理を実行した場合、補正結果の画像の外縁の形状が矩形でない場合がある。その場合は、結果画像の外縁に内接する矩形領域で結果画像を切り出し、切り出した画像を結果画像としても良い(図2参照)。   When a distortion aberration correction execution button (hereinafter, execution button) 402 is pressed, a distortion aberration correction process is executed, and an image of the correction result is displayed on the image display unit 401. When distortion correction processing is executed, the shape of the outer edge of the corrected image may not be rectangular. In that case, the result image may be cut out in a rectangular area inscribed in the outer edge of the result image, and the cut out image may be used as the result image (see FIG. 2).

リセットボタン403が押下されると、歪曲収差補正処理を施す前の画像が画像表示部401に表示される。   When the reset button 403 is pressed, an image before the distortion aberration correction process is performed is displayed on the image display unit 401.

画像処理アプリケーションを終了させる場合には、終了ボタン404を押下する。   When ending the image processing application, an end button 404 is pressed.

ここで実行ボタン402が押された際の処理について、図5のフローを参照して説明する。   Here, processing when the execution button 402 is pressed will be described with reference to the flow of FIG.

S501において、まず画像データを読み出し、画像表示部401に表示する。   In step S <b> 501, first, image data is read and displayed on the image display unit 401.

S502では、読み出された画像データの顔検出を実行し、検出情報を記録する。ここで記録する情報は、検出した顔の数それぞれの顔の位置やサイズが含まれる。例えば4つの顔が検出された場合は図6のテーブルに示すような4つの顔IDが顔検出情報として記録される。   In step S502, face detection is performed on the read image data, and detection information is recorded. The information recorded here includes the position and size of each detected face. For example, when four faces are detected, four face IDs as shown in the table of FIG. 6 are recorded as face detection information.

顔を検出する技術としては、様々な手法が公知となっている。例えば、ニューラルネットワークに代表される学習を用いた方法がある。また、目、鼻、口、および、顔の輪郭といった物理的な形状の特徴のある部位を画像情報からテンプレートマッチングを用いて識別する手法がある。他にも、肌の色や目の形といった画像情報の特徴量を検出し統計的解析を用いた手法がある。さらに、直前の顔領域が検出された位置の近傍であるか判定したり、服の色を加味するために顔領域の近傍の色を判定したり、あるいは、画面の中央付近ほど顔識別のための閾値を低く設定したりする方法がある。   Various techniques are known as techniques for detecting a face. For example, there is a method using learning represented by a neural network. In addition, there is a technique for identifying parts having physical shape features such as eyes, nose, mouth, and facial contour from image information using template matching. In addition, there is a technique that uses a statistical analysis by detecting feature amounts of image information such as skin color and eye shape. Furthermore, it is determined whether the immediately preceding face area is near the detected position, the color near the face area is determined to take into account the color of the clothes, or the face near the center of the screen is used for face identification. There is a method of setting a low threshold value.

S503では歪曲収差補正パラメータ(以下、補正パラメータ)を決定する。   In S503, a distortion aberration correction parameter (hereinafter, correction parameter) is determined.

本実施形態の歪曲収差補正処理は、例えば特開平6−165024号公報に開示された公知の方法で行う。すなわち、撮影時光学情報を用いて特性データ供給部107から特性データを得て、予め定めた補正関数に適用することで像高(画像中心からの距離)に対する補正量を決定する。本実施形態では、補正関数は像高をパラメータとする3次関数とする。   The distortion aberration correction process of the present embodiment is performed by a known method disclosed in, for example, Japanese Patent Laid-Open No. 6-165024. That is, the characteristic data is obtained from the characteristic data supply unit 107 using the optical information at the time of photographing, and applied to a predetermined correction function to determine the correction amount for the image height (distance from the image center). In this embodiment, the correction function is a cubic function with the image height as a parameter.

歪曲収差補正処理を行うために、レンズを識別する識別情報、ズーム位置を特定するための撮影時焦点距離情報、F値などの撮影時光学情報が必要である。本実施形態では、これらの情報をExif規格で定められたMakerNoteタグに格納する。さらに補正精度を上げるために、上記情報に加えて被写体距離情報など他の情報を用いても良い。   In order to perform distortion correction processing, identification information for identifying a lens, focal length information for photographing for specifying a zoom position, and optical information for photographing such as an F value are necessary. In the present embodiment, these pieces of information are stored in a MakerNote tag defined by the Exif standard. In order to further improve the correction accuracy, other information such as subject distance information may be used in addition to the above information.

次にS504において、補正後の画像で補正前に検出されていた画像の顔が欠けるか否かを判定する。   Next, in S504, it is determined whether or not the face of the image detected before the correction is missing in the corrected image.

顔が欠けるか否かの判定方法について図7および図8を参照して説明する。   A method for determining whether or not a face is missing will be described with reference to FIGS.

図2で説明したように、歪曲収差補正処理は、画素位置の移動を伴う補正であるため、画像の外縁の形状も変化してしまう。これに対して、画像の外縁の形状は一般的に矩形状であり、歪曲収差補正処理後には画像を最大サイズの矩形あるいは、撮影したカメラのアスペクト比にトリミングして、周辺部の画像を切り取る。   As described with reference to FIG. 2, the distortion correction process is a correction that involves a movement of the pixel position, and thus the shape of the outer edge of the image also changes. On the other hand, the shape of the outer edge of the image is generally rectangular, and after distortion correction processing, the image is trimmed to the maximum size rectangle or the aspect ratio of the photographed camera, and the peripheral image is cut out. .

すなわち図7の元画像に示すように、幅W、高さHであった画像に歪曲収差補正処理を施すことによって、補正結果の画像aとなる。この結果、補正後の画像の幅はWa、高さはHaとなり、新たな補正結果画像は始点(xd1,yd1)、終点(xd2,yd2)で囲まれる矩形となる。以下では、この矩形領域を有効画像領域と呼ぶ。   That is, as shown in the original image of FIG. 7, by performing distortion correction processing on an image having a width W and a height H, an image a as a correction result is obtained. As a result, the width of the corrected image is Wa and the height is Ha, and the new correction result image is a rectangle surrounded by the start point (xd1, yd1) and the end point (xd2, yd2). Hereinafter, this rectangular area is referred to as an effective image area.

本実施形態では、有効画像領域に最大サイズの矩形を用いているが、撮影したカメラのアスペクト比と同じようにトリミングしたり、ユーザ自身が後でトリミングする領域でも良い。   In the present embodiment, a rectangle having the maximum size is used for the effective image area. However, the effective image area may be an area that is trimmed in the same manner as the aspect ratio of the photographed camera, or may be trimmed later by the user.

ここで、顔が欠けるか否かの判定処理を図8のフローを参照して説明する。   Here, the process of determining whether or not a face is missing will be described with reference to the flow of FIG.

S801において、顔検出データに対して、歪曲収差補正関数を適用し、補正後の顔位置の座標を求める。   In step S <b> 801, a distortion aberration correction function is applied to the face detection data to obtain the corrected face position coordinates.

次にS802において、補正後の顔位置の座標が有効画像領域内にあれば、S803に進む。補正後の顔位置の座標が一部でも有効画像領域外にある場合には、S805に進み、歪曲収差補正処理によって顔が欠けると判定される。   In step S802, if the corrected face position coordinates are within the effective image area, the process advances to step S803. If even a part of the coordinates of the corrected face position is outside the effective image area, the process proceeds to S805, and it is determined that the face is missing by the distortion correction process.

S803では、全ての顔について補正関数を適用するまでS801からの処理を繰り返し、全ての顔について適用されたならば、S804に進み、歪曲収差補正処理によって顔が欠けないと判定される。   In step S803, the process from step S801 is repeated until the correction function is applied to all faces. If the correction function is applied to all faces, the process proceeds to step S804, and it is determined that the face is not missing by the distortion correction process.

上記の処理によってS504での顔が欠けるか否かを判定することができる。   With the above processing, it can be determined whether or not the face in S504 is missing.

顔が欠けない場合にはS505に進み、歪曲収差補正処理を実行する。   If the face is not missing, the process proceeds to S505, and distortion correction processing is executed.

顔が欠ける場合にはS506に進み、歪曲収差補正処理を実行しない。   If the face is missing, the process proceeds to S506, and the distortion correction process is not executed.

画像処理アプリケーションは実行ボタン402が押された際に図5の処理を実行する。そして、顔が欠けてしまうと判定された場合には「被写体の顔が欠けてしまいます。」といった旨のメッセージなどによりユーザに警告するためのダイアログを表示して処理を中止する。あるいは「被写体の顔が欠けてしまいます。処理を中止しますか?」といったダイアログを表示してユーザに歪曲収差補正処理を実行するか確認し、ユーザがそれでも歪曲収差補正処理を実行したい場合にのみ処理を行うようにしても良い。また、顔が欠けてしまう場合には、S503の歪曲収差補正処理の反映度合が小さくなる方向に補正パラメータを変更して、再度図8のフローに基づく処理を実行しても良い。   The image processing application executes the processing of FIG. 5 when the execution button 402 is pressed. If it is determined that the face is missing, a dialog is displayed to warn the user by a message such as “The subject's face is missing.” And the process is stopped. Or, when a dialog box such as “The face of the subject is missing. Do you want to cancel the process?” Is displayed and the user confirms whether to execute the distortion correction process, and the user still wants to execute the distortion correction process. Only the process may be performed. If the face is missing, the correction parameter may be changed in a direction in which the degree of reflection of the distortion correction process in S503 is reduced, and the process based on the flow of FIG. 8 may be executed again.

また、本実施形態では歪曲収差補正処理について例示したが、所定角度回転させた画像から有効画像領域を切り出す処理にも有効である。   In this embodiment, the distortion aberration correction process is exemplified, but it is also effective for a process of cutting out an effective image area from an image rotated by a predetermined angle.

以上のように、歪曲収差補正処理によって被写体の顔が有効画像領域から欠けてしまう場合には、歪曲収差補正処理を実行しないことで、被写体の顔が切り取られることを防ぐことができる。   As described above, when the subject's face is missing from the effective image area due to the distortion correction process, the subject's face can be prevented from being cut out by not executing the distortion correction process.

さらに、本実施形態では実際に画像中の全ての画素について、歪曲収差補正処理を行う前に顔が欠けるか否かの判定が可能であるため、高速に判定することができる。   Furthermore, in this embodiment, since it is possible to determine whether or not the face is missing before performing distortion correction processing for all pixels in the image, it can be determined at high speed.

[第2の実施形態]
第1の実施形態では、画像に歪曲収差補正処理を施した後、顔位置が有効画像領域から欠けるか否かを判定し、その結果に応じて歪曲収差補正処理を行うか否かを判定している。しかしながら、実際には顔の一部が欠けた場合でも顔を検出できる場合がある。そこで、本実施形態では、顔検出が可能か否かを判定して補正パラメータを決定する処理について説明する。
[Second Embodiment]
In the first embodiment, after performing distortion correction processing on an image, it is determined whether or not the face position is missing from the effective image area, and it is determined whether or not to perform distortion correction processing according to the result. ing. However, in practice, there are cases where a face can be detected even when a part of the face is missing. Thus, in the present embodiment, a process for determining whether or not face detection is possible and determining a correction parameter will be described.

本実施形態は、図1に示す装置構成と図4に示すGUIにより実現可能である。   The present embodiment can be realized by the apparatus configuration shown in FIG. 1 and the GUI shown in FIG.

図9は、第2の実施形態の画像処理装置による実行ボタン402が押下された際の処理を示すフローチャートである。   FIG. 9 is a flowchart illustrating processing when the execution button 402 is pressed by the image processing apparatus according to the second embodiment.

S901において、まず画像を読み込み画像表示部401に表示する。   In step S <b> 901, first, an image is read and displayed on the image display unit 401.

次にS902において、読み込まれた画像データの顔検出を実行し、図6に示すような情報を記録する。   In step S902, face detection is performed on the read image data, and information shown in FIG. 6 is recorded.

ここで、各顔IDの始点とサイズを各顔IDの顔領域と定義する。   Here, the start point and size of each face ID are defined as the face area of each face ID.

次にS903において補正パラメータの初期値を決定する。   In step S903, the initial value of the correction parameter is determined.

本実施形態における歪曲収差補正処理も、特開平6−165024号公報に開示された方法により実行する。   The distortion correction processing in this embodiment is also executed by the method disclosed in Japanese Patent Laid-Open No. 6-165024.

また、レンズ収差補正処理を行うために必要となる、レンズを識別する識別情報、ズーム位置を特定するための撮影時焦点距離情報、F値などの撮影時光学情報はExif規格で定められたMakerNoteタグに格納する。   Further, identification information for identifying a lens, photographing focal length information for specifying a zoom position, and photographing optical information such as an F value, which are necessary for performing lens aberration correction processing, are MakerNotes defined by the Exif standard. Store in tags.

以上の方法によって補正パラメータの初期値が決定される。   The initial value of the correction parameter is determined by the above method.

S904において、元画像データ全体に歪曲収差補正処理を施す。   In step S904, distortion correction processing is performed on the entire original image data.

S905において、歪曲収差補正処理後の画像に対して、顔検出処理を行い、補正後の検出結果として、各顔IDの始点とサイズを図6のようなテーブルに記録する。このテーブルは補正前のテーブルとは別々に保持する。   In step S905, face detection processing is performed on the image after distortion aberration correction processing, and the start point and size of each face ID are recorded in a table as shown in FIG. 6 as the detection result after correction. This table is held separately from the table before correction.

S906では補正前後の顔検出結果を比較する。比較結果として補正前の顔検出結果が補正後の顔検出結果に対して所定閾値内にある場合には、補正の前後で顔検出結果が大きく変わらないので、現状の補正パラメータによる歪曲収差補正処理で顔が欠けることがないと判定し、本処理を終了する。   In S906, the face detection results before and after correction are compared. As a comparison result, when the face detection result before correction is within a predetermined threshold with respect to the face detection result after correction, the face detection result does not change significantly before and after the correction, so distortion aberration correction processing using the current correction parameters It is determined that the face will not be lost, and the process is terminated.

ここで、上記S906での顔検出結果の判定方法について図10のフローを参照して説明する。   Here, the determination method of the face detection result in S906 will be described with reference to the flow of FIG.

S1001において、まず顔IDに0を入力して初期化する。   In step S1001, first, the face ID is initialized by inputting 0.

S1002において、顔(ID)の座標について、上記補正パラメータを用いて補正後の顔IDの座標を求める。ここで求める座標は顔IDの始点とサイズである。   In step S1002, for the face (ID) coordinates, the corrected face ID coordinates are obtained using the correction parameters. The coordinates obtained here are the start point and size of the face ID.

S1003において、S1002で求めた補正後の顔IDの始点とサイズの閾値内にS905で求めた顔領域が存在するか否かを検索する。   In S1003, it is searched whether or not the face area obtained in S905 exists within the threshold value of the start point and the size of the corrected face ID obtained in S1002.

ここで閾値として、S1002で求めた補正後の顔IDのサイズの縦横プラス30%の領域が設定される。   Here, as the threshold value, an area that is 30% of the size of the face ID after correction obtained in S1002 is set.

S1002で検索した結果、S905で求めた顔領域が存在しなければ、変化量が大きいと判定し、S1006に進む。   As a result of searching in S1002, if the face area obtained in S905 does not exist, it is determined that the amount of change is large, and the process proceeds to S1006.

顔領域が存在した場合はS1004に進み、補正前の全ての顔IDについて補正を実施した場合にはS1007に進み、実施していない場合にはS1005に進み、IDを1プラスして、S1002に戻る。   If a face area exists, the process proceeds to S1004. If correction has been performed for all face IDs before correction, the process proceeds to S1007. If not, the process proceeds to S1005, and the ID is incremented by 1 and the process proceeds to S1002. Return.

S1006において、変化量が大きい場合には、顔検出結果が大きく変わることになるのでS907に進む。   If the amount of change is large in S1006, the face detection result will change greatly, and the process advances to S907.

S907では補正パラメータを10%低減するようにパラメータ変更を行って、S904の歪曲収差補正処理を再度行う。   In S907, the parameter is changed so as to reduce the correction parameter by 10%, and the distortion aberration correction process in S904 is performed again.

なお、S1003で今回の補正前後の顔検出結果の検索範囲を、顔IDのサイズの縦横プラス30%としたが、これは、これ以上の範囲を検索すると別の顔も検索結果として入ってしまう可能性があるからである。よって、顔の数によってはこの検索範囲を広げても良い。   In S1003, the search range of the face detection result before and after the current correction is set to 30% of the size of the face ID, but if a range larger than this is searched, another face is included as a search result. Because there is a possibility. Therefore, the search range may be expanded depending on the number of faces.

また、S907における補正パラメータを減らす量として一律10%としたが、これはレンズの種類によって変化量が大きいレンズや小さいレンズがあるためであり、レンズごとの違いを考慮しなくても良いように10%としている。   Further, the amount of correction parameter reduction in S907 is uniformly 10%, but this is because there is a lens with a large change amount or a small lens depending on the type of lens, so that it is not necessary to consider the difference between lenses. 10%.

別の方法として、レンズの種類や補正パラメータのテーブルを参照して、変化量の大小によって補正パラメータの低減量を変更しても良い。   As another method, the reduction amount of the correction parameter may be changed depending on the amount of change with reference to the lens type and correction parameter table.

なお、本実施形態では、顔検出処理に全ての画像データを用いたが、処理を高速化するために、間引いた画像データでも良い。   In the present embodiment, all the image data is used for the face detection process. However, thinned image data may be used to speed up the process.

上記の実施形態によれば、歪曲収差補正処理の前後で顔検出の結果が大きく変化しないように補正パラメータを決定することができる。   According to the above embodiment, the correction parameter can be determined so that the result of face detection does not change greatly before and after the distortion correction process.

[他の実施形態]
本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給しても達成可能である。すなわち、そのシステムあるいは装置のコンピュータ(CPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。
[Other Embodiments]
The object of the present invention can also be achieved by supplying a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus. That is, it goes without saying that this can also be achieved by the computer (CPU or MPU) of the system or apparatus reading and executing the program code stored in the storage medium.

この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性の半導体メモリカード、ROMなどを用いることができる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現される場合もある。   As a storage medium for supplying the program code, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile semiconductor memory card, ROM, or the like can be used. . Further, the functions of the above-described embodiments may be realized by executing the program code read by the computer.

しかし、さらにプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   However, there is a case where an OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Needless to say, it is included.

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

本発明に係る実施形態の画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention. 歪曲収差補正処理を説明する図である。It is a figure explaining a distortion aberration correction process. 歪曲収差補正処理による課題を説明する図である。It is a figure explaining the subject by a distortion aberration correction process. 本実施形態の画像処理アプリケーションによるユーザインタフェースを例示する図である。It is a figure which illustrates the user interface by the image processing application of this embodiment. 第1の実施形態による歪曲収差補正処理結果の判定処理を示すフローチャートである。It is a flowchart which shows the determination process of the distortion aberration correction process result by 1st Embodiment. 本実施形態による顔検出情報のテーブルを例示する図である。It is a figure which illustrates the table of the face detection information by this embodiment. 第1の実施形態による歪曲収差補正処理を説明する図である。It is a figure explaining the distortion aberration correction process by 1st Embodiment. 第1の実施形態による歪曲収差補正処理結果の判定処理を示すフローチャートである。It is a flowchart which shows the determination process of the distortion aberration correction process result by 1st Embodiment. 第2の実施形態による顔検出結果の判定処理を示すフローチャートである。It is a flowchart which shows the determination process of the face detection result by 2nd Embodiment. 第2の実施形態による顔検出結果の判定処理を示すフローチャートである。It is a flowchart which shows the determination process of the face detection result by 2nd Embodiment.

Claims (8)

画像データの外縁の形状変化を伴う画像処理を行う画像処理手段と、
画像データに含まれる顔領域を検出する顔検出手段と、
前記画像処理の前後の画像データに関する顔検出結果を比較する比較手段と、
前記比較手段による比較結果に応じて、前記画像処理のパラメータを変更するパラメータ変更手段と、を有することを特徴とする画像処理装置。
Image processing means for performing image processing with a change in shape of the outer edge of the image data;
Face detection means for detecting a face area included in the image data;
Comparison means for comparing face detection results for image data before and after the image processing;
An image processing apparatus comprising: a parameter changing unit that changes a parameter of the image processing according to a comparison result by the comparing unit.
前記画像処理は、歪曲収差補正処理であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the image processing is distortion aberration correction processing. 前記画像処理は、画像を所定角度回転させる処理であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the image processing is processing of rotating an image by a predetermined angle. 前記比較手段は、前記画像処理の前後の画像データから検出された顔位置および顔領域のサイズの差が所定閾値内にあるか否かを判定することを特徴とする請求項1に記載の画像処理装置。   2. The image according to claim 1, wherein the comparison unit determines whether or not a difference between a size of a face position and a face area detected from image data before and after the image processing is within a predetermined threshold value. Processing equipment. 前記パラメータ変更手段は、前記画像処理の前の画像データから検出された顔位置および顔領域のサイズが、前記画像処理の後の画像データから検出された顔位置および顔領域のサイズの閾値内にない場合、前記画像処理のパラメータを減じる方向に変更することを特徴とする請求項1に記載の画像処理装置。   The parameter changing means is configured so that a face position and a face area size detected from the image data before the image processing are within a threshold of the face position and face area size detected from the image data after the image processing. The image processing apparatus according to claim 1, wherein if there is not, the image processing parameter is changed in a direction of decreasing. 被写体を撮像して画像データを生成する撮像手段と、
前記撮像手段により撮像された画像データを表示する表示手段と、をさらに有することを特徴とする請求項1に記載の画像処理装置。
Imaging means for imaging a subject and generating image data;
The image processing apparatus according to claim 1, further comprising display means for displaying image data picked up by the image pickup means.
画像データの外縁の形状変化を伴う画像処理を行う画像処理工程と、
画像データに含まれる顔領域を検出する顔検出工程と、
前記画像処理の前後の画像データに関する顔検出結果を比較する比較工程と、
前記比較工程による比較結果に応じて、前記画像処理のパラメータを変更するパラメータ変更工程と、を有することを特徴とする画像処理方法。
An image processing step for performing image processing with a change in shape of the outer edge of the image data;
A face detection step of detecting a face area included in the image data;
A comparison step of comparing face detection results regarding image data before and after the image processing;
An image processing method comprising: a parameter changing step of changing a parameter of the image processing in accordance with a comparison result in the comparing step.
請求項7に記載の画像処理方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the image processing method according to claim 7.
JP2008237183A 2008-09-16 2008-09-16 Image processing apparatus, image processing method, and program Expired - Fee Related JP5336798B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008237183A JP5336798B2 (en) 2008-09-16 2008-09-16 Image processing apparatus, image processing method, and program
US12/550,058 US8699760B2 (en) 2008-09-16 2009-08-28 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008237183A JP5336798B2 (en) 2008-09-16 2008-09-16 Image processing apparatus, image processing method, and program

Publications (3)

Publication Number Publication Date
JP2010072761A true JP2010072761A (en) 2010-04-02
JP2010072761A5 JP2010072761A5 (en) 2011-11-04
JP5336798B2 JP5336798B2 (en) 2013-11-06

Family

ID=42204507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008237183A Expired - Fee Related JP5336798B2 (en) 2008-09-16 2008-09-16 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5336798B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013219544A (en) * 2012-04-09 2013-10-24 Ricoh Co Ltd Image processing apparatus, image processing method, and image processing program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11261832A (en) * 1998-03-11 1999-09-24 Fuji Photo Film Co Ltd Image processing method and image processor
JPH11331543A (en) * 1998-05-20 1999-11-30 Fuji Photo Film Co Ltd Image processing method and device therefor
JP2000004352A (en) * 1998-06-16 2000-01-07 Fuji Photo Film Co Ltd Image processing method and image processor
JP2003324669A (en) * 2002-05-01 2003-11-14 Canon Inc System for correcting inclination of projection type projector
JP2004274428A (en) * 2003-03-10 2004-09-30 Konica Minolta Holdings Inc Image processing method, image processor, recording medium and program
JP2008104101A (en) * 2006-10-20 2008-05-01 Canon Inc Recording apparatus, recording system, and recording method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11261832A (en) * 1998-03-11 1999-09-24 Fuji Photo Film Co Ltd Image processing method and image processor
JPH11331543A (en) * 1998-05-20 1999-11-30 Fuji Photo Film Co Ltd Image processing method and device therefor
JP2000004352A (en) * 1998-06-16 2000-01-07 Fuji Photo Film Co Ltd Image processing method and image processor
JP2003324669A (en) * 2002-05-01 2003-11-14 Canon Inc System for correcting inclination of projection type projector
JP2004274428A (en) * 2003-03-10 2004-09-30 Konica Minolta Holdings Inc Image processing method, image processor, recording medium and program
JP2008104101A (en) * 2006-10-20 2008-05-01 Canon Inc Recording apparatus, recording system, and recording method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013219544A (en) * 2012-04-09 2013-10-24 Ricoh Co Ltd Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JP5336798B2 (en) 2013-11-06

Similar Documents

Publication Publication Date Title
JP5090474B2 (en) Electronic camera and image processing method
JP4218712B2 (en) Face detection device, imaging device, and face detection method
JP4373828B2 (en) Specific area detection method, specific area detection apparatus, and program
US8494286B2 (en) Face detection in mid-shot digital images
US8213737B2 (en) Digital image enhancement with reference images
JP4218711B2 (en) Face detection device, imaging device, and face detection method
JP5054063B2 (en) Electronic camera, image processing apparatus, and image processing method
JP2009110486A (en) Unit, method and program for image processing, imaging unit, and control method for imaging unit
US8699760B2 (en) Image processing apparatus, image processing method, and program
JP4537143B2 (en) Image processing apparatus and method, imaging apparatus, and program
JP2005322220A (en) Particular region detecting method, particular region detecting apparatus, and program therefor
WO2012014946A1 (en) Image processing device and image processing program
JP5499531B2 (en) Electronic camera
JP5966657B2 (en) Image generating apparatus, image generating method, and program
JP5336798B2 (en) Image processing apparatus, image processing method, and program
JP2010074312A (en) Image processing apparatus and method, and program
JP5132445B2 (en) Image processing apparatus, image processing method, computer program, and storage medium
JP2010026804A (en) Image processing device, image processing program and image processing method
JP2007259004A (en) Digital camera, image processor, and image processing program
JP5374612B2 (en) Image data identification method, imaging apparatus, program, and storage medium
JP4926877B2 (en) Image processing apparatus and method, and program
JP2010157792A (en) Photographed object tracing device
JP5002311B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP4773924B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2008158343A (en) Imaging device and control method thereof

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110914

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120511

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120518

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121210

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130205

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130802

LAPS Cancellation because of no payment of annual fees