JP2009010711A - Device and method for filter processing, and imaging device - Google Patents

Device and method for filter processing, and imaging device Download PDF

Info

Publication number
JP2009010711A
JP2009010711A JP2007170341A JP2007170341A JP2009010711A JP 2009010711 A JP2009010711 A JP 2009010711A JP 2007170341 A JP2007170341 A JP 2007170341A JP 2007170341 A JP2007170341 A JP 2007170341A JP 2009010711 A JP2009010711 A JP 2009010711A
Authority
JP
Japan
Prior art keywords
pixel
value
image
difference
limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007170341A
Other languages
Japanese (ja)
Inventor
Yuuri Miura
祐理 三浦
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2007170341A priority Critical patent/JP2009010711A/en
Publication of JP2009010711A publication Critical patent/JP2009010711A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To control ringing due to filter processing. <P>SOLUTION: In the filter processing, a local area L around a target pixel Pa is set within an image with changing the position of the target pixel Pa, and a pixel value Xa of the target pixel Pa is converted according to a specified operation result based on pixel values within the set local area L. Before the operation, the pixel value Xb of each surrounding pixel Pb rather than the target pixel Pa within the local area L is subjected to limit processing. The surrounding pixel Pb is sequentially selected from the local area L, and then the difference ¾Xa-Xb¾ with respect to the pixel value Xa of the target pixel Pa is calculated. The pixel value Xb is changed so that the difference ¾Xa-Xb¾ is configured to be a limit value Xr (or less than the limit value Xr) for the surrounding pixel Pb, the difference ¾Xa-Xb¾ of which is greater than the limit value Xr. The limit value Xr is set so as to be linked to the surrounding pixel Pb and monotonically decrease with separating from the target pixel Pa. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、顔検出処理などに先立ち、前処理として画像に対してフィルタ処理を施すフィルタ処理装置及び方法、並びに、そのフィルタ処理装置を備えた撮影装置に関する。   The present invention relates to a filter processing device and method for performing filter processing on an image as preprocessing prior to face detection processing and the like, and an imaging device including the filter processing device.

近年、デジタルカメラ等の撮影装置には、人物を含む撮影シーンにおいて顔部分にピントや露出が合った画像を容易かつ確実に撮影することができるように、人物の顔を自動検出し、検出した顔エリアに対して焦点調節や露出調節を行う顔検出機能を備えたものがある。この顔検出は、画像中から部分画像を順次に切り出し、切り出した部分画像が顔であるか否かを、予め学習したデータに基づいて判定することによりなされる(例えば、特許文献1参照)。   2. Description of the Related Art In recent years, a photographing device such as a digital camera has automatically detected and detected a person's face so that an image in which the face portion is in focus and exposure can be easily and reliably photographed in a photographing scene including the person. Some have a face detection function that performs focus adjustment and exposure adjustment on the face area. This face detection is performed by sequentially cutting out partial images from an image and determining whether or not the cut out partial images are faces based on previously learned data (see, for example, Patent Document 1).

上記の撮影装置において、撮影条件が悪く、顔部分の明るさやコントラストが良好でない場合には、顔の検出率が低下するといった問題がある。例えば、逆光撮影時には、図14(A)に示すように、顔エリアは、暗くコントラストが低下するため、検出率は極端に低下する。   In the above-described photographing apparatus, when the photographing condition is bad and the brightness and contrast of the face portion are not good, there is a problem that the face detection rate is lowered. For example, at the time of backlight photographing, as shown in FIG. 14A, the face area is dark and the contrast is lowered, so that the detection rate is extremely lowered.

かかる問題を解決するために、前処理として、画像のコントラストを顔検出処理に適した所定レベルに揃えるように、画像に正規化処理と称されるフィルタ処理を施すことが提案されている。この正規化処理としては、画像内に注目画素を中心とした所定サイズ(例えば、7×7画素)の局所領域を設定し、注目画素の位置を変更しながら、その局所領域における画素値の分散の程度を一定レベルに揃えるべく、注目画素の画素値(輝度値)を変換(階調変換)する手法が知られている。図14(A)に示す画像にこの正規化処理を施すと、顔エリアは、図14(B)に示すように、明るさ及びコントラストが拡大して顔の特徴が鮮明化し、その結果、検出率が改善される。
特開2007−25766号公報
In order to solve such a problem, it has been proposed to perform a filtering process called a normalization process on the image so that the contrast of the image is adjusted to a predetermined level suitable for the face detection process. As this normalization processing, a local area of a predetermined size (for example, 7 × 7 pixels) centered on the target pixel is set in the image, and the pixel value distribution in the local area is changed while changing the position of the target pixel. A method of converting (gradation conversion) the pixel value (luminance value) of the target pixel is known in order to make the degree of the above constant at a certain level. When this normalization process is performed on the image shown in FIG. 14A, the face area is enlarged in brightness and contrast and the facial features are sharpened as shown in FIG. The rate is improved.
JP 2007-25766 Gazette

しかしながら、上記の正規化処理により、図14(B)に示すように、被写体の輪郭部にリンギングが発生するといった問題がある。このリンギングが生じた領域(リンギング領域)では、画素値が大きく変化し、オーバーシュート/アンダーシュートが生じている。このため、右側の人物のように顔の大きさが小さい場合には、顔エリアに対するリンギング領域の割合が大きく、リンギングが大きく影響するため、顔の検出率が特に低下する。   However, there is a problem that ringing occurs in the contour portion of the subject as shown in FIG. In the region where the ringing occurs (ringing region), the pixel value changes greatly, and overshoot / undershoot occurs. For this reason, when the size of the face is small like the person on the right side, the ratio of the ringing area to the face area is large, and the ringing has a large influence, so that the face detection rate is particularly lowered.

なお、このリンギングによる問題は、フィルタ処理としてエッジ検出処理(特徴抽出処理)を行う場合にも発生する。また、この問題は、顔以外の被写体の特定部分を検出する場合においても生じることは言うまでもない。   This problem due to ringing also occurs when edge detection processing (feature extraction processing) is performed as filter processing. Needless to say, this problem also occurs when a specific part of the subject other than the face is detected.

本発明は、上記課題を鑑みてなされたものであり、リンギングの発生を抑制することができるフィルタ処理装置及び方法、並びに、そのフィルタ処理装置を備えた撮影装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a filter processing device and method capable of suppressing the occurrence of ringing, and an imaging device including the filter processing device.

上記目的を達成するために、本発明のフィルタ処理装置は、注目画素の位置を変更しながら、注目画素を中心とした局所領域を画像内に順次に設定し、設定した局所領域内の各画素値に基づく所定の演算処理の結果に基づいて、注目画素の画素値を変換するフィルタ処理装置において、前記演算処理に先立ち、局所領域内の注目画素以外の各周辺画素の画素値を、注目画素の画素値との差分が、各周辺画素に対応付けて設定した制限値以下となるように変更するリミット処理手段を備えたことを特徴とする。   In order to achieve the above object, the filter processing apparatus of the present invention sequentially sets a local region around the target pixel in the image while changing the position of the target pixel, and sets each pixel in the set local region. In the filter processing device that converts the pixel value of the target pixel based on the result of the predetermined calculation process based on the value, prior to the calculation process, the pixel value of each peripheral pixel other than the target pixel in the local region There is provided a limit processing means for changing so that a difference from the pixel value becomes equal to or less than a limit value set in association with each peripheral pixel.

また、本発明のフィルタ処理装置は、注目画素の位置を変更しながら、注目画素を中心とした局所領域を画像内に順次に設定する局所領域設定手段と、前記局所領域設定変更手段によって設定された局所領域内から注目画素以外の各周辺画素を順次に選択する周辺画素選択手段と、前記周辺画素選択手段によって選択された周辺画素の画素値と注目画素の画素値との差分を算出する差分算出手段と、前記差分算出手段によって算出された差分が、各周辺画素に対応付けて設定した制限値より大きいか否かを判定する判定手段と、前記判定手段によって差分が制限値より大きいと判定された場合に、差分を制限値以下とするように該周辺画素の画素値を変更する周辺画素値変更手段と、前記周辺画素値変更手段によって変更された周辺画素の画素値を含め、局所領域内の各画素値に基づいて所定の演算処理を行い、演算処理の結果に基づいて注目画素の画素値を変換する注目画素変換手段と、を備えたことを特徴とする。   The filter processing device of the present invention is set by a local region setting unit that sequentially sets a local region around the target pixel in the image while changing the position of the target pixel, and the local region setting change unit. A peripheral pixel selecting unit that sequentially selects each peripheral pixel other than the target pixel from within the local region, and a difference for calculating a difference between the pixel value of the peripheral pixel selected by the peripheral pixel selecting unit and the pixel value of the target pixel A calculating unit; a determining unit that determines whether or not the difference calculated by the difference calculating unit is greater than a limit value set in association with each peripheral pixel; and the determination unit determines that the difference is greater than a limit value A peripheral pixel value changing unit that changes a pixel value of the peripheral pixel so that the difference is less than or equal to a limit value, and an image of the peripheral pixel changed by the peripheral pixel value changing unit. A pixel-of-interest conversion means for performing predetermined arithmetic processing based on each pixel value in the local region including the value and converting the pixel value of the target pixel based on the result of the arithmetic processing. .

