JP2006018523A - Image processing device, image processing method, and computer program - Google Patents

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

Info

Publication number
JP2006018523A
JP2006018523A JP2004194893A JP2004194893A JP2006018523A JP 2006018523 A JP2006018523 A JP 2006018523A JP 2004194893 A JP2004194893 A JP 2004194893A JP 2004194893 A JP2004194893 A JP 2004194893A JP 2006018523 A JP2006018523 A JP 2006018523A
Authority
JP
Japan
Prior art keywords
image
detection
correlation
image processing
evaluation amount
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
JP2004194893A
Other languages
Japanese (ja)
Other versions
JP4290080B2 (en
Inventor
Shinjiro Hori
信二郎 堀
Kiyoshi Umeda
清 梅田
Nobutaka Miyake
信孝 三宅
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 JP2004194893A priority Critical patent/JP4290080B2/en
Publication of JP2006018523A publication Critical patent/JP2006018523A/en
Application granted granted Critical
Publication of JP4290080B2 publication Critical patent/JP4290080B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To sequentially designate a detection parameter for setting the size or application range of a template used when a specific object is detected in a plurality of images without a troublesome operation and spending much time in detection processing. <P>SOLUTION: When a detection parameter is determined to change based on a correlation between a previous image and an image to be processed (S106), a face detection parameter is changed (S107). In this parameter changing processing, a face is adequately detected with a detection parameter even if the range of the detection parameter is limited to a smaller range in case that the previously processed image has a high correlation with the image to be processed. By this, when a detection object such as a face is detected by moving or changing a template according to the parameter, the range for the movement and change can be reduced, and time required for detection processing can also be decreased. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像処理装置および画像処理方法およびコンピュータプログラムに関し、デジタルカメラなどによって撮影して得られる画像データにおいて人の顔など特定の対象を検出する処理に関するものである。   The present invention relates to an image processing apparatus, an image processing method, and a computer program, and relates to processing for detecting a specific target such as a human face in image data obtained by photographing with a digital camera or the like.

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

以上のような背景から、撮影した画像を簡易にかつ高品位に印刷できる環境の開発が進められている。その一つとして、撮影して得た画像データから人の顔を検出しこれに関して適切な画像処理を行うアプリケーションが開発されている。これはデジタルカメラによって撮影されるスナップショットの対象として人(顔)がその中心になることが多いためであり、また、その検出した顔について画像データを補正し、例えばより自然な顔の印象となる印刷を行うためである。このため、画像の中から顔を検出する方法が多く提案されている。   In view of the above background, development of an environment in which a photographed image can be printed easily and with high quality is being promoted. As one of such applications, an application for detecting a human face from image data obtained by photographing and performing appropriate image processing on the human face has been developed. This is because a person (face) is often the center of a snapshot taken by a digital camera, and image data is corrected for the detected face, for example, a more natural facial impression. This is because printing is performed. For this reason, many methods for detecting a face from an image have been proposed.

このような顔を検出する方法の一つとして、テンプレートを用いたものが知られている。特許文献1には、複数の顔の形状をしたテンプレートと画像とのマッチング度を計算しマッチング度が最も高いテンプレートについて、そのマッチング度があらかじめ定められた閾値以上であれば、そのテンプレート内の領域を顔候補領域とすることが記載されている。また、このテンプレートを用いるこことで、目の位置を検出することが可能であることも記載されている。   As one of methods for detecting such a face, a method using a template is known. In Patent Document 1, if a matching degree between a template having a plurality of face shapes and an image is calculated and the matching degree is the highest, if the matching degree is equal to or higher than a predetermined threshold, an area in the template is disclosed. Is a face candidate region. It is also described that the position of the eye can be detected here and here using this template.

同様にテンプレートを用いたものとして特許文献2に記載されたものが知られている。ここでは、まず、鼻画像パターンをテンプレートとし、画像全体、あるいは画像中の指定された領域を走査し最もマッチする位置を鼻の位置として出力する。次に、画像の鼻の位置よりも上の領域を目が存在する領域と考え、目画像パターンをテンプレートとして目存在領域を走査してマッチングをとり、ある閾値よりもマッチ度が大きい画素の集合である目存在候補位置集合を求める。さらに、目存在候補位置集合に含まれる連続した領域をクラスタとして分割し、各クラスタと鼻位置との距離を算出する。その距離が最も短くなるクラスタを目が存在するクラスタと決定することで、顔の各器官を検出することが記載されている。   Similarly, the one described in Patent Document 2 is known as one using a template. Here, first, the nose image pattern is used as a template, the entire image or a designated area in the image is scanned, and the best 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 described that each organ of the face is detected by determining the cluster having the shortest distance as the cluster in which the eye exists.

以上のようなテンプレートを用いて顔検出を行う技術では、撮影した画像における、あるいは鼻や目などについて、大きさや、それらの顔などの像が天地あるいは横倒しなどの方向などが異なる複数のテンプレートを用意し、それらを選択的に用いてマッチング処理が行われる。このように、テンプレートに限らずある大きさを持った検出用領域を設定しそれを画像において当てはめて特定の対象の検出を行う技術では、その領域のサイズや方向あるいはその移動範囲など、画像において検出対象の検出する際の検出処理の範囲を検出パラメータとし、それらのパラメータを指定することによって上記の領域を設定することが行われる。   In the technology for detecting a face using the template as described above, a plurality of templates having different sizes, orientations such as upside down or sideways of the image of the face or the like in the photographed image or the nose and eyes are used. A matching process is performed by using them and selectively using them. In this way, in a technique for detecting a specific target by setting a detection area having a certain size, not limited to a template, and applying it to the image, the size and direction of the area or the movement range thereof is used in the image. The range of detection processing when detecting a detection target is set as a detection parameter, and the above-described region is set by designating those parameters.

顔および器官位置の検出に関しては、その他特許文献3〜12など数多くの手法が提案されている。   Regarding the detection of the face and organ positions, many other methods such as Patent Documents 3 to 12 have been proposed.

特開平8−63597号公報JP-A-8-63597 特開2000−105829号公報JP 2000-105829 A 特開2002−183731号公報JP 2002-183731 A 特開2003−30667号公報JP 2003-30667 A 特開平8−77334号公報JP-A-8-77334 特開2001−216515号公報JP 2001-216515 A 特開平5−197793号公報JP-A-5-197793 特開平11−53525号公報JP-A-11-53525 特開2000−132688号公報JP 2000-132688 A 特開2000−235648号公報JP 2000-235648 A 特開平11−250267号公報JP-A-11-250267 特許第2541688号公報Japanese Patent No. 2541688

しかしながら、撮影などして得られる複数の画像について、順次テンプレートなどの検出用領域を適用して特定の対象を検出する場合、画像ごとの検出用領域の設定が煩わしかったり、検出領域を用いた検出処理に比較的多大な時間を要したりするという問題がある。   However, when a specific target is detected by sequentially applying a detection area such as a template for a plurality of images obtained by shooting or the like, setting of the detection area for each image is troublesome or the detection area is used. There is a problem that a relatively long time is required for the detection process.

すなわち、ユーザーが画像ごとにその内容に応じて検出用パラメータを指定する場合には、そのための操作が煩雑となる。例えば、画像から顔を検出する場合、検出用のパラメータとして、検出する顔の大きさの最大値、最小値、顔の検出個数、顔の天地などの方向などを用いる。このため、これらのパラメータそれぞれについて、対象となる画像の内容と照らし合わせながら指定していくことになり、煩雑な作業となる。   That is, when the user designates a detection parameter according to the content of each image, the operation for that is complicated. For example, when detecting a face from an image, the maximum and minimum values of the size of the detected face, the number of detected faces, the direction of the top and bottom of the face, etc. are used as detection parameters. For this reason, each of these parameters must be specified in comparison with the contents of the target image, which is a complicated operation.

これに対して、ユーザーの操作を介さないで検出パラメータを指定する構成が考えられる。この場合に、一般的には、撮影される画像において顔の大きさや方向などが種々あることに対応できるよう、汎用的な検出パラメータを予め定めておき、これをデフォルトの検出パラメータとして検出を行うようにしている。しかし、この場合には、デフォルトの検出パラメータが汎用性を求めたものであるため、このパラメータを用いた検出では、厳密な検出を行うようにすることが求められる。すなわち、このような検出では検出対象の大きさや移動などの範囲を限定しないようにするため、検出パラメータの総てもしくは比較的多くのパラメータを指定し、それぞれ指定された検出パラメータによって設定される検出用領域を用いて検出を行うようにする。これにより、顔などの検出対象の検出を正確に行うことが可能になる。しかしながら、このような厳密な検出を行う場合には多くの時間を要し、さらに複数の画像についてそのような厳密な検出を行うことからさらに多大な時間を要するという問題を生じる。   On the other hand, a configuration in which detection parameters are specified without user operation is conceivable. In this case, generally, a general-purpose detection parameter is determined in advance so as to cope with various face sizes and directions in the captured image, and detection is performed using this as a default detection parameter. I am doing so. However, in this case, since the default detection parameters are those for which versatility is obtained, it is required to perform strict detection in the detection using these parameters. That is, in order to avoid limiting the size and movement range of the detection target in such detection, all or a relatively large number of detection parameters are specified, and detections set by the specified detection parameters, respectively. The detection is performed using the work area. This makes it possible to accurately detect a detection target such as a face. However, when performing such exact detection, a lot of time is required, and further, since such exact detection is performed for a plurality of images, a much longer time is required.

本発明は、このような問題を解決するためになされたものであり、その目的とするところは、複数の画像において、特定の対象を検出する際に用いられるテンプレートなど検出用領域のサイズやその適用範囲などを設定するための検出パラメータの指定を、順次行う場合に、煩雑な操作を要さず、また、検出処理に多大な時間を必要としない画像処理装置および画像処理方法を提供することにある。   The present invention has been made to solve such a problem, and the object of the present invention is to detect the size of a detection region such as a template used when detecting a specific target in a plurality of images and the size thereof. To provide an image processing apparatus and an image processing method that do not require a complicated operation and that do not require much time for detection processing when specifying detection parameters for setting an application range or the like sequentially. It is in.

そのために本発明では、検出対象を画像において検出する際の検出処理の範囲を規定する検出パラメータを用い、画像において所定の検出対象の検出を行う画像処理装置であって、前記所定検出対象の検出が行われた画像と、該画像の次に前記所定検出対象の検出を行う画像との相関の程度を判断する相関判断手段と、該相関判断手段が判断する相関の程度に応じて、前記次に所定検出対象の検出を行う画像における当該検出に用いる検出パラメータの修正を行う修正手段と、を具えたことを特徴とする。   Therefore, the present invention provides an image processing apparatus that detects a predetermined detection target in an image using a detection parameter that defines a detection processing range when the detection target is detected in the image, and detects the predetermined detection target. Correlation judging means for judging the degree of correlation between the image subjected to the detection and the image for detecting the predetermined detection object next to the image, and the next judgment according to the degree of correlation judged by the correlation judging means And a correction means for correcting a detection parameter used for the detection in an image for detecting a predetermined detection target.

また、検出対象を画像において検出する際の検出処理の範囲を規定する検出パラメータを用い、画像において所定の検出対象の検出を行うための画像処理方法であって、前記所定検出対象の検出が行われた画像と、該画像の次に前記所定検出対象の検出を行う画像との相関の程度を判断する相関判断工程と、該相関判断手段が判断する相関の程度に応じて、前記次に所定検出対象の検出を行う画像における当該検出に用いる検出パラメータの修正を行う修正工程と、を有したことを特徴とする。   An image processing method for detecting a predetermined detection target in an image using a detection parameter that defines a detection process range when detecting the detection target in the image, wherein the predetermined detection target is detected. A correlation determination step for determining the degree of correlation between the broken image and the image for which the predetermined detection target is detected next to the image, and the predetermined predetermined number according to the degree of correlation determined by the correlation determination unit. And a correction step of correcting a detection parameter used for the detection in an image for detecting a detection target.

以上の構成によれば、所定検出対象の検出が行われた画像と、その画像の次に上記所定検出対象の検出を行う画像との相関の程度を判断し、その判断する相関の程度に応じて、上記次に所定検出対象の検出を行う画像の検出に用いる検出パラメータであって、検出対象を画像において検出する際の検出処理の範囲を規定する検出パラメータの修正を行うので、例えば、前の検出にかかる画像との相関が高い画像の場合は、検出処理の範囲を狭くしても検出対象の検出を適切に行うことができる。そして、検出処理の範囲を狭くできることによって、検出に要する時間を少なくすることが可能となる。   According to the above configuration, the degree of correlation between the image where the predetermined detection target is detected and the image where the predetermined detection target is detected next to the image is determined, and the degree of correlation determined Then, the detection parameter used for detection of the image for performing the detection of the predetermined detection target next, which corrects the detection parameter that defines the detection processing range when the detection target is detected in the image, is corrected. In the case of an image having a high correlation with the image related to the detection of the detection target, the detection target can be appropriately detected even if the detection processing range is narrowed. And since the range of detection processing can be narrowed, the time required for detection can be reduced.

この結果、複数の画像において、特定の対象を検出する際に用いられるテンプレートなど検出用領域のサイズやその適用範囲などを設定するための検出パラメータの指定を、順次行う場合に、煩雑な操作を要さず、また、その指定された検出パラメータを用いた検出処理の時間を短くすることができる。   As a result, in a plurality of images, it is necessary to perform complicated operations when sequentially specifying detection parameters for setting the size of a detection region such as a template used when detecting a specific target and its application range. In addition, it is possible to shorten the time for the detection process using the designated detection parameter.

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

画像処理装置
図1は、本発明の一実施形態に係る印刷システムの特にハードウェアの構成を示すブロック図である。なお、本実施形態は、以下に示すように、デジタルカメラで撮影して得た画像データに基づいてその撮影画像をインクジェットプリンタで印刷する印刷システムに本発明を適用したものである。しかし、本発明の適用はこのような印刷システムに限られるものでなく、検出パラメータによって指定される検出用領域を用いて撮影した画像から顔などの特定の対象を検出するシステムであれば、いずれにも本発明を適用できることは以下の説明からも明らかである。
The image processing apparatus Figure 1 is a block diagram particularly showing a hardware configuration of a printing system according to an embodiment of the present invention. In the present embodiment, as described below, the present invention is applied to a printing system that prints a photographed image with an inkjet printer based on image data obtained by photographing with a digital camera. However, the application of the present invention is not limited to such a printing system, and any system can be used as long as it detects a specific target such as a face from an image captured using a detection area specified by a detection parameter. The present invention can be applied to the following description.

図1において、画像処理装置101はパーソナルコンピュータの形態で実施されるものである。この画像処理装置101は、CPU102,ROM(ReadOnlyMemory)103,RAM(RandomAccessMemory)104,2次記憶装置105,表示装置106,入力装置107,I/F制御部108などを有して構成される。   In FIG. 1, an image processing apparatus 101 is implemented in the form of a personal computer. The image processing apparatus 101 includes a CPU 102, a ROM (Read Only Memory) 103, a RAM (Random Access Memory) 104, a secondary storage device 105, a display device 106, an input device 107, an I / F control unit 108, and the like.

CPU102は中央演算処理ユニットであり、ROM103,RAM104,および2次記憶装置105に格納されているそれぞれのプログラムに従い、図3以降で説明される画像処理を含む、本装置におけるデータ処理や各要素の制御を実行する。ROM103には、BIOS(BasicInput/OutputSystem)と呼ばれる周辺機器の入出力を制御するプログラムが格納されており、これが電源投入時に実行されることにより、RAM104やその他の入出力装置の初期化を行う。RAM104は作業用のメモリー空間を提供している。2次記憶装置105はHDD(HardDiskDrive)やCD−ROM(CompactDisk−ROM)に代表される大容量磁気記憶装置などで構成されており、OS(OperatingSystem)、アプリケーションや各種データが格納されている。   The CPU 102 is a central processing unit, and in accordance with the programs stored in the ROM 103, the RAM 104, and the secondary storage device 105, the data processing in this apparatus including the image processing described in FIG. Execute control. The ROM 103 stores a program called BIOS (BasicInput / OutputSystem) for controlling input / output of a peripheral device, and is executed when the power is turned on to initialize the RAM 104 and other input / output devices. The RAM 104 provides a working memory space. The secondary storage device 105 includes a large-capacity magnetic storage device represented by an HDD (Hard Disk Drive) and a CD-ROM (Compact Disk-ROM), and stores an OS (Operating System), applications, and various data.

表示装置106は、CRT(CathodeRayTube)ディスプレイや液晶ディスプレイなどの表示装置である。表示装置106にはアプリケーションの処理結果やメッセージなどが表示される。入力装置107はキーボード、マウスなどのユーザーによる指示を入力する機器であって、ユーザーの指示を画像処理装置101に入力する機能を提供している。   The display device 106 is a display device such as a CRT (Cathode Ray Tube) display or a liquid crystal display. The display device 106 displays application processing results and messages. The input device 107 is a device for inputting user instructions such as a keyboard and a mouse, and provides a function of inputting user instructions to the image processing apparatus 101.

I/F制御部108は、外部周辺機器とのインターフェースを提供する。インターフェースとしては、パラレルポートとも呼ばれるIEEE1284やSCSI(SmallComputerSystemInterface),さらにはUSB(UniversalSerialBus),IEEE1394といったシリアルバスなどを使用することができる。いずれのインターフェースを使用するかは画像処理装置101の構成、外部周辺機器の対応によって定まる。   The I / F control unit 108 provides an interface with an external peripheral device. As an interface, a serial bus such as IEEE1284, 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 is determined by the configuration of the image processing apparatus 101 and the correspondence of external peripheral devices.

外部周辺機器として、デジタルスチルカメラ109,メモリーカードリーダ/ライター110,プリンター111が接続される。デジタルスチルカメラ109は撮影装置であり、ユーザーが撮影した撮影画像データが格納されている。そして、撮影画像データは、デジタルスチルカメラ109をI/F制御部108を介して画像処理装置101に接続するか、デジタルスチルカメラに内蔵される記録メディアを取り出してメモリーカードリーダ/ライター110に装着することにより、2次記憶装置105に転送されて格納される。この格納された画像データは、図3以降で説明する顔の検出を含む画像処理の対象となる。さらに、この画像処理が施された画像データに基づきプリンター111で印刷を行うことができる。   A digital still camera 109, a memory card reader / writer 110, and a printer 111 are connected as external peripheral devices. The digital still camera 109 is a photographing device and stores photographed image data photographed by a user. Then, the captured image data is attached to the memory card reader / writer 110 by connecting the digital still camera 109 to the image processing apparatus 101 via the I / F control unit 108 or by removing the recording medium built in the digital still camera. By doing so, it is transferred to the secondary storage device 105 and stored. The stored image data is subjected to image processing including face detection described in FIG. Furthermore, printing can be performed by the printer 111 based on the image data subjected to this image processing.

画像フォーマット
図2は、デジタルスチルカメラ109による撮影で得られる画像データのフォーマット201の一例を示す図である。このフォーマットは、デジタルスチルカメラ109の記録メディアに格納する際のフォーマット、あるいは画像処理装置101に転送する際のフォーマットである。
Image Format FIG. 2 is a diagram showing an example of a format 201 of image data obtained by photographing with the digital still camera 109. This format is a format when stored in the recording medium of the digital still camera 109 or a format when transferred to the image processing apparatus 101.

フォーマット201は、大別して撮影情報領域202と撮影画像データ領域203で構成される。一般的には、撮影情報領域202のデータ量はそれほど大きくないので非圧縮データの形態であり、撮影画像データ領域203はデータ量が大きくなるので圧縮された形態であり、ハイブリッドな構成をとる。しかし、データの圧縮、非圧縮の構成に限定されるものではなく、撮影画像データが非圧縮であっても、逆に撮影情報データが圧縮されていてもよい。   The format 201 is roughly composed of a shooting information area 202 and a shot image data area 203. Generally, since the data amount of the photographing information area 202 is not so large, it is in the form of uncompressed data, and the photographed image data area 203 is in a compressed form because of the large amount of data, and has a hybrid configuration. However, the present invention is not limited to the data compression / non-compression configuration, and the photographed image data may be compressed even if the photographed image data is uncompressed.

撮影情報領域202には、デジタルスチルカメラ109で撮影したときの撮影条件、例えば、縦/横の画素数、露出条件、ストロボ発行の有無、ホワイトバランスの条件、撮影モード、撮影時刻などの様々な撮影情報が格納されている。撮影情報のデータは、その撮影情報に対応するID番号、データ形式、データ長、オフセット値、撮影情報固有のデータで構成される。その形式としては、例えば、JEIDA(Japan Electronic Industry Development Association)の定めるExif(Exchangeable Image Format)を使用することができる。   The shooting information area 202 includes various shooting conditions when shooting with the digital still camera 109, such as the number of vertical / horizontal pixels, exposure conditions, presence / absence of strobe issuance, white balance conditions, shooting mode, and shooting time. Stores shooting information. The shooting information data includes an ID number, a data format, a data length, an offset value, and shooting information specific data corresponding to the shooting information. As the format, for example, Exif (Exchangeable Image Format) defined by JEIDA (Japan Electronic Development Association) can be used.

撮影画像データ領域203には、RGBデータやYCC(輝度色差)データの撮影画像データとすることができる。例えば、撮影画像データ領域203の画像データがYCCデータであった場合に、画像処理装置101でYCCデータからRGBデータに変換して画像処理を行う。   The captured image data area 203 can be captured image data of RGB data or YCC (luminance color difference) data. For example, if the image data in the captured image data area 203 is YCC data, the image processing apparatus 101 converts the YCC data to RGB data and performs image processing.

(第1実施形態)
以上説明した本発明の一実施形態に係る画像処理装置における、撮影画像データにおける人の顔の検出を含む画像処理について以下に説明する。
(First embodiment)
Image processing including detection of a human face in captured image data in the image processing apparatus according to an embodiment of the present invention described above will be described below.

図3は、本発明の第一の実施形態に係る、検出用領域を指定する検出パラメータの変更処理を伴う顔検出に関する画像処理を示すフローチャートである。本処理が実行される際は、デジタルスチルカメラ109で撮影された複数の撮影画像データが、既に画像処理装置101の2次記憶装置105に格納された状態にある。   FIG. 3 is a flowchart showing image processing related to face detection accompanied by detection parameter change processing for designating a detection region according to the first embodiment of the present invention. When this process is executed, a plurality of photographed image data photographed by the digital still camera 109 is already stored in the secondary storage device 105 of the image processing apparatus 101.

図3において、最初にステップS101で、表示装置106上に撮影画像データのリストを表示するとともに、入力装置107を介したユーザーによる選択入力に応じて、画像処理を行う対象画像を選択し、それらの画像データのリストを作成する。   In FIG. 3, first, in step S101, a list of photographed image data is displayed on the display device 106, and target images to be subjected to image processing are selected according to a selection input by the user via the input device 107, and these are selected. Create a list of image data.

次に、ステップS102で、ステップS101で作成した画像データリストの一番先頭にある画像データを検出対象画像とするとともに、デフォルトの検出パラメータおよび検出パラメータ変更フラグ“0”(変更しない)を設定し初期化する。   In step S102, the image data at the top of the image data list created in step S101 is set as a detection target image, and a default detection parameter and a detection parameter change flag “0” (not changed) are set. initialize.

本実施形態では、ステップS106以降の処理に関して後述されるように、順次処理の対象となる複数の画像内容の相関の程度に応じて検出パラメータを変更しあるいは変更しないことが判断される。そして、その検出パラメータは、初期値としてデフォルトの検出パラメータが設定されている。検出パラメータは、顔など検出対象を画像において検出するサイズ、位置ないし方向、個数などを含めて検出処理の範囲を規定するものである。本実施形態では、顔検出の大きさ、検出領域、1つの画像において顔を検出する数、および顔の方向などのパラメータが用いられる。顔検出の大きさは、その縦横それぞれサイズが画像の短辺の画素数を最大値とし、短辺の画素数の所定割合(例えば5%)を最小値とするとともに、この間で何段階かの値をとるものである。検出領域は、その最大は画像の短辺を一辺とする正方形の領域となり、この正方形の領域を長辺方向に所定のステップで移動させながら検出を行う。また、顔検出数は、最大が256個、顔の方向は、天地方向の上および下と、それに直交する方向の左および右の総ての方向が最大となる。デフォルトの検出パラメータは、上記の最大のパラメータが設定されたものである。   In the present embodiment, as will be described later with respect to the processing after step S106, it is determined that the detection parameter is changed or not changed according to the degree of correlation between a plurality of image contents to be sequentially processed. As the detection parameter, a default detection parameter is set as an initial value. The detection parameter defines the range of the detection process including the size, position or direction, number, etc., of detecting a detection target such as a face in the image. In the present embodiment, parameters such as face detection size, detection area, number of faces detected in one image, and face direction are used. As for the size of face detection, the vertical and horizontal sizes are set to the maximum number of pixels on the short side of the image, and a predetermined ratio (for example, 5%) of the number of short side pixels is set to the minimum value. It takes a value. The maximum detection area is a square area with the short side of the image as one side, and detection is performed while moving the square area in the long side direction in a predetermined step. In addition, the maximum number of face detections is 256, and the direction of the face is maximum in all directions of the top and bottom directions and the left and right directions orthogonal to the top and bottom directions. The default detection parameter is set with the above-mentioned maximum parameter.

初期化の後、ステップS103で、検出対象画像を2次記憶装置105から読み込む。読み込んだ撮影画像データは図2で示すフォーマット201で、撮影情報領域202は非圧縮、撮影画像データ領域203はJPEG(JointPhotographicExpertGroup)圧縮されているものである。   After initialization, the detection target image is read from the secondary storage device 105 in step S103. The read captured image data has the format 201 shown in FIG. 2, the captured information area 202 is uncompressed, and the captured image data area 203 is JPEG (Joint Photographic Expert Group) compressed.

そして、撮影情報領域202は、ステップS104で解析処理され、一方、撮影画像データ領域203はステップS105においてJPEG復号処理が実行され、非圧縮の画像データに戻され、さらにはYCCフォーマットからRGBフォーマットへの色変換処理が施される(ステップS105)。   The photographing information area 202 is analyzed in step S104, while the photographed image data area 203 is subjected to JPEG decoding processing in step S105, returned to uncompressed image data, and further changed from the YCC format to the RGB format. The color conversion process is performed (step S105).

撮影情報解析
図4は、ステップS104の撮影情報解析処理を示すフローチャートである。最初に、ステップS201で、そのとき処理している撮影画像データに撮影情報が付加されているかを判定する。一般的にデジタルスチルカメラで撮影された撮影画像データには撮影情報が付加されているが、アプリケーションで編集、加工などをするとこの撮影情報が消去される場合があるためこの判断を行う。撮影情報があるときはステップS203へ進む。撮影情報が無ければステップS207の終了処理へと進むみ、撮影情報エラーとして撮影情報解析処理を終了する。
Capturing information analysis Figure 4 is a flowchart showing the photographing information analysis processing in step S104. First, in step S201, it is determined whether shooting information is added to the shot image data being processed at that time. In general, shooting information is added to shot image data shot by a digital still camera, but this determination is performed because the shooting information may be deleted when editing or processing is performed by an application. If there is shooting information, the process proceeds to step S203. If there is no shooting information, the process proceeds to an end process in step S207, and the shooting information analysis process is ended as a shooting information error.

ステップS202では、必要とする撮影情報を格納する容量のメモリー領域を確保する。確保できればステップS203へ進む。確保できなければステップS207へ進み、同様にメモリー確保エラーとして撮影情報解析処理を終了する。   In step S202, a memory area having a capacity for storing necessary photographing information is secured. If it can be secured, the process proceeds to step S203. If it cannot be secured, the process proceeds to step S207, and similarly, the photographing information analysis process is terminated as a memory securing error.

ステップS203では、撮影情報を一項目ずつスキャンして撮影情報のID値を検索する。IDが検出されるとステップS204へ進む。ステップS204では、検出されたIDと撮影情報管理テーブルにあるIDと比較する。撮影情報管理テーブルには、必要な撮影情報のIDのみが格納されている。ここでは、特に撮影情報を限定せずに撮影情報#0,#1が今後の処理に必要な情報であるとして説明する。   In step S203, the shooting information is scanned item by item, and the ID value of the shooting information is searched. If the ID is detected, the process proceeds to step S204. In step S204, the detected ID is compared with the ID in the photographing information management table. Only the necessary shooting information ID is stored in the shooting information management table. Here, the imaging information # 0 and # 1 will be described as information necessary for future processing without particularly limiting the imaging information.

詳しくは、ステップS203で1つのIDをスキャンすると、ステップS204で撮影情報管理テーブルにあるIDのリストと比較して求められているIDであるかを確認する。IDが撮影情報#0を示すIDであればステップS205へ進み、撮影情報#0の内容を読み込んでステップS202で格納したメモリー領域にその内容をコピーする。コピーが終了すると次のIDのスキャンのためにS203へ進む。同様にステップS203でIDをスキャンし、ステップS204でIDの比較を行った結果、IDが撮影情報#1を示すIDであればステップS206へ進み、撮影情報#1の内容を読み込んでステップS202で格納したメモリー領域にその内容をコピーする。さらに、ステップS204でIDの比較を行い、そのIDの示す撮影情報が必要でないと判断された場合には内容をメモリーに格納することなく次のIDのスキャンを実行するためにステップS203に進む。この様に撮影情報の検索と格納を繰り返し、総てのIDの検索が終了するとステップS207へ進み、正常終了として撮影情報解析処理を終了する。   Specifically, when one ID is scanned in step S203, it is confirmed in step S204 whether the ID is obtained by comparison with the list of IDs in the photographing information management table. If the ID is an ID indicating shooting information # 0, the process proceeds to step S205, where the contents of shooting information # 0 are read and the contents are copied to the memory area stored in step S202. When the copying is completed, the process proceeds to S203 for scanning the next ID. Similarly, when the ID is scanned in step S203 and the IDs are compared in step S204, and the ID is ID indicating shooting information # 1, the process proceeds to step S206, and the content of shooting information # 1 is read in step S202. Copy the contents to the stored memory area. Further, the IDs are compared in step S204, and if it is determined that the shooting information indicated by the ID is not necessary, the process proceeds to step S203 in order to execute the next ID scan without storing the contents in the memory. In this way, the retrieval and storage of the photographing information is repeated, and when the retrieval of all the IDs is completed, the process proceeds to step S207, and the photographing information analysis process is terminated as normal completion.

なお、この撮影情報解析処理では、期待する総ての撮影情報が得られるとは限らない。これはデジタルスチルカメラの機種によって対応している撮影情報の種類が異なっているからである。このため収集できた撮影情報を利用して後の処理が実行される。   Note that not all of the expected shooting information can be obtained in this shooting information analysis process. This is because the types of shooting information that are supported vary depending on the model of the digital still camera. For this reason, the subsequent processing is executed using the collected imaging information.

検出パラメータ変更判断
図5は、図3に示したステップS106の顔検出パラメータの変更が必要であるか否か判断処理を示すフローチャートである。
Detection Parameter Change Determination FIG. 5 is a flowchart showing a process for determining whether or not the face detection parameter needs to be changed in step S106 shown in FIG.

対象画像が、図3に示すステップS101で作成された処理画像リストの最初の画像である場合には、同図のステップS102において検出パラメータ変更フラグは“0”に設定されている。この場合、ステップS301では、最初の画像であることから前の画像の結果が無いと判断し、ステップS305に進み検出パラメータ変更フラグは“0”のままとして本判断処理を終了する。   If the target image is the first image in the processed image list created in step S101 shown in FIG. 3, the detection parameter change flag is set to “0” in step S102 in FIG. In this case, in step S301, since it is the first image, it is determined that there is no result of the previous image, the process proceeds to step S305, the detection parameter change flag remains “0”, and this determination process ends.

対象画像が、上記処理画像リストの2番目以降の画像である場合には、ステップS301で、前の結果があると判断し、ステップS302へ進む。ステップS302では、前の画像の撮影情報とこれから処理を行う画像の撮影情報との比較を行い、それらの相関の程度を調べる。   If the target image is the second or subsequent image in the processed image list, it is determined in step S301 that there is a previous result, and the process proceeds to step S302. In step S302, the shooting information of the previous image and the shooting information of the image to be processed are compared, and the degree of correlation between them is examined.

図6は、相前後する2つの画像の相関を判断するための、撮影モード、撮影時間などの各種撮影情報、画像データの各画素値のヒストグラムといった評価量と、それぞれの評価量の組合せによるそれぞれの判断の仕方を説明する図である。   FIG. 6 illustrates various combinations of evaluation amounts such as various shooting information such as shooting modes and shooting times, histograms of pixel values of image data, and combinations of the respective evaluation amounts for determining the correlation between two adjacent images. It is a figure explaining how to judge.

図6に示すように、本実施形態は、評価量の組合せに応じた3種類の判断1〜3を順次行い、いずれかの判断で、評価量の合計がそれぞれの判断について定められる閾値より高いときは相関が高いと判断する。なお、判断4〜6は、後述するように判断3の他の例などあり代替して用いることが可能なものである。   As shown in FIG. 6, in the present embodiment, three types of determinations 1 to 3 are sequentially performed according to the combination of evaluation amounts, and the sum of evaluation amounts is higher than a threshold value determined for each determination in any determination. When it is judged that the correlation is high. The determinations 4 to 6 can be used in place of other examples of the determination 3 as will be described later.

上記において、評価量を加算するときは、それぞれの評価量について図6の括弧内に記載の重みをかけて加算される。また、各評価量は1に正規化され、その評価量に重みをかけて足し、その結果が所定の閾値以上であれば相関が高いと判断する。   In the above, when the evaluation amount is added, each evaluation amount is added with the weight described in parentheses in FIG. Each evaluation amount is normalized to 1, added to the evaluation amount with a weight, and if the result is equal to or greater than a predetermined threshold, it is determined that the correlation is high.

図6に示す判断1では、撮影モードが連写モードであるか否かを調べる。連写モードの場合、前後の画像は相関性の高い画像になる可能性が高い。また、焦点距離が相互の画像で同じであるときも連写モードである可能性が高くなる。なお、この判断1では、連射モードの場合、撮影時間や、その他の評価量は調べられない。この判断の場合、撮影モードの評価量は重みが0.7で、焦点距離の評価量は重みが0.3となる。これは、撮影モードが、直接連写か否かを示すものであることから、その重みをより大きくするからである。   In judgment 1 shown in FIG. 6, it is checked whether or not the shooting mode is the continuous shooting mode. In the continuous shooting mode, the images before and after are likely to be highly correlated images. In addition, the possibility of the continuous shooting mode also increases when the focal lengths are the same in the mutual images. In this determination 1, in the continuous shooting mode, the shooting time and other evaluation quantities cannot be examined. In this determination, the evaluation amount of the shooting mode has a weight of 0.7, and the evaluation amount of the focal length has a weight of 0.3. This is because the shooting mode indicates whether or not direct continuous shooting is used, and thus the weight is increased.

判断2では、撮影時間を調べる。前の画像の撮影から対象となっている画像の撮影までの時間である撮影時間が所定の時間以内(例えば、1分以内)のときは、同じ様な画像、すなわち、相関の高い撮影をした可能性が高いと判断する。例えば、集合写真などで予備的に同じ撮影を行うことがあり、ある時間以内に複数の画像が撮影されることがある。また、撮影情報の焦点距離(図2では付図示)がその前の画像と同じであれば、さらに同じような画像である可能性が高くなる。さらに、連写の場合も上記撮影時間が所定時間以内となるので、評価量として採用する。但し、この判断の場合は、重みは小さくする。   In decision 2, the shooting time is examined. When the shooting time, which is the time from the previous image to the target image, is within a predetermined time (for example, within 1 minute), the same image, that is, a highly correlated image was taken. Judge that the possibility is high. For example, the same shooting may be performed preliminarily with a group photo or the like, and a plurality of images may be shot within a certain time. In addition, if the focal length (shown in FIG. 2) of the shooting information is the same as the previous image, the possibility that the image is similar is further increased. Further, in the case of continuous shooting, the shooting time is within a predetermined time, and therefore, it is adopted as an evaluation amount. However, in this determination, the weight is reduced.

判断3では、撮影情報ではなく、撮影画像データそのもののヒストグラムを解析してこれを評価量に採用する。比較される2つの画像について、画像データのRGB各色の濃度値のヒストグラムを作成して、各濃度値の差の絶対値を総て加算し、その差の合計(誤差)が所定の閾値以下であるときは、2つの画像は同じと判断する。   In decision 3, the histogram of the photographic image data itself, not the photographic information, is analyzed and used as the evaluation amount. For the two images to be compared, a histogram of density values for each color of RGB of the image data is created, and the absolute values of the differences between the density values are added together, and the sum (error) of the differences is below a predetermined threshold value. In some cases, it is determined that the two images are the same.

なお、判断4では、ヒストグラムの分布形状を評価量に採用したものであり、この分布を比較して、同じような分布をしている場合には2つの画像は同じと判断する。この判断4を上記判断3に代えて行ってもよい。また、判断5のように、判断3および4の二つの比較結果を所定の値で加重平均し、その値から二つの画像の相関度を判断するようにしてもよい。さらに、判断6のように、いくつかの評価量の組合せを用いてもよい。なお、図6に示した評価量以外の撮影情報や画像データから算出可能な量を評価量として用いてもよいことはもちろんである。   Note that in the determination 4, the distribution shape of the histogram is adopted as the evaluation amount, and when these distributions are compared, two images are determined to be the same if they have similar distributions. This determination 4 may be performed instead of the above determination 3. Further, as in determination 5, the two comparison results of determinations 3 and 4 may be weighted and averaged with a predetermined value, and the degree of correlation between the two images may be determined from the value. Further, as in decision 6, some combinations of evaluation amounts may be used. Needless to say, an amount that can be calculated from shooting information and image data other than the evaluation amount shown in FIG. 6 may be used as the evaluation amount.

再び図5を参照すると、以上説明したステップS302の評価量と閾値との比較結果により、次のステップS303で、相前後する画像の相関が高いか否かを判断する。そして、相関が高いと判断したときは、ステップS304で、検出パラメータ変更フラグを“1”(変更する)に設定する。一方、相関が高くないと判断したときは、ステップS305で、検出パラメータ変更フラグを“0”(変更しない)に設定し、ステップS106の検出パラメータ変更判断処理を終了する。   Referring to FIG. 5 again, based on the comparison result between the evaluation amount and the threshold value in step S302 described above, in the next step S303, it is determined whether the correlation between successive images is high. If it is determined that the correlation is high, the detection parameter change flag is set to “1” (change) in step S304. On the other hand, if it is determined that the correlation is not high, the detection parameter change flag is set to “0” (not changed) in step S305, and the detection parameter change determination process in step S106 is terminated.

再び、図3を参照すると、ステップS106で検出パラメータに変更がない、つまり、検出パラメータ変更フラグを“0”に設定したときは、ステップS108へ進む。一方、ステップS106で、検出パラメータを変更する、つまり、検出パラメータ変更フラグを“1”に設定したときは、ステップS107へ進み、顔検出パラメータの変更を行う。   Referring to FIG. 3 again, when the detection parameter is not changed in step S106, that is, when the detection parameter change flag is set to “0”, the process proceeds to step S108. On the other hand, when the detection parameter is changed in step S106, that is, when the detection parameter change flag is set to “1”, the process proceeds to step S107, and the face detection parameter is changed.

この変更では、前に処理した画像との相関が高いと仮定して、前に処理した画像の顔検出結果を元にこれから処理を行う画像で使用する顔検出パラメータを決定する。すなわち、このパラメータ変更処理では、前で処理した画像との相関が高い場合、用いる検出パラメータの範囲をより小さな範囲に限定してもそのパラメータで適切に顔を検出することができることから、それぞれの検出パラメータの範囲を狭くする処理を行う。   In this change, assuming that the correlation with the previously processed image is high, the face detection parameter used in the image to be processed is determined based on the face detection result of the previously processed image. That is, in this parameter changing process, when the correlation with the previously processed image is high, even if the range of the detection parameter to be used is limited to a smaller range, the face can be detected appropriately with that parameter. A process for narrowing the detection parameter range is performed.

例えば、前の画像でポートレート写真のように顔が大きく撮影されており、顔検出結果として画像のサイズに対して大きな領域が検出されていた場合には、検出する顔の大きさを規定する検出パラメータの範囲を狭くするため、例えば、顔の大きさを規定する検出パラメータの最小値を前回の画像の顔の大きさの1/2として、最小値をより最大値(例えば、デフォルトの場合、前述のように画像の短辺の画素数)に近づける顔の大きさのパラメータの範囲を狭くする。また、検出において調べる顔の数である顔の検出数を前回の画像で設定されていた検出数(例えば、デフォルトの場合、前述のように256個)から10個に減らす、といった変更を行う。   For example, when the face is photographed large like a portrait photograph in the previous image and a large area is detected with respect to the image size as a face detection result, the size of the face to be detected is defined. In order to narrow the detection parameter range, for example, the minimum value of the detection parameter that defines the size of the face is set to 1/2 of the face size of the previous image, and the minimum value is set to the maximum value (for example, in the case of default) As described above, the range of the face size parameter close to the number of pixels on the short side of the image is narrowed. Further, a change is made such that the number of detected faces, which is the number of faces to be examined in the detection, is reduced to 10 from the number of detections set in the previous image (for example, 256 in the case of default).

あるいは、前回に処理した画像が集合写真などの場合、検出される顔の大きさは小さいので、顔の大きさのパラメータにおいてその最大値を前の画像の顔の大きさパラメータの2倍までの範囲に限定し、また、顔の方向は天地方向の上のみに限定する、といった変更を行う。   Alternatively, when the previously processed image is a group photo or the like, the detected face size is small, so the maximum value of the face size parameter is up to twice the face size parameter of the previous image. The range is limited, and the face direction is limited to the top-and-bottom direction only.

さらに、前回の画像で顔が検出された領域の場所と同じ領域を中心に顔検出を行うように、検出領域に関する検出パラメータの制御を行う。例えば、前回の画像で顔が検出された領域を包含する領域を設定して、この領域について顔検出を行うように検出領域を限定する。または、前回の画像で顔が検出された領域を包含する領域以外の領域に対してマスク処理を施し、画像データを無効にして顔検出を行うといった処理も可能である。   Further, the detection parameter related to the detection area is controlled so that face detection is performed around the same area as the area where the face was detected in the previous image. For example, an area including an area where a face is detected in the previous image is set, and the detection area is limited so that face detection is performed for this area. Alternatively, it is possible to perform a masking process on a region other than a region including a region where a face has been detected in the previous image, and perform face detection with image data invalidated.

以上のように、処理対象の画像と前回の画像との相関が高い場合には、検出パラメータの範囲をより狭くする。これにより、そのパラメータに従い、後述のように、テンプレートなどの検出領域を移動ないし変化させて顔などの検出対象を検出する際に、その移動ないし変化させる範囲を狭くでき、検出処理に要する時間をより短くすることができる。   As described above, when the correlation between the image to be processed and the previous image is high, the detection parameter range is narrowed. Thus, according to the parameters, when detecting a detection target such as a face by moving or changing a detection region such as a template, as described later, the range to be moved or changed can be narrowed, and the time required for detection processing can be reduced. It can be made shorter.

ステップS107で以上のように検出パラメータを変更した後、またはステップS106で検出パラメータの変更なしと判断されたとき、ステップS108で、そのとき設定されている検出パラメータを用いて顔検出処理を行う。この顔検出は、テンプレートなどの検出領域を用い、これを上記のように変更した、または変更なしの検出パラメータに従って移動ないし変化させながら行うものである。なお、この処理は公知のものを用いることができ、ここでは、その詳細な説明は省略する。   After the detection parameter is changed as described above in step S107, or when it is determined in step S106 that there is no change in the detection parameter, face detection processing is performed using the detection parameter set at that time in step S108. This face detection is performed by using a detection region such as a template and moving or changing the detection region according to a detection parameter changed or not changed as described above. In addition, a well-known thing can be used for this process, The detailed description is abbreviate | omitted here.

ステップS108の顔検出処理の後、そこで顔が検出されたか否かにかかわらずステップS109へ進み、撮影情報と、顔が検出さればその検出結果とを所定のメモリーに保存してステップS110へ進む。ステップS110では、顔が検出された場合はその結果に基づいて、顔領域の画像に対した画像処理を施す。この画像処理としては、顔領域におけるいわゆる赤目の検出とそれに対する補正処理、顔領域の先鋭化処理、逆に顔領域のスムージング処理などであり、これらは公知の手法を用いることができる。また、これらの補正について、ユーザによって選択できるようにしておくようにしてもよい。   After the face detection process in step S108, the process proceeds to step S109 regardless of whether or not a face is detected there, and the shooting information and the detection result if a face is detected are stored in a predetermined memory, and the process proceeds to step S110. . In step S110, if a face is detected, image processing is performed on the face region image based on the result. This image processing includes so-called red-eye detection in the face area and correction processing for it, sharpening of the face area, conversely smoothing processing of the face area, etc., and known methods can be used. These corrections may be selected by the user.

(第2の実施例)
上述した第1実施形態では、前回処理した画像の撮影情報と顔検出結果を利用する構成を示した。しかし前の画像と処理の対象となっている画像の相関がほとんど無い場合、前の画像で使用した顔検出パラメータをそのまま使用することになり、これから処理する画像に対して適切な顔検出が行えない可能性が高くなる。このため、本実施形態では、図3に示したステップS106の検出パラメータ変更処理を、相関に応じてデフォルトの検出パラメータを用いるようにする。
(Second embodiment)
In the above-described first embodiment, the configuration using the imaging information and the face detection result of the image processed last time is shown. However, when there is almost no correlation between the previous image and the image to be processed, the face detection parameters used in the previous image are used as they are, and appropriate face detection can be performed for the image to be processed. Not likely to be. For this reason, in this embodiment, the detection parameter changing process in step S106 shown in FIG. 3 is performed using default detection parameters in accordance with the correlation.

図7は、本発明の第2の実施形態に係る検出パラメータ変更処理を示すフローチャートである。   FIG. 7 is a flowchart showing detection parameter change processing according to the second embodiment of the present invention.

同図に示すように、図6にて説明した評価量の合計で表される画像間の相関性について、2つの閾値を設け、第1の閾値は第2の閾値よりも大きな値に設定する。この場合、図6にて前述した判断1〜6について、それぞれの閾値が2段階に設定されることになる。   As shown in the figure, two threshold values are provided for the correlation between images represented by the total evaluation amount described in FIG. 6, and the first threshold value is set to a value larger than the second threshold value. . In this case, the respective threshold values are set in two stages for the determinations 1 to 6 described above with reference to FIG.

そして、ステップS403で評価量の合計が第1の閾値よりも大きいか否かを判断する。ここで、第1の閾値より大きいとき、つまり画像間の相関性が極めて高いと判断されるとき、ステップS404に進み検出パラメータの変更フラグを“1”(変更する)に設定する。   In step S403, it is determined whether the total evaluation amount is larger than the first threshold value. Here, when it is larger than the first threshold value, that is, when it is determined that the correlation between the images is extremely high, the process proceeds to step S404, and the detection parameter change flag is set to “1” (change).

また、ステップS403で相関性が第1の閾値よりも小さいときは、ステップ406へ進む。そして、このステップS406で相関性が第2の閾値よりも小さいか否かを判断する。ここで第2の閾値より小さいとき、つまり、画像間の相関性がほとんど無いと判断されるときは、ステップS407に進み、検出パラメータの変更フラグを“2”(デフォルトにする)に設定する。それ以外の場合には、ステップS405で検出パラメータの変更フラグを“0”(変更しない)に設定する。   If the correlation is smaller than the first threshold value in step S403, the process proceeds to step 406. In step S406, it is determined whether or not the correlation is smaller than the second threshold value. Here, when it is smaller than the second threshold value, that is, when it is determined that there is almost no correlation between images, the process proceeds to step S407, and the detection parameter change flag is set to “2” (default). In other cases, the detection parameter change flag is set to “0” (not changed) in step S405.

以上の処理によって、検出パラメータの変更フラグが“2”(デフォルトにする)に設定された場合、図3に示すステップS107で検出パラメータをデフォルト値に戻すことができる。すなわち、画像間の相関がほとんどないときは、前の画像に基づかないでデフォルトの検出パラメータによって検出を行うことが可能となり、また、中程度の相関があるときは(ステップS405)、その相関がある前の画像に基づいて、変更されない検出パラメータを用いた検出を行うことが可能となる。   When the detection parameter change flag is set to “2” (set to default) by the above processing, the detection parameter can be returned to the default value in step S107 shown in FIG. That is, when there is almost no correlation between images, it is possible to perform detection using the default detection parameters without being based on the previous image, and when there is a moderate correlation (step S405), the correlation is Based on a previous image, it is possible to perform detection using detection parameters that are not changed.

(他の実施形態)
以上説明した第1、2の実施形態では、画像間の相関関係に注目して検出パラメータの制御を行うものとしたが、撮影情報に応じて何パターンかの顔検出パラメータの組み合わせを用意しておき、図3のステップS106で、どの検出パラメータの組み合わせを利用するかの判断を行って顔検出パラメータの制御を行うようにしても良い。
(Other embodiments)
In the first and second embodiments described above, the detection parameters are controlled by paying attention to the correlation between images. However, various combinations of face detection parameters are prepared according to the photographing information. Alternatively, in step S106 in FIG. 3, it may be determined which combination of detection parameters is used to control the face detection parameters.

また、図6にて説明したように、相関性の評価に画像データのヒストグラム解析を用いる場合、全画像に対してヒストグラム解析を行うと処理量が大きくなるため、画像のサムネイル(縮小)画像を作成し、サムネイル画像に対してヒストグラム解析を行ってもよく、その場合、解析がより効率的となる。さらに、ヒストグラム解析の他にも周波数解析、シーン解析などを評価量として採用することができる。   In addition, as described with reference to FIG. 6, when using histogram analysis of image data for correlation evaluation, the amount of processing increases when histogram analysis is performed on all images. It may be created and the histogram analysis may be performed on the thumbnail image, in which case the analysis becomes more efficient. In addition to histogram analysis, frequency analysis, scene analysis, and the like can be employed as evaluation quantities.

(さらに他の実施例)
上記で説明した画像処理装置は、複数の機器(例えばホストコンピュータ、インターフェース機器、リーダ、プリンター等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用しても良い。
(Still another embodiment)
The image processing apparatus described above can be applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), or a device (for example, a copier, a facsimile apparatus) composed of a single device. Etc.).

また、本発明の目的は、図3等で前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   In addition, an object of the present invention is to supply a storage medium (or recording medium) in which software program codes for realizing the functions of the embodiment described above with reference to FIG. Needless to say, this can also be achieved by a computer (or CPU or MPU) 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. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer 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 storage medium is written in the memory of the function expansion card inserted into the computer or the function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the 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.

本発明の一実施形態に係る印刷システムの特にハードウェアの構成を示すブロック図である。1 is a block diagram illustrating a hardware configuration of a printing system according to an embodiment of the present invention. 図1に示すデジタルスチルカメラ109による撮影で得られる画像データのフォーマット201の一例を示す図である。It is a figure which shows an example of the format 201 of the image data obtained by imaging | photography with the digital still camera 109 shown in FIG. 本発明の第一の実施形態に係る、検出用領域を指定する検出パラメータの変更処理を伴う顔検出に関する画像処理を示すフローチャートである。It is a flowchart which shows the image process regarding the face detection accompanying the change process of the detection parameter which designates the area | region for a detection based on 1st embodiment of this invention. 図3に示すステップS104の撮影情報解析処理を示すフローチャートである。It is a flowchart which shows the imaging | photography information analysis process of step S104 shown in FIG. 図3に示したステップS106の顔検出パラメータの変更が必要であるか否か判断処理を示すフローチャートである。It is a flowchart which shows a judgment process whether the change of the face detection parameter of step S106 shown in FIG. 3 is required. 図5のステップS302の処理において、相前後する2つの画像の相関を判断するための、撮影モード、撮影時間などの各種撮影情報、画像データの各画素値のヒストグラムといった評価量と、それぞれの評価量の組合せによるそれぞれの判断の仕方を説明する図である。In the process of step S302 in FIG. 5, evaluation amounts such as various shooting information such as a shooting mode and a shooting time, a histogram of each pixel value of image data, and each evaluation for determining the correlation between two adjacent images. It is a figure explaining the method of each judgment by the combination of quantity. 本発明の第2の実施形態に係る検出パラメータ変更処理を示すフローチャートである。It is a flowchart which shows the detection parameter change process which concerns on the 2nd Embodiment of this invention.