なお、前記判定手段は、注目画素から離れるに従い単調減少するように前記制限値を設定していることが好ましい。   The determination unit preferably sets the limit value so as to monotonously decrease as the distance from the target pixel increases.

また、前記周辺画素値変更手段は、前記判定手段によって差分が制限値より大きいと判定された場合に、差分が制限値と一致するように該周辺画素の画素値を変更することが好ましい。   Moreover, it is preferable that the surrounding pixel value changing unit changes the pixel value of the surrounding pixel so that the difference matches the limit value when the determination unit determines that the difference is larger than the limit value.

また、前記周辺画素値変更手段は、前記判定手段によって差分が制限値より大きいと判定された場合に、差分をゼロとするように該周辺画素の画素値を変更することも好ましい。   The surrounding pixel value changing unit preferably changes the pixel value of the surrounding pixel so that the difference is zero when the determining unit determines that the difference is larger than the limit value.

また、前記判定手段は、各周辺画素ごとに第1及び第2の制限値を設定しており、各周辺画素の画素値と注目画素の画素値との関係に基づき、前記第1及び第2の制限値を前記制限値として択一的に用いることが好ましい。   Further, the determination means sets first and second limit values for each peripheral pixel, and the first and second limit values are based on the relationship between the pixel value of each peripheral pixel and the pixel value of the target pixel. It is preferable to alternatively use the limit value as the limit value.

また、前記判定手段は、前記各第1の制限値を、対応する前記第2の制限値より大きい値に設定しており、各周辺画素の画素値と注目画素の画素値との差分の平均が所定の閾値以上である場合には前記第1の制限値を用い、各周辺画素の画素値と注目画素の画素値との差分の平均が前記閾値未満である場合には前記第2の制限値を用いることがさらに好ましい。   Further, the determination means sets each first limit value to a value larger than the corresponding second limit value, and averages the difference between the pixel value of each peripheral pixel and the pixel value of the target pixel Is equal to or greater than a predetermined threshold value, the first limit value is used. If the average difference between the pixel value of each peripheral pixel and the pixel value of the target pixel is less than the threshold value, the second limit value is used. More preferably, the value is used.

また、前記注目画素変換手段は、局所正規化処理またはエッジ検出処理を行うものであることが好ましい。   Further, it is preferable that the pixel-of-interest conversion unit performs a local normalization process or an edge detection process.

また、本発明のフィルタ処理方法は、注目画素の位置を変更しながら、注目画素を中心とした局所領域を画像内に順次に設定し、設定した局所領域内の各画素値に基づく所定の演算処理の結果に基づいて、注目画素の画素値を変換するフィルタ処理方法において、前記演算処理に先立ち、局所領域内の注目画素以外の各周辺画素の画素値を、注目画素の画素値との差分が、各周辺画素に対応付けて設定した制限値以下となるように変更することを特徴とする。   In addition, the filter processing method of the present invention sequentially sets a local region around the target pixel in the image while changing the position of the target pixel, and performs a predetermined calculation based on each pixel value in the set local region. In the filter processing method for converting the pixel value of the target pixel based on the processing result, prior to the calculation process, the pixel values of the surrounding pixels other than the target pixel in the local region are compared with the pixel values of the target pixel. Is changed to be equal to or less than a limit value set in association with each peripheral pixel.

また、本発明の撮影装置は、上記のフィルタ処理装置を備え、撮像素子によって得た画像に対して前記フィルタ処理装置にてフィルタ処理を施した後、被写体の特定部分を画像中から検出する撮影装置において、多分割測光により前記画像が逆光状態であるか否かを判定し、前記画像が逆光状態である場合には前記リミット処理を行い、前記画像が逆光状態でない場合には前記リミット処理を行わないように前記フィルタ処理装置の制御を行う制御手段を備えたことを特徴とする。   In addition, a photographing apparatus according to the present invention includes the above-described filter processing device, and performs a filtering process on the image obtained by the image sensor with the filter processing device, and then detects a specific portion of the subject from the image. In the apparatus, it is determined whether or not the image is in a backlight state by multi-division metering, the limit process is performed when the image is in a backlight state, and the limit process is performed when the image is not in a backlight state. Control means for controlling the filter processing apparatus so as not to perform the control is provided.

なお、前記特定部分は、人物の顔であることが好ましい。   The specific portion is preferably a human face.

本発明は、フィルタ処理の演算処理に先立ち、局所領域内の注目画素以外の各周辺画素の画素値を、注目画素の画素値との差分が、各周辺画素に対応付けて設定した制限値以下とするように変更するので、注目画素と周辺画素との画素値の差分が大きい領域(逆光時の被写体の輪郭部など)にフィルタ処理を行うことによるリンギングの発生を抑制することができる。また、注目画素から離れるに従い単調減少するように制限値を設定することにより、注目画素から離れた周辺画素が及ぼす影響を低減し、リンギングの発生をより効果的に抑制することができる。また、各周辺画素ごとに第1及び第2の制限値を設定し、各周辺画素の画素値と注目画素の画素値との関係に基づき、第1及び第2の制限値を上記制限値として択一的に用いることにより、リンギングの発生をさらに効果的に抑制することができる。   In the present invention, prior to the calculation processing of the filter processing, the difference between the pixel value of each peripheral pixel other than the target pixel in the local region and the pixel value of the target pixel is equal to or less than the limit value set in association with each peripheral pixel. Therefore, it is possible to suppress the occurrence of ringing caused by performing the filtering process on a region (such as a contour portion of a subject at the time of backlighting) where the difference between the pixel values of the target pixel and the surrounding pixels is large. In addition, by setting the limit value so as to monotonously decrease as the distance from the target pixel increases, it is possible to reduce the influence of peripheral pixels that are distant from the target pixel, and to more effectively suppress the occurrence of ringing. Also, first and second limit values are set for each peripheral pixel, and the first and second limit values are set as the limit values based on the relationship between the pixel value of each peripheral pixel and the pixel value of the target pixel. By using it alternatively, the occurrence of ringing can be more effectively suppressed.

また、多分割測光により画像が逆光状態であるか否かを判定し、画像が逆光状態である場合には前記リミット処理を行い、画像が逆光状態でない場合には前記リミット処理を行わないようにフィルタ処理装置の制御を行う撮影装置を構成することにより、フィルタ処理の効率化を図ることができる。   Further, it is determined whether or not the image is in a backlight state by multi-division metering, and the limit process is performed when the image is in a backlight state, and the limit process is not performed when the image is not in a backlight state. By configuring the photographing device that controls the filter processing device, the efficiency of the filter processing can be improved.

図1において、デジタルカメラ10は、操作部11、CPU12、フォーカスレンズ13、絞り14、撮像素子15、レンズドライバ16、レンズモータ17、絞りドライバ18、絞りモータ19、画像処理回路20、内蔵メモリ21、AE/AF演算回路22、顔検出回路23、表示回路24、メモリカードスロット25、モニタ26等により構成されている。   In FIG. 1, the digital camera 10 includes an operation unit 11, a CPU 12, a focus lens 13, an aperture 14, an image sensor 15, a lens driver 16, a lens motor 17, an aperture driver 18, an aperture motor 19, an image processing circuit 20, and a built-in memory 21. AE / AF calculation circuit 22, face detection circuit 23, display circuit 24, memory card slot 25, monitor 26, and the like.

操作部11は、ユーザがデジタルカメラ10に撮影指示をなすためのレリーズボタン、各種設定操作を行うための十字キーや決定ボタン、顔検出を実行するための顔検出実行ボタンなどからなり、ユーザの操作に応じた操作信号をCPU12に伝達する。CPU12は、操作部11から入力された操作信号に基づいて、CPU12内のメモリに記憶されたプログラムを実行し、デジタルカメラ10の各部の制御を行う。   The operation unit 11 includes a release button for the user to give a shooting instruction to the digital camera 10, a cross key and a determination button for performing various setting operations, a face detection execution button for executing face detection, and the like. An operation signal corresponding to the operation is transmitted to the CPU 12. Based on the operation signal input from the operation unit 11, the CPU 12 executes a program stored in the memory in the CPU 12 and controls each unit of the digital camera 10.

フォーカスレンズ13は、被写体像を絞り14を介して撮像素子15の受光面上に結像させる。レンズドライバ16は、CPU12からの指令に基づいてレンズモータ17を駆動して、フォーカスレンズ13を光軸方向に沿って移動させ、ピント調節を行う。絞り14は、撮像素子15への入射光量を開閉状態に応じて増減させる。絞りドライバ18は、CPU12からの指令に基づいて絞りモータ19を駆動して、絞り14の開閉状態を変化させ、入射光量の調節を行う。   The focus lens 13 forms a subject image on the light receiving surface of the image sensor 15 through the diaphragm 14. The lens driver 16 drives the lens motor 17 based on a command from the CPU 12, moves the focus lens 13 along the optical axis direction, and performs focus adjustment. The diaphragm 14 increases or decreases the amount of light incident on the image sensor 15 according to the open / close state. The aperture driver 18 drives the aperture motor 19 based on a command from the CPU 12 to change the open / close state of the aperture 14 and adjust the amount of incident light.

撮像素子15は、フォーカスレンズ13及び絞り14を介して入射した被写体像を光電変換し、電気的な画像信号に変換するCCD型やCMOS型のイメージセンサであり、CPU12からの指令に基づいて撮像を行う。なお、撮像素子15は、電子的に露光時間(電荷蓄積時間)を調節する電子シャッタ機能を備えている。画像処理回路20は、撮像素子15から出力された画像信号に画像処理を施し、画像データを生成する。具体的には、画像処理回路20は、撮像素子15から出力された画像信号をアナログ/デジタル変換してデジタル信号を生成したうえで、色補間、YC(輝度・色差)変換、ガンマ補正などの各種信号処理を施し、生成した画像データを内蔵メモリ21に記録する。内蔵メモリ21としては、例えば、フラッシュメモリなどの不揮発性の半導体メモリを用いる。   The image sensor 15 is a CCD type or CMOS type image sensor that photoelectrically converts a subject image incident through the focus lens 13 and the diaphragm 14 and converts the subject image into an electrical image signal, and performs imaging based on a command from the CPU 12. I do. The image sensor 15 has an electronic shutter function for electronically adjusting the exposure time (charge accumulation time). The image processing circuit 20 performs image processing on the image signal output from the image sensor 15 to generate image data. Specifically, the image processing circuit 20 performs analog / digital conversion on the image signal output from the image sensor 15 to generate a digital signal, and then performs color interpolation, YC (luminance / color difference) conversion, gamma correction, and the like. Various signal processing is performed, and the generated image data is recorded in the built-in memory 21. As the built-in memory 21, for example, a non-volatile semiconductor memory such as a flash memory is used.

AE/AF演算回路22は、内蔵メモリ21に記録された画像データに基づいて、自動露出調節(AE)のためのAEデータ(被写体輝度)と、自動焦点調節(AF)のためのAFデータ(コントラスト値)とを画像中の所定領域について算出し、算出値をCPU12に入力する。AEの実行時には、CPU12は、AE/AF演算回路22から入力されるAEデータに基づいて絞りドライバ18及び撮像素子15を制御し、絞り値及びシャッタ速度で決定される露出量の調節を行う。また、AFの実行時には、CPU12は、AE/AF演算回路22から入力されるAFデータに基づいてレンズドライバ16を制御し、AFデータが最大となる位置へフォーカスレンズ13を移動させることにより、焦点調節(ピント調節)を行う。   Based on the image data recorded in the built-in memory 21, the AE / AF arithmetic circuit 22 is AE data (subject brightness) for automatic exposure adjustment (AE) and AF data (automatic focus adjustment (AF) data ( The contrast value is calculated for a predetermined area in the image, and the calculated value is input to the CPU 12. When executing AE, the CPU 12 controls the aperture driver 18 and the image sensor 15 based on AE data input from the AE / AF arithmetic circuit 22 and adjusts the exposure amount determined by the aperture value and the shutter speed. Further, when executing AF, the CPU 12 controls the lens driver 16 based on the AF data input from the AE / AF arithmetic circuit 22 and moves the focus lens 13 to a position where the AF data is maximized. Adjust (focus adjustment).

顔検出回路23は、詳しくは後述するが、内蔵メモリ21に記録された画像データに基づき、被写体の顔エリアの位置及び大きさの検出を行う。デジタルカメラ10の顔検出機能が有効となっている場合には、AE/AF演算回路22は、顔検出回路23によって検出された顔エリアからAEデータ及びAFデータの算出を行い、CPU12は、この算出結果に基づいてAE/AF制御を実行する。なお、1つの画像から複数の顔エリアが検出された場合には、AE制御は、全ての顔エリアを対象として行うが、AF制御は、種々の条件(顔エリアの大きさや位置)から1つの顔エリアを選択し、選択した顔エリアを対象として行う。   As will be described in detail later, the face detection circuit 23 detects the position and size of the face area of the subject based on the image data recorded in the built-in memory 21. When the face detection function of the digital camera 10 is enabled, the AE / AF calculation circuit 22 calculates AE data and AF data from the face area detected by the face detection circuit 23, and the CPU 12 AE / AF control is executed based on the calculation result. When a plurality of face areas are detected from one image, the AE control is performed on all face areas, but the AF control is performed based on various conditions (the size and position of the face area). A face area is selected, and the selected face area is selected as a target.

表示回路24は、内蔵メモリ21に格納された画像データ、あるいはメモリカードスロット25に装着されたメモリカードに格納された画像データに基づき、モニタ26に表示を行うための画面データを生成する。モニタ26は、液晶ディスプレイなどからなる画像表示装置であり、表示回路24が生成した画面データを表示する。メモリカードスロット25は、挿入されたメモリカードに対する画像データの書き込みや読み出し、あるいは消去を行う。   The display circuit 24 generates screen data to be displayed on the monitor 26 based on the image data stored in the built-in memory 21 or the image data stored in the memory card installed in the memory card slot 25. The monitor 26 is an image display device including a liquid crystal display and displays the screen data generated by the display circuit 24. The memory card slot 25 writes, reads, or erases image data with respect to the inserted memory card.

図2において、顔検出回路23は、輝度信号抽出部30、多重解像度化部31、フィルタ処理部32、顔検出処理部34、及び重複検出判定部35によって構成されており、フィルタ処理部32はリミット処理部33を備えている。輝度信号抽出部30は、内蔵メモリ21に格納された画像データから輝度信号(Y信号)のみを抽出して、グレー階調の画像S0を生成する。ここで、輝度の階調数は8ビット(画素値の範囲は0から255)とする。   In FIG. 2, the face detection circuit 23 includes a luminance signal extraction unit 30, a multi-resolution conversion unit 31, a filter processing unit 32, a face detection processing unit 34, and a duplicate detection determination unit 35. A limit processing unit 33 is provided. The luminance signal extraction unit 30 extracts only the luminance signal (Y signal) from the image data stored in the built-in memory 21, and generates a gray-scale image S0. Here, the number of gradations of luminance is 8 bits (pixel value range is 0 to 255).

多重解像度化部31は、輝度信号抽出部30によって生成された画像S0の解像度(画像サイズ)を変換することにより、短辺が416画素の矩形サイズに規格化し、そして、規格化がなされた画像S0’を基準としてさらに解像度を変換することにより、解像度の異なる複数の画像からなる多重解像度画像群S1を生成する。具体的には、図3に示すように、画像S0’を基準画像S1_1とし、短辺及び長辺を2−1/3倍ずつ縮小することにより、短辺がそれぞれ、330画素,262画素,208画素,165画素,・・・の複数枚の画像S1_2,S1_3,S1_4,S1_5,・・・を生成し、これらを多重解像度画像群S1とする。このように、多重解像度画像群S1を生成する理由は、一定の大きさの顔サンプル画像を用いて、様々なサイズの顔を検出するためである。 The multi-resolution unit 31 normalizes the rectangular side having a short side of 416 pixels by converting the resolution (image size) of the image S0 generated by the luminance signal extraction unit 30, and then normalizes the image. By further converting the resolution based on S0 ′, a multi-resolution image group S1 composed of a plurality of images having different resolutions is generated. Specifically, as shown in FIG. 3, by the image S0 'as a reference image S1_1, to reduce the short sides and long sides by two -1/3 times, the short side respectively, 330 pixels, 262 pixels, A plurality of images S1_2, S1_3, S1_4, S1_5,... With 208 pixels, 165 pixels,... Are generated and set as a multi-resolution image group S1. As described above, the reason why the multi-resolution image group S1 is generated is to detect faces of various sizes using a face sample image having a certain size.

フィルタ処理部32は、顔検出の精度を高めるための前処理として、多重解像度画像群S1の各画像に対して、明るさ及びコントラストのばらつきを抑制すべく正規化処理を施す。具体的には、図4に示す手順で処理を行う。まず、多重解像度画像群S1から1つの画像を選択する(ステップS1)。次いで、図5に示すように、選択した画像中における1つの画素を注目画素Paとして設定し、この注目画素Paを中心として所定サイズ(7×7画素)の局所領域Lを設定する(ステップS2)。   The filter processing unit 32 performs normalization processing on each image of the multi-resolution image group S1 as pre-processing for improving the accuracy of face detection so as to suppress variations in brightness and contrast. Specifically, the processing is performed according to the procedure shown in FIG. First, one image is selected from the multi-resolution image group S1 (step S1). Next, as shown in FIG. 5, one pixel in the selected image is set as the target pixel Pa, and a local region L having a predetermined size (7 × 7 pixels) is set around the target pixel Pa (step S2). ).

次いで、設定した局所領域Lにおいて、注目画素Pa以外の周辺画素Pbについて、リミット処理部33によりリミット処理を行う(ステップS3)。具体的には、リミット処理部33は、図6に示すように、まず、1つの周辺画素Pbを選択し(ステップS3−1)、注目画素Paとの画素値の差分|Xa−Xb|を算出する(ステップS3−2)。ここで、Xaは注目画素Paの画素値、Xbは周辺画素Pbの画素値である。次いで、差分|Xa−Xb|が制限値Xr(Xr>0)より大きいか否かを判定する(ステップS3−3)。なお、制限値Xrは、図7に示すように、各周辺画素Pbの位置に対応付けられ、注目画素Paの位置から離れるに従い単調に減少するように設定されている。   Next, in the set local region L, limit processing is performed on the peripheral pixels Pb other than the target pixel Pa by the limit processing unit 33 (step S3). Specifically, as illustrated in FIG. 6, the limit processing unit 33 first selects one peripheral pixel Pb (step S <b> 3-1), and calculates a difference | Xa−Xb | of the pixel value from the target pixel Pa. Calculate (step S3-2). Here, Xa is the pixel value of the target pixel Pa, and Xb is the pixel value of the peripheral pixel Pb. Next, it is determined whether or not the difference | Xa−Xb | is greater than the limit value Xr (Xr> 0) (step S3-3). As shown in FIG. 7, the limit value Xr is associated with the position of each peripheral pixel Pb, and is set so as to decrease monotonously as the distance from the position of the target pixel Pa increases.

ステップS3−3において、差分|Xa−Xb|が制限値Xrより大きいと判定された場合には、差分符号方向(注目画素値Xaと周辺画素値Xbとの大小関係)を同一に保ったまま周辺画素値Xbの変換を行う(ステップS3−4〜ステップS3−6)。具体的には、まず、注目画素値Xaが周辺画素値Xbより大きいか否かを判定する(ステップS3−4)。ステップS3−4において注目画素値Xaが周辺画素値Xbより大きいと判定された場合には、注目画素値Xaとの画素値の差分を制限値Xrとすべく、周辺画素値Xbを数式「Xb’=Xa+Xr」に基づいて変更する(ステップS3−5)。ステップS3−4において注目画素値Xaが周辺画素値Xb以下であると判定された場合には、注目画素値Xaとの画素値の差分を制限値Xrとすべく、周辺画素値Xbを数式「Xb’=Xa−Xr」に基づいて変更する(ステップS3−6)。ここで、Xb’は、周辺画素Pbの変更後の画素値である。   If it is determined in step S3-3 that the difference | Xa-Xb | is greater than the limit value Xr, the difference sign direction (the magnitude relationship between the target pixel value Xa and the peripheral pixel value Xb) is kept the same. The peripheral pixel value Xb is converted (steps S3-4 to S3-6). Specifically, first, it is determined whether or not the target pixel value Xa is larger than the peripheral pixel value Xb (step S3-4). If it is determined in step S3-4 that the target pixel value Xa is larger than the peripheral pixel value Xb, the peripheral pixel value Xb is expressed by the formula “Xb” so that the difference between the target pixel value Xa and the target pixel value Xa is the limit value Xr. It changes based on '= Xa + Xr' (step S3-5). When it is determined in step S3-4 that the target pixel value Xa is equal to or smaller than the peripheral pixel value Xb, the peripheral pixel value Xb is expressed by the formula “in order to set the difference between the target pixel value Xa and the target pixel value Xa as the limit value Xr. Change based on “Xb ′ = Xa−Xr” (step S3-6). Here, Xb ′ is a pixel value after the change of the peripheral pixel Pb.

一方、ステップS3−3において、差分|Xa−Xb|が制限値Xr以下であると判定された場合には、周辺画素値Xbの変更は行わない。そして、ステップS3−1で選択した周辺画素Pbが局所領域L内の最終画素であるか否かを判定する(ステップS3−7)。ステップS3−7において、その周辺画素Pbが最終画素でないと判定された場合には、ステップS3−1に戻り、同じ局所領域L内の次の画素を周辺画素Pbとして選択する。一方、ステップS3−7において、その周辺画素Pbが最終画素であると判定された場合には、図4のフローチャートのステップS4に移行する。このように、ステップS3により、各局所領域Lについて注目画素Paとの距離が大きい周辺画素Pbほどより厳しくリミット処理が行われるため、続く正規化処理において注目画素Paから離れた周辺画素Pbの画素値Xbの注目画素値Xaとの差分が強く相関して生じる「リンギング」が抑制される。   On the other hand, if it is determined in step S3-3 that the difference | Xa−Xb | is equal to or smaller than the limit value Xr, the surrounding pixel value Xb is not changed. Then, it is determined whether or not the peripheral pixel Pb selected in step S3-1 is the last pixel in the local region L (step S3-7). If it is determined in step S3-7 that the peripheral pixel Pb is not the final pixel, the process returns to step S3-1, and the next pixel in the same local region L is selected as the peripheral pixel Pb. On the other hand, if it is determined in step S3-7 that the peripheral pixel Pb is the final pixel, the process proceeds to step S4 in the flowchart of FIG. As described above, since the limit processing is performed more severely in the local region L with respect to the local pixel Pb having a greater distance from the target pixel Pa in each local region L, the pixel of the peripheral pixel Pb that is separated from the target pixel Pa in the subsequent normalization processing. “Ringing” caused by a strong correlation between the difference between the value Xb and the target pixel value Xa is suppressed.

ステップS4では、局所領域L内の画素値(Xaを含む)の分散Vlocalを算出する。次いで、算出した分散Vlocalが閾値C1以上であるか否かを判定する(ステップS5)。ステップS5において、分散Vlocalが閾値C1以上であると判定された場合には、第1の階調変換処理として、下記の式(1)に基づいて注目画素値Xaの変換を行う(ステップS6)。一方、ステップS5において、分散Vlocalが閾値C2未満であると判定された場合には、第2の階調変換処理として、下記の式(2)に基づいて注目画素値Xaの変換を行う(ステップS7)。   In step S4, a variance Vlocal of pixel values (including Xa) in the local region L is calculated. Next, it is determined whether or not the calculated variance Vlocal is greater than or equal to the threshold value C1 (step S5). If it is determined in step S5 that the variance Vlocal is greater than or equal to the threshold C1, the pixel value Xa of interest is converted based on the following equation (1) as the first gradation conversion processing (step S6). . On the other hand, when it is determined in step S5 that the variance Vlocal is less than the threshold value C2, the pixel value Xa of interest is converted based on the following equation (2) as the second gradation conversion process (step S5). S7).

Figure 2009010711
Figure 2009010711

ここで、Xa’は注目画素Paの変換後の画素値、mlocalは局所領域L内の画素値(Xaを含む)の平均、SDlocalは局所領域L内の画素値(Xaを含む)の標準偏差(分散Vlocalの平方根)、C2は基準値、SDcは所定の定数である。つまり、上記の式(1)は、分散Vlocalが所定レベルC1以上である局所領域Lに対して、この分散の程度を所定レベルより高い一定レベル(C2×C2)に近づけるように変換を行い、上記の式(2)は、分散Vlocalが所定レベルC1未満である局所領域Lに対して、この分散の程度を一定レベル(C2×C2)より低いレベルに抑えるように変換を行うものである。なお、ステップS4,S6,S7の分散Vlocal及び平均mlocalの演算時には、ステップS3にてリミット処理が行われた周辺画素Pbについては、変更後の画素値Xb’を用いる。   Here, Xa ′ is a pixel value after conversion of the target pixel Pa, mlocal is an average of pixel values (including Xa) in the local region L, and SDlocal is a standard deviation of pixel values (including Xa) in the local region L. (Square root of variance Vlocal), C2 is a reference value, and SDc is a predetermined constant. That is, the above equation (1) performs conversion so that the degree of dispersion approaches a constant level (C2 × C2) higher than the predetermined level for the local region L where the distribution Vlocal is equal to or higher than the predetermined level C1. The above equation (2) performs conversion so that the degree of dispersion is suppressed to a level lower than a certain level (C2 × C2) for the local region L where the dispersion Vlocal is less than the predetermined level C1. When calculating the variance Vlocal and the average mlocal in steps S4, S6, and S7, the pixel value Xb 'after the change is used for the peripheral pixel Pb subjected to the limit process in step S3.

ステップS5〜S7は、局所領域Lの単位ごとに処理を施す局所正規化処理であり、この処理が終了すると、次いで、ステップS2で設定した注目画素Paが画像内の最終画素であるか否かを判定する(ステップS8)。ステップS8において、その注目画素Paが最終画素でないと判定された場合には、ステップS2に戻り、同じ画像上の次の画素を注目画素Paとして設定し、これと同時に新たな注目画素Paを中心とした局所領域Lを設定する。なお、新たな局所領域Lを設定した際、その局所領域L内の画素値は変換前の画素値Xa,Xbとする。一方、ステップS8において、その注目画素Paが最終画素であると判定された場合には、ステップS1で選択した画像が多重解像度画像群S1の最終画像であるか否かを判定する(ステップS9)。ステップS9において、その画像が最終画像でないと判定された場合には、ステップS1に戻り、次の画像を選択する。一方、ステップS9において、その画像が最終画像であると判定された場合には、多重解像度画像群S1に対するフィルタ処理を終了する。つまり、図8に示すように、多重解像度画像群S1の各画像について上記のフィルタ処理を施すことにより、リンギングの発生が抑えられながら適切な正規化処理が施された多重解像度画像群S1’が得られる。   Steps S <b> 5 to S <b> 7 are local normalization processing that performs processing for each unit of the local region L. When this processing ends, next, whether or not the target pixel Pa set in step S <b> 2 is the last pixel in the image. Is determined (step S8). If it is determined in step S8 that the target pixel Pa is not the final pixel, the process returns to step S2, the next pixel on the same image is set as the target pixel Pa, and at the same time, the new target pixel Pa is centered. A local region L is set. Note that when a new local region L is set, the pixel values in the local region L are the pixel values Xa and Xb before conversion. On the other hand, if it is determined in step S8 that the target pixel Pa is the final pixel, it is determined whether or not the image selected in step S1 is the final image of the multi-resolution image group S1 (step S9). . If it is determined in step S9 that the image is not the final image, the process returns to step S1 to select the next image. On the other hand, if it is determined in step S9 that the image is the final image, the filtering process for the multi-resolution image group S1 is terminated. That is, as shown in FIG. 8, by performing the above filter processing on each image of the multi-resolution image group S1, the multi-resolution image group S1 ′ subjected to appropriate normalization processing while suppressing occurrence of ringing is obtained. can get.

図2に戻り、顔検出処理部34は、フィルタ処理部32によって生成された多重解像度画像群S1’の各画像S1’_1,S1’_2,S1’_3,・・・において、図9に示すように、所定サイズ(32×32画素)の部分画像Wを、切り出し位置を1画素ずつ変更しながら順次に切り出し、切り出した部分画像Wが顔画像であるか否かを判別することにより、画像上の顔エリアを検出する。部分画像Wが顔画像であるか否かを判別は、顔であることが分かっている複数の顔サンプル画像群と、顔でないことが分かっている複数の非顔サンプル群とを用いて、顔であることの特徴を学習した判別器を用いて行う。この判別器については、特開2007−25766号公報において詳しく開示されている。   Returning to FIG. 2, the face detection processing unit 34 shows the images S1′_1, S1′_2, S1′_3,... Of the multi-resolution image group S1 ′ generated by the filter processing unit 32 as shown in FIG. As described above, the partial image W having a predetermined size (32 × 32 pixels) is sequentially cut out while changing the cutout position pixel by pixel, and it is determined whether the cut out partial image W is a face image. Detect the upper face area. Whether or not the partial image W is a face image is determined by using a plurality of face sample image groups that are known to be faces and a plurality of non-face sample groups that are known not to be faces. This is done using a discriminator that has learned the feature of being. This discriminator is disclosed in detail in Japanese Patent Application Laid-Open No. 2007-25766.

顔検出処理部34による顔検出処理では、多重解像度画像群S1’の異なる画像間で同一の顔を重複して検出してしまうことがある。これは、部分画像Wのサイズに対して検出可能な顔の大きさにある程度の幅があるためである。重複検出判定部35は、顔検出処理部34によって検出された顔エリアの位置情報に基づいて、多重解像度画像群S1’の各画像上で検出された顔エリアのうち、同一のものを1つの顔エリアとしてまとめる処理を行い、画像S0上の真の顔エリアの位置及び大きさを特定する。この顔検出情報は、CPU12に入力される。   In the face detection processing by the face detection processing unit 34, the same face may be detected repeatedly between different images of the multi-resolution image group S1 '. This is because the size of the face that can be detected with respect to the size of the partial image W has a certain width. Based on the position information of the face area detected by the face detection processing unit 34, the overlap detection determination unit 35 selects one of the same face areas detected on each image of the multi-resolution image group S1 ′. A process of grouping as a face area is performed, and the position and size of the true face area on the image S0 are specified. This face detection information is input to the CPU 12.

次に、以上のように構成されたデジタルカメラ10の作用について説明する。デジタルカメラ10は、静止画撮影モードに設定が行われると、撮像素子15が所定の周期で撮像動作を行い、画像処理回路20にて画像処理を施した画像をスルー画像としてモニタ26に順次に表示する。ユーザは、モニタ26に表示されるスルー画像により被写体のフレーミングを行うことができる。この際、ユーザにより、操作部11に含まれる顔検出実行ボタンが押下されると、デジタルカメラ10は、前述のように、画像から人物の顔を自動検出し、検出した顔エリアに対して自動的にピント及び露出を設定する、いわゆる「顔認識AF&AE」を実行する。そして、ユーザによりシャッタボタンが押下されると、顔エリアに対してピント及び露出が最適化された画像をデータとして取得し、内蔵メモリ21あるいはメモリカードスロット25に装着されたメモリカードに記録する。   Next, the operation of the digital camera 10 configured as described above will be described. When the digital camera 10 is set to the still image shooting mode, the image pickup device 15 performs an image pickup operation at a predetermined cycle, and the image processed by the image processing circuit 20 is sequentially displayed on the monitor 26 as a through image. indicate. The user can perform framing of the subject using the through image displayed on the monitor 26. At this time, when the user presses a face detection execution button included in the operation unit 11, the digital camera 10 automatically detects a person's face from the image and automatically detects the detected face area as described above. So-called “face recognition AF & AE” is executed to set the focus and exposure. When the user presses the shutter button, an image in which focus and exposure are optimized with respect to the face area is acquired as data, and is recorded in the internal memory 21 or a memory card attached to the memory card slot 25.

デジタルカメラ10は、顔検出実行ボタンの押下に応じて顔検出を行う際、顔検出の精度を高めるために、前処理として画像に正規化処理を施すが、この正規化処理時に設定する局所領域L内の各周辺画素Xbについて、注目画素値Xaとの差分を制限値Xr以内とするように画素値Xbを変更するリミット処理を行うため、顔エリアの周囲等に発生するリンギングが抑制され、顔検出の検出率が向上する。特に、リンギングの影響が大きい小さな顔エリアに関しては、検出率が飛躍的に向上する。なお、このリンギング抑制方法は、前述した逆光時だけでなく、スポットライトや反射光の部分的な写り込みなどの影響に対しても効果的である。   When the digital camera 10 performs face detection in response to pressing of the face detection execution button, in order to increase the accuracy of face detection, normalization processing is performed on the image as preprocessing. For each peripheral pixel Xb in L, since the limit process is performed to change the pixel value Xb so that the difference from the target pixel value Xa is within the limit value Xr, ringing that occurs around the face area is suppressed, The detection rate of face detection is improved. In particular, the detection rate is dramatically improved for a small face area that is greatly affected by ringing. This ringing suppression method is effective not only for the above-described backlight but also for the influence of spotlights and partial reflection of reflected light.

なお、上記実施形態では、リミット処理に用いる制限値Xrを、図7に示すように、周辺画素Pbの位置に応じて変化させているが、本発明はこれに限定されるものではなく、制限値Xrを周辺画素Pbの位置に依らない固定値としてもよく、この場合にもリンギング抑制の効果が得られる。図10は、制限値Xrを「64」に固定した例を示している。   In the above embodiment, the limit value Xr used for the limit process is changed according to the position of the peripheral pixel Pb as shown in FIG. 7, but the present invention is not limited to this and is limited. The value Xr may be a fixed value that does not depend on the position of the peripheral pixel Pb. In this case as well, the effect of suppressing ringing can be obtained. FIG. 10 shows an example in which the limit value Xr is fixed to “64”.

また、上記実施形態では、1つの周辺画素Pbに対して1つの制限値Xrを設定しているが、本発明はこれに限定されるものではなく、1つの周辺画素Pbに対して複数の制限値を設定し、種々の条件に基づき、これらの制限値を切り替えながらリミット処理を行っても良い。例えば、図11(A)に示すように第1の制限値Xr_1を設定し、図11(B)に示すように第2の制限値Xr_2を設定し、これらを注目画素値Xaと周辺画素値Xbとの関係から切り替えて使用する。なお、同一周辺画素Pbの位置において、第2の制限値Xr_2は、第1の制限値Xr_1より小さく設定している。   In the above embodiment, one limit value Xr is set for one peripheral pixel Pb. However, the present invention is not limited to this, and a plurality of limits are set for one peripheral pixel Pb. Limit processing may be performed by setting values and switching these limit values based on various conditions. For example, the first limit value Xr_1 is set as shown in FIG. 11A, the second limit value Xr_2 is set as shown in FIG. 11B, and these are set as the target pixel value Xa and the peripheral pixel value. It is used by switching from the relationship with Xb. Note that the second limit value Xr_2 is set smaller than the first limit value Xr_1 at the position of the same peripheral pixel Pb.

図12は、第1及び第2の制限値Xr_1,Xr_2の具体的な切り替え手順を示す。この手順は、リミット処理部33により、図6のステップS3−2とステップS3−3との間にて実施される。つまり、リミット処理部33は、ステップS3−2の後、局所領域Lにおける差分|Xa−Xb|の平均Ave(|Xa−Xb|)の算出を行う(ステップS10)。次いで、算出した平均Ave(|Xa−Xb|)が所定の閾値C3以上であるか否かの判定を行う(ステップS11)。ステップS11において、平均Ave(|Xa−Xb|)が閾値C3以上である場合には、第1の制限値Xr_1を選択し、これを以降のステップにて制限値Xrとして用いる。一方、ステップS11において、平均Ave(|Xa−Xb|)が閾値C3未満である場合には、第2の制限値Xr_2を選択し、これを以降のステップにて制限値Xrとして用いる。これにより、差分|Xa−Xb|が大きい周辺画素Pbの影響をより効果的に抑制することができる。   FIG. 12 shows a specific switching procedure between the first and second limit values Xr_1 and Xr_2. This procedure is performed by the limit processing unit 33 between step S3-2 and step S3-3 in FIG. That is, after step S3-2, the limit processing unit 33 calculates the average Ave (| Xa-Xb |) of the difference | Xa-Xb | in the local region L (step S10). Next, it is determined whether or not the calculated average Ave (| Xa−Xb |) is equal to or greater than a predetermined threshold C3 (step S11). In step S11, when the average Ave (| Xa−Xb |) is equal to or greater than the threshold value C3, the first limit value Xr_1 is selected and used as the limit value Xr in subsequent steps. On the other hand, if the average Ave (| Xa−Xb |) is less than the threshold value C3 in step S11, the second limit value Xr_2 is selected and used as the limit value Xr in subsequent steps. Thereby, it is possible to more effectively suppress the influence of the peripheral pixel Pb having a large difference | Xa−Xb |.

また、上記実施形態では、差分|Xa−Xb|が制限値Xrより大きい場合に、その周辺画素Pbの画素値Xbを、注目画素値Xaとの差分が制限値Xrとなるように変更(図6のステップS3−5,S3−6)しているが、本発明はこれに限定されるものではなく、注目画素値Xaとの差分を制限値Xr未満とするように該周辺画素Pbの画素値Xbを変更しても良い。例えば、差分|Xa−Xb|が制限値Xrより大きい場合に、その差分をゼロとするように、該周辺画素Pbの画素値Xbを注目画素値Xaの値で置換する(つまり、「Xb’=Xa」とする)ことも好ましい。   In the above embodiment, when the difference | Xa−Xb | is larger than the limit value Xr, the pixel value Xb of the surrounding pixel Pb is changed so that the difference from the target pixel value Xa becomes the limit value Xr (see FIG. However, the present invention is not limited to this, and the pixels of the peripheral pixel Pb are set so that the difference from the target pixel value Xa is less than the limit value Xr. The value Xb may be changed. For example, when the difference | Xa−Xb | is larger than the limit value Xr, the pixel value Xb of the surrounding pixel Pb is replaced with the value of the target pixel value Xa so that the difference becomes zero (that is, “Xb ′ = Xa ") is also preferable.

また、上記実施形態では、顔検出処理を行う場合に、画像の露光状態とは無関係にリミット処理(図4のステップS3)を施しているが、本発明はこれに限定されるものではなく、画像の露光状態に基づいてリミット処理のオン/オフを切り替えても良い。例えば、CPU12により、図13に示すように、まず、画像S0に基づいて多分割測光(複数のエリアに分割して、各エリアごとに露出値を算出する測光方式)を行い(ステップS20)、画像S0の中央部と周辺部との輝度差を比較することにより、逆光状態であるか否かの判定を行う(ステップS21)。ステップS21において、中央部の輝度が周辺部の輝度より所定値以上低く逆光状態である場合には、リミット処理部33によるリミット処理をオンと設定する(ステップS22)。一方、ステップS21において、中央部と周辺部とで輝度差がなく逆光状態でない場合には、リミット処理部33によるリミット処理をオフと設定する(ステップS23)。ステップS23にてオフと設定された場合には、図4のフローチャートにて、ステップS3のリミット処理をスキップする。これにより、画像の露光状態が悪く、リンギングが発生しやすい場合にのみリミット処理を実行するため、フィルタ処理の効率化が図られる。   In the above embodiment, when performing the face detection process, the limit process (step S3 in FIG. 4) is performed regardless of the exposure state of the image, but the present invention is not limited to this. Limit processing may be switched on / off based on the exposure state of the image. For example, as shown in FIG. 13, the CPU 12 first performs multi-division photometry (photometry method that divides into a plurality of areas and calculates an exposure value for each area) based on the image S0 (step S20). By comparing the luminance difference between the central portion and the peripheral portion of the image S0, it is determined whether or not the backlight is in the backlit state (step S21). In step S21, when the luminance at the central portion is lower than the luminance at the peripheral portion by a predetermined value or more in the backlight state, the limit processing by the limit processing unit 33 is set to ON (step S22). On the other hand, in step S21, when there is no luminance difference between the central portion and the peripheral portion and the backlight is not in the backlit state, the limit processing by the limit processing unit 33 is set to OFF (step S23). When it is set to OFF in step S23, the limit process of step S3 is skipped in the flowchart of FIG. As a result, the limit process is executed only when the exposure state of the image is poor and ringing is likely to occur, so that the efficiency of the filter process can be improved.

また、上記実施形態では、フィルタ処理部32が行うフィルタ処理として正規化処理を例に挙げて説明しているが、本発明はこれに限定されるものではなく、フィルタ処理としてエッジ検出処理を行う場合にも適用可能である。このエッジ検出処理としては、例えば、ラプラシアンフィルタを用いたフィルタ処理が知られている。このラプラシアンフィルタ処理は、注目画素を中心とした局所領域を設定し、局所領域内の各画素にフィルタ係数を乗算し、係数が乗算された画素値をすべて加算したものを新しい注目画素値とする演算処理である。リンギングは、注目画素を中心とした局所領域内の画素値に基づく演算により注目画素値の変換を行うフィルタ処理に共通した問題であり、本発明を適用することによりリンギングを抑制することができる。   In the above embodiment, the normalization process is described as an example of the filter process performed by the filter processing unit 32. However, the present invention is not limited to this, and the edge detection process is performed as the filter process. It is also applicable to cases. As this edge detection process, for example, a filter process using a Laplacian filter is known. In this Laplacian filter processing, a local region centered on the pixel of interest is set, each pixel in the local region is multiplied by a filter coefficient, and all pixel values multiplied by the coefficient are added as a new pixel value of interest. Arithmetic processing. Ringing is a problem common to filter processing for converting a target pixel value by a calculation based on a pixel value in a local region centered on the target pixel, and ringing can be suppressed by applying the present invention.

また、上記実施形態では、画像処理回路20、AE/AF演算回路22、及び顔検出回路23をハードウェア的な回路として機能ブロックにて示しているが、本発明はこれに限定されるものではなく、前述の各処理手順を記述したプログラムと、このプログラムに基づいて処理を実行するコンピュータにて構成することも可能である。   In the above-described embodiment, the image processing circuit 20, the AE / AF arithmetic circuit 22, and the face detection circuit 23 are shown as functional circuits as hardware circuits. However, the present invention is not limited to this. Instead, it may be configured by a program describing each processing procedure described above and a computer that executes processing based on the program.

また、上記実施形態では、多重解像度画像群S1の各画像のサイズ、局所領域Lのサイズ、部分画像Wのサイズとして具体的な数値を示しているが、これらは一例であり、適宜変更可能である。   In the above embodiment, specific numerical values are shown as the size of each image of the multi-resolution image group S1, the size of the local region L, and the size of the partial image W. However, these are merely examples and can be changed as appropriate. is there.

また、上記実施形態では、人物の顔を検出対象とした顔検出処理を例示しているが、顔に限られず、被写体の特定部分を検出する特定部分検出処理の全般に適用可能である。   In the above-described embodiment, the face detection process using a human face as a detection target is illustrated. However, the present invention is not limited to a face, and can be applied to a specific part detection process for detecting a specific part of a subject.

最後に、特許請求の範囲中の構成要件と実施形態の対応関係について説明する。局所領域設定手段は、図4中のステップS2,S8で表されたフィルタ処理部32の機能に対応する。周辺画素選択手段は、図6中のステップS3−1,S3−7で表されたリミット処理部33の機能に対応する。差分算出手段は、図6中のステップS3−2で表されたリミット処理部33の機能に対応する。判定手段は、図6中のステップS3−3で表されたリミット処理部33の機能に対応する。周辺画素値変更手段は、図6中のステップS3−4〜S3−6で表されたリミット処理部33の機能に対応する。注目画素変換手段は、図4中のステップS4〜S7で表されたフィルタ処理部32の機能に対応する。そして、制御手段は、図13のフローチャートで表されたCPU12の機能に対応する。   Finally, the correspondence between the constituent elements in the claims and the embodiments will be described. The local region setting means corresponds to the function of the filter processing unit 32 represented by steps S2 and S8 in FIG. The peripheral pixel selection means corresponds to the function of the limit processing unit 33 represented in steps S3-1 and S3-7 in FIG. The difference calculation means corresponds to the function of the limit processing unit 33 represented in step S3-2 in FIG. The determination unit corresponds to the function of the limit processing unit 33 represented in step S3-3 in FIG. The peripheral pixel value changing unit corresponds to the function of the limit processing unit 33 expressed in steps S3-4 to S3-6 in FIG. The pixel-of-interest conversion unit corresponds to the function of the filter processing unit 32 represented in steps S4 to S7 in FIG. And a control means respond | corresponds to the function of CPU12 represented with the flowchart of FIG.

デジタルカメラの構成を示すブロック図である。It is a block diagram which shows the structure of a digital camera. 顔検出回路の構成を示すブロック図である。It is a block diagram which shows the structure of a face detection circuit. 多重解像度画像群の生成工程を示す図である。It is a figure which shows the production | generation process of a multi-resolution image group. 正規化処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a normalization process. 注目画素を中心として設定する局所領域の例を示す図である。It is a figure which shows the example of the local area | region set centering on an attention pixel. リミット処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a limit process. リミット処理に用いる制限値を例示する図である。It is a figure which illustrates the limit value used for a limit process. 正規化処理を概念的に示す図である。It is a figure which shows the normalization process notionally. 顔検出処理を概念的に示す図である。It is a figure which shows a face detection process notionally. 周辺画素の位置に依らず制限値を固定した例を示す図である。It is a figure which shows the example which fixed the limit value irrespective of the position of the surrounding pixel. 同一周辺画素に関して切り替えて用いる2つの制限値を例示する図であり、(A)は第1の制限値、(B)第2の制限値を示す。It is a figure which illustrates two limit values used switching about the same surrounding pixel, (A) shows the 1st limit value and (B) the 2nd limit value. 第1及び第2の制限値の切り替え手順を示すフローチャートである。It is a flowchart which shows the switching procedure of the 1st and 2nd limit value. 画像の露光状態に基づき、リミット処理を切り替える例を示すフローチャートである。It is a flowchart which shows the example which switches a limit process based on the exposure state of an image. 従来技術の問題点を説明するための図である。It is a figure for demonstrating the problem of a prior art.

符号の説明Explanation of symbols

10 デジタルカメラ(撮影装置)
12 CPU(制御手段)
15 撮像素子
20 画像処理回路
21 内蔵メモリ
22 AE/AF演算回路
23 顔検出回路
30 輝度信号抽出部
31 多重解像度化部
32 フィルタ処理部(フィルタ処理装置)
33 リミット処理部(リミット処理手段)
34 顔検出処理部
35 重複検出判定部
10 Digital camera (photographing device)
12 CPU (control means)
DESCRIPTION OF SYMBOLS 15 Image pick-up element 20 Image processing circuit 21 Built-in memory 22 AE / AF arithmetic circuit 23 Face detection circuit 30 Luminance signal extraction part 31 Multi-resolution part 32 Filter processing part (filter processing apparatus)
33 Limit processing section (limit processing means)
34 Face detection processing unit 35 Duplicate detection determination unit

Claims (11)

注目画素の位置を変更しながら、注目画素を中心とした局所領域を画像内に順次に設定し、設定した局所領域内の各画素値に基づく所定の演算処理の結果に基づいて、注目画素の画素値を変換するフィルタ処理装置において、
前記演算処理に先立ち、局所領域内の注目画素以外の各周辺画素の画素値を、注目画素の画素値との差分が、各周辺画素に対応付けて設定した制限値以下となるように変更するリミット処理手段を備えたことを特徴とするフィルタ処理装置。
While changing the position of the pixel of interest, a local area centered on the pixel of interest is sequentially set in the image, and based on the result of a predetermined calculation process based on each pixel value in the set local area, In a filter processing device that converts pixel values,
Prior to the calculation process, the pixel value of each peripheral pixel other than the target pixel in the local region is changed so that the difference from the pixel value of the target pixel is equal to or less than the limit value set in association with each peripheral pixel. A filter processing apparatus comprising a limit processing means.
注目画素の位置を変更しながら、注目画素を中心とした局所領域を画像内に順次に設定する局所領域設定手段と、
前記局所領域設定変更手段によって設定された局所領域内から注目画素以外の各周辺画素を順次に選択する周辺画素選択手段と、
前記周辺画素選択手段によって選択された周辺画素の画素値と注目画素の画素値との差分を算出する差分算出手段と、
前記差分算出手段によって算出された差分が、各周辺画素に対応付けて設定した制限値より大きいか否かを判定する判定手段と、
前記判定手段によって差分が制限値より大きいと判定された場合に、差分を制限値以下とするように該周辺画素の画素値を変更する周辺画素値変更手段と、
前記周辺画素値変更手段によって変更された周辺画素の画素値を含め、局所領域内の各画素値に基づいて所定の演算処理を行い、演算処理の結果に基づいて注目画素の画素値を変換する注目画素変換手段と、
を備えたことを特徴とするフィルタ処理装置。
Local area setting means for sequentially setting a local area around the target pixel in the image while changing the position of the target pixel;
Peripheral pixel selection means for sequentially selecting each peripheral pixel other than the target pixel from within the local area set by the local area setting change means;
Difference calculating means for calculating a difference between the pixel value of the peripheral pixel selected by the peripheral pixel selecting means and the pixel value of the target pixel;
Determining means for determining whether or not the difference calculated by the difference calculating means is larger than a limit value set in association with each peripheral pixel;
A peripheral pixel value changing unit that changes the pixel value of the peripheral pixel so that the difference is equal to or less than the limit value when the determination unit determines that the difference is greater than the limit value;
Including the pixel value of the peripheral pixel changed by the peripheral pixel value changing means, a predetermined calculation process is performed based on each pixel value in the local region, and the pixel value of the target pixel is converted based on the result of the calculation process Attention pixel conversion means;
A filter processing apparatus comprising:
前記判定手段は、注目画素から離れるに従い単調減少するように前記制限値を設定していることを特徴とする請求項2に記載のフィルタ処理装置。   The filter processing apparatus according to claim 2, wherein the determination unit sets the limit value so as to monotonously decrease as the distance from the target pixel increases. 前記周辺画素値変更手段は、前記判定手段によって差分が制限値より大きいと判定された場合に、差分が制限値と一致するように該周辺画素の画素値を変更することを特徴とする請求項2または3に記載のフィルタ処理装置。   The surrounding pixel value changing unit changes the pixel value of the surrounding pixel so that the difference matches the limit value when the determination unit determines that the difference is larger than the limit value. The filter processing device according to 2 or 3. 前記周辺画素値変更手段は、前記判定手段によって差分が制限値より大きいと判定された場合に、差分をゼロとするように該周辺画素の画素値を変更することを特徴とする請求項2または3に記載のフィルタ処理装置。   The peripheral pixel value changing unit changes the pixel value of the peripheral pixel so that the difference becomes zero when the determination unit determines that the difference is larger than a limit value. 4. The filter processing device according to 3. 前記判定手段は、各周辺画素ごとに第1及び第2の制限値を設定しており、各周辺画素の画素値と注目画素の画素値との関係に基づき、前記第1及び第2の制限値を前記制限値として択一的に用いることを特徴とする請求項2から5いずれか1項に記載のフィルタ処理装置。   The determination means sets first and second limit values for each peripheral pixel, and the first and second limit values are based on the relationship between the pixel value of each peripheral pixel and the pixel value of the target pixel. The filter processing apparatus according to claim 2, wherein a value is alternatively used as the limit value. 前記判定手段は、前記各第1の制限値を、対応する前記第2の制限値より大きい値に設定しており、各周辺画素の画素値と注目画素の画素値との差分の平均が所定の閾値以上である場合には前記第1の制限値を用い、各周辺画素の画素値と注目画素の画素値との差分の平均が前記閾値未満である場合には前記第2の制限値を用いることを特徴とする請求項6に記載のフィルタ処理装置。   The determination unit sets each first limit value to a value larger than the corresponding second limit value, and an average of a difference between a pixel value of each peripheral pixel and a pixel value of a target pixel is predetermined. The first limit value is used when the threshold value is equal to or greater than the threshold value, and when the average difference between the pixel values of the surrounding pixels and the pixel value of the target pixel is less than the threshold value, the second limit value is set. The filter processing apparatus according to claim 6, wherein the filter processing apparatus is used. 前記注目画素変換手段は、局所正規化処理またはエッジ検出処理を行うものであることを特徴とする請求項2から7いずれか1項に記載のフィルタ処理装置。   The filter processing apparatus according to claim 2, wherein the pixel-of-interest conversion unit performs a local normalization process or an edge detection process. 注目画素の位置を変更しながら、注目画素を中心とした局所領域を画像内に順次に設定し、設定した局所領域内の各画素値に基づく所定の演算処理の結果に基づいて、注目画素の画素値を変換するフィルタ処理方法において、
前記演算処理に先立ち、局所領域内の注目画素以外の各周辺画素の画素値を、注目画素の画素値との差分が、各周辺画素に対応付けて設定した制限値以下となるように変更することを特徴とするフィルタ処理方法。
While changing the position of the pixel of interest, a local area centered on the pixel of interest is sequentially set in the image, and based on the result of a predetermined calculation process based on each pixel value in the set local area, In a filter processing method for converting a pixel value,
Prior to the calculation process, the pixel value of each peripheral pixel other than the target pixel in the local region is changed so that the difference from the pixel value of the target pixel is equal to or less than the limit value set in association with each peripheral pixel. A filtering method characterized by the above.
請求項1に記載のフィルタ処理装置を備え、撮像素子によって得た画像に対して前記フィルタ処理装置にてフィルタ処理を施した後、被写体の特定部分を画像中から検出する撮影装置において、
多分割測光により前記画像が逆光状態であるか否かを判定し、前記画像が逆光状態である場合には前記リミット処理を行い、前記画像が逆光状態でない場合には前記リミット処理を行わないように前記フィルタ処理装置の制御を行う制御手段を備えたことを特徴とする撮影装置。
An imaging device comprising the filter processing device according to claim 1, wherein the image processing device detects a specific portion of the subject from the image after performing filter processing on the image obtained by the image sensor with the filter processing device.
It is determined whether or not the image is in a backlight state by multi-division metering, and the limit process is performed when the image is in a backlight state, and the limit process is not performed when the image is not in a backlight state. An imaging apparatus comprising: control means for controlling the filter processing apparatus.
前記特定部分は、人物の顔であることを特徴とする請求項10に記載の撮影装置。   The photographing apparatus according to claim 10, wherein the specific portion is a human face.
JP2007170341A 2007-06-28 2007-06-28 Device and method for filter processing, and imaging device Pending JP2009010711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007170341A JP2009010711A (en) 2007-06-28 2007-06-28 Device and method for filter processing, and imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007170341A JP2009010711A (en) 2007-06-28 2007-06-28 Device and method for filter processing, and imaging device

Publications (1)

Publication Number Publication Date
JP2009010711A true JP2009010711A (en) 2009-01-15

Family

ID=40325341

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007170341A Pending JP2009010711A (en) 2007-06-28 2007-06-28 Device and method for filter processing, and imaging device

Country Status (1)

Country Link
JP (1) JP2009010711A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250671A (en) * 2009-04-17 2010-11-04 Renesas Electronics Corp Difference image generation device, difference image generation method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250671A (en) * 2009-04-17 2010-11-04 Renesas Electronics Corp Difference image generation device, difference image generation method and program

Similar Documents

Publication Publication Date Title
EP3499863B1 (en) Method and device for image processing
JP7145208B2 (en) Method and Apparatus and Storage Medium for Dual Camera Based Imaging
US8629915B2 (en) Digital photographing apparatus, method of controlling the same, and computer readable storage medium
EP3480784B1 (en) Image processing method, and device
WO2020038072A1 (en) Exposure control method and device, and electronic device
JP5089405B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP6512810B2 (en) Image pickup apparatus, control method and program
KR101590868B1 (en) A image processing method an image processing apparatus a digital photographing apparatus and a computer-readable storage medium for correcting skin color
US8570429B2 (en) Image processing method and apparatus and digital photographing apparatus using the same
US9025050B2 (en) Digital photographing apparatus and control method thereof
KR20130031574A (en) Image processing method and image processing apparatus
US9020269B2 (en) Image processing device, image processing method, and recording medium
US7450756B2 (en) Method and apparatus for incorporating iris color in red-eye correction
US20110286680A1 (en) Medium storing image processing program, image processing device, and image processing method
JP2010072619A (en) Exposure operation device and camera
US8090253B2 (en) Photographing control method and apparatus using strobe
JP2007258925A (en) Imaging apparatus, and method of acquiring image
US11575841B2 (en) Information processing apparatus, imaging apparatus, method, and storage medium
US8570407B2 (en) Imaging apparatus, image processing program, image processing apparatus, and image processing method
US9143684B2 (en) Digital photographing apparatus, method of controlling the same, and computer-readable storage medium
JP2007258923A (en) Image processing apparatus, image processing method, image processing program
JP5103984B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2009010711A (en) Device and method for filter processing, and imaging device
JP3985005B2 (en) IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM FOR CAUSING COMPUTER TO EXECUTE THE CONTROL METHOD
JP2003322902A (en) Imaging unit and method for displaying luminance distribution chart