符号の説明Explanation of symbols

101 画像処理装置
102 CPU
103 ROM
104 RAM
105 2次記憶装置
106 表示装置
107 入力装置
108 I/F制御部
109 デジタルスチルカメラ
110 メモリーカードリーダ/ライター
111 プリンター
101 Image processing apparatus 102 CPU
103 ROM
104 RAM
105 Secondary Storage Device 106 Display Device 107 Input Device 108 I / F Control Unit 109 Digital Still Camera 110 Memory Card Reader / Writer 111 Printer

Claims (15)

検出対象を画像において検出する際の検出処理の範囲を規定する検出パラメータを用い、画像において所定の検出対象の検出を行う画像処理装置であって、
前記所定検出対象の検出が行われた画像と、該画像の次に前記所定検出対象の検出を行う画像との相関の程度を判断する相関判断手段と、
該相関判断手段が判断する相関の程度に応じて、前記次に所定検出対象の検出を行う画像における当該検出に用いる検出パラメータの修正を行う修正手段と、
を具えたことを特徴とする画像処理装置。
An image processing apparatus that detects a predetermined detection target in an image using a detection parameter that defines a detection processing range when detecting the detection target in the image,
Correlation determining means for determining the degree of correlation between an image on which the predetermined detection target is detected and an image on which the predetermined detection target is detected next to the image;
Correction means for correcting a detection parameter used for the detection in the next image for detecting the predetermined detection object in accordance with the degree of correlation determined by the correlation determination means;
An image processing apparatus comprising:
前記相関判断手段は、画像に関して定められる評価量によって前記二つの画像の相関を判断し、前記修正手段は、前記評価量が所定の閾値より大きいとき、検出パラメータの修正を行うことを特徴とする請求項1に記載の画像処理装置。   The correlation determination unit determines a correlation between the two images based on an evaluation amount determined for the image, and the correction unit corrects a detection parameter when the evaluation amount is larger than a predetermined threshold. The image processing apparatus according to claim 1. 前記相関判断手段は、画像に関して定められる評価量によって前記二つの画像の相関を判断し、前記修正手段は、前記評価量が第1の閾値より大きいとき、検出パラメータの修正を行い、前記評価量が第1の閾値より小さい第2の閾値より小さいとき、デフォルトの検出パラメータを設定することを特徴とする請求項1に記載の画像処理装置。   The correlation determination unit determines a correlation between the two images based on an evaluation amount determined for the image, and the correction unit corrects a detection parameter when the evaluation amount is larger than a first threshold, and the evaluation amount The image processing apparatus according to claim 1, wherein a default detection parameter is set when is smaller than a second threshold smaller than the first threshold. 前記評価量として、撮影条件を用いることを特徴とする請求項1ないし3のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein a photographing condition is used as the evaluation amount. 前記評価量として、撮影時間を用いることを特徴とする請求項1ないし4のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein a photographing time is used as the evaluation amount. 前記評価量として、画像のヒストグラム解析結果を用いることを特徴とする請求項1ないし5のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein a histogram analysis result of an image is used as the evaluation amount. 前記画像の縮小画像を作成して前記ヒストグラム解析を行うことを特徴とする請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein a reduced image of the image is created and the histogram analysis is performed. 検出対象を画像において検出する際の検出処理の範囲を規定する検出パラメータを用い、画像において所定の検出対象の検出を行うための画像処理方法であって、
前記所定検出対象の検出が行われた画像と、該画像の次に前記所定検出対象の検出を行う画像との相関の程度を判断する相関判断工程と、
該相関判断手段が判断する相関の程度に応じて、前記次に所定検出対象の検出を行う画像における当該検出に用いる検出パラメータの修正を行う修正工程と、
を有したことを特徴とする画像処理方法。
An image processing method for detecting a predetermined detection target in an image using a detection parameter that defines a detection processing range when detecting the detection target in the image,
A correlation determination step of determining a degree of correlation between an image on which the predetermined detection target is detected and an image on which the predetermined detection target is detected next to the image;
A correction step of correcting a detection parameter used for the detection in the image in which the predetermined detection target is detected next, according to the degree of correlation determined by the correlation determination unit;
An image processing method characterized by comprising:
前記相関判断工程は、画像に関して定められる評価量によって前記二つの画像の相関を判断し、前記修正工程は、前記評価量が所定の閾値より大きいとき、検出パラメータの修正を行うことを特徴とする請求項8に記載の画像処理方法。   The correlation determining step determines a correlation between the two images according to an evaluation amount determined for the image, and the correction step corrects a detection parameter when the evaluation amount is larger than a predetermined threshold value. The image processing method according to claim 8. 前記相関判断工程は、画像に関して定められる評価量によって前記二つの画像の相関を判断し、前記修正工程は、前記評価量が第1の閾値より大きいとき、検出パラメータの修正を行い、前記評価量が第1の閾値より小さい第2の閾値より小さいとき、デフォルトの検出パラメータを設定することを特徴とする請求項8に記載の画像処理方法。   The correlation determination step determines a correlation between the two images based on an evaluation amount determined for the image, and the correction step corrects a detection parameter when the evaluation amount is larger than a first threshold, and the evaluation amount 9. The image processing method according to claim 8, wherein a default detection parameter is set when is smaller than a second threshold value smaller than the first threshold value. 前記評価量として、撮影条件を用いることを特徴とする請求項8ないし10のいずれかに記載の画像処理方法。   The image processing method according to claim 8, wherein a photographing condition is used as the evaluation amount. 前記評価量として、撮影時間を用いることを特徴とする請求項8ないし11のいずれかに記載の画像処理方法。   The image processing method according to claim 8, wherein a shooting time is used as the evaluation amount. 前記評価量として、画像のヒストグラム解析結果を用いることを特徴とする請求項8ないし12のいずれかに記載の画像処理方法。   The image processing method according to claim 8, wherein a histogram analysis result of an image is used as the evaluation amount. 前記画像の縮小画像を作成して前記ヒストグラム解析を行うことを特徴とする請求項13に記載の画像処理方法。   The image processing method according to claim 13, wherein a reduced image of the image is created and the histogram analysis is performed. 情報処理装置に、検出パラメータを用い、画像において所定の検出対象の検出を行うための画像処理を実行させるプログラムであって、該処理は、
前記検出対象の検出が行われた画像と、該画像の次に前記所定検出対象の検出を行う画像との相関の程度を判断する相関判断工程と、
該相関判断手段が判断する相関の程度に応じて、前記次に所定検出対象の検出を行う画像における当該検出に用いる検出パラメータの修正を行う修正工程と、
を有したことを特徴とするプログラム。

A program for causing an information processing apparatus to execute image processing for detecting a predetermined detection target in an image using detection parameters,
A correlation determination step of determining a degree of correlation between an image in which the detection target is detected and an image in which the predetermined detection target is detected next to the image;
A correction step of correcting a detection parameter used for the detection in the image in which the predetermined detection target is next detected according to the degree of correlation determined by the correlation determination unit;
The program characterized by having.

JP2004194893A 2004-06-30 2004-06-30 Image processing apparatus, image processing method, and computer program Expired - Fee Related JP4290080B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004194893A JP4290080B2 (en) 2004-06-30 2004-06-30 Image processing apparatus, image processing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004194893A JP4290080B2 (en) 2004-06-30 2004-06-30 Image processing apparatus, image processing method, and computer program

Publications (2)

Publication Number Publication Date
JP2006018523A true JP2006018523A (en) 2006-01-19
JP4290080B2 JP4290080B2 (en) 2009-07-01

Family

ID=35792745

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP4290080B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007312249A (en) * 2006-05-19 2007-11-29 Canon Inc Unit and method for image processing
JP2008054297A (en) * 2006-07-25 2008-03-06 Fujifilm Corp System for and method of photographing image, and computer program
US8797423B2 (en) 2006-07-25 2014-08-05 Fujifilm Corporation System for and method of controlling a parameter used for detecting an objective body in an image and computer program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007312249A (en) * 2006-05-19 2007-11-29 Canon Inc Unit and method for image processing
JP2008054297A (en) * 2006-07-25 2008-03-06 Fujifilm Corp System for and method of photographing image, and computer program
US8797423B2 (en) 2006-07-25 2014-08-05 Fujifilm Corporation System for and method of controlling a parameter used for detecting an objective body in an image and computer program

Also Published As

Publication number Publication date
JP4290080B2 (en) 2009-07-01

Similar Documents

Publication Publication Date Title
JP4373828B2 (en) Specific area detection method, specific area detection apparatus, and program
US7756343B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US7751640B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US6668101B2 (en) Image processing apparatus and method, and computer-readable memory
US7848588B2 (en) Method and apparatus for judging direction of blur and computer-readable recording medium storing a program therefor
US7869651B2 (en) Image processing apparatus and image processing method
EP1292108A2 (en) Image processing apparatus for print process of photographed image
US20070052818A1 (en) Image processing apparatus and image processing method
JP2010010938A (en) Image processing apparatus, image processing method, program and computer-readable recording medium
JP2010010946A (en) Image processing apparatus and method, program, and computer readable storage medium
EP1574991A1 (en) Similar image extraction device, similar image extraction method, and similar image extraction program
JP5111255B2 (en) Image processing apparatus, image processing method, computer program, and recording medium
JP4920814B2 (en) Image processing method, apparatus, and recording medium
JP4290080B2 (en) Image processing apparatus, image processing method, and computer program
JP2000013605A (en) Image processor, method and record medium recording image processing program
US20090324063A1 (en) Image processing method and apparatus for correcting specific part
JP2000013596A (en) Device and method for processing image and recording medium with image processing program recorded there
JP2005151130A (en) Device and method for outputting image, storage medium, and program
JP4366286B2 (en) Image processing method, image processing apparatus, and computer program
US8630503B2 (en) Image processing apparatus, image processing method, and computer program
JP2006344166A (en) Image processing device and method
JP2000013612A (en) Device and method for image processing and recording medium recorded with image processing program
JP2000013613A (en) Image processor, method and record medium recording image processing program
JP2006048223A (en) Image processor, image processing method and computer program
JP4665802B2 (en) Lightness correction processing apparatus and lightness correction determination method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080919

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090217

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4290080

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120410

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130410

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130410

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140410

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees