JP2008061209A - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
JP2008061209A
JP2008061209A JP2006239111A JP2006239111A JP2008061209A JP 2008061209 A JP2008061209 A JP 2008061209A JP 2006239111 A JP2006239111 A JP 2006239111A JP 2006239111 A JP2006239111 A JP 2006239111A JP 2008061209 A JP2008061209 A JP 2008061209A
Authority
JP
Japan
Prior art keywords
image
region
candidate
spatial frequency
size
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
JP2006239111A
Other languages
Japanese (ja)
Inventor
Shigeru Mizoguchi
茂 溝口
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 JP2006239111A priority Critical patent/JP2008061209A/en
Publication of JP2008061209A publication Critical patent/JP2008061209A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently detect a desired feature region from image data for use in image correction. <P>SOLUTION: On the basis of a range regarding chromaticity preset in relation to a desired feature region, a candidate region determined to have the preset chromaticity is determined in comparison with chromaticity predetermined at each compression block unit, and the size of one or a plurality of candidate image regions composed of a plurality of candidate blocks adjacent to one another is determined. At each of compression blocks within the candidate image region, the distribution or the amount of a spatial frequency component at each compression block unit within the feature region is inspected based on a range regarding a spatial frequency predetermined by image size information and the size of the candidate region, a block regarded to have the distribution or amount of the predetermined spatial frequency is determined, and regional data with a region composed of the determined compression block as a desired feature region are created. Furthermore, narrowing-down can be executed from the spatial frequency range based on the size of the final regional data. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は画像認識方法に関し、より詳細には、画像圧縮単位による空間周波数成分と色度を利用した画像データ中における所望の特徴領域を抽出する画像処理方法に関する。   The present invention relates to an image recognition method, and more particularly to an image processing method for extracting a desired feature region in image data using spatial frequency components and chromaticity in units of image compression.

写真撮影における一般的な問題として、シャッター速度やピント調節の問題を別にしても、と、色露出の問題、コントラスト(ラチェード)の問題、色温度の問題、色かぶりの問題が存在する。このような問題は、近年普及してきたデジタル・カメラなどでも同様に存在する。   General problems in photography include color exposure problems, contrast (ratchade) problems, color temperature problems, and color cast problems, apart from shutter speed and focus adjustment problems. Such a problem also exists in digital cameras and the like that have become popular in recent years.

そこで、従来のフィルム・カメラでは困難であったこれらの問題を、近年普及してきたデジタル・カメラにおいては、その特徴を生かして、良い画像の定義を行い、その定義に沿った、処理も可能になっている。たとえば、色温度対策としてのホワイト・バランス補正や、露出/コントラスト補正を自動で行うアプリケーションも一般的になってきている。また、従来のフィルム写真では不可能であったが、デジタル・カメラでは、これらの問題は後処理の問題としても存在し、さらに輪郭補正やガンマ補正等の問題も存在する。   Therefore, these problems, which were difficult with conventional film cameras, can be defined in the digital cameras that have become widespread in recent years. It has become. For example, an application that automatically performs white balance correction as a measure for color temperature and exposure / contrast correction has also become common. In addition, these problems exist as post-processing problems in digital cameras, which are impossible with conventional film photography, but there are also problems such as contour correction and gamma correction.

但し、このようなホワイト・バランス補正や、露出/コントラスト補正が撮影時に自動的に行われるデジタル・カメラであっても、撮影される環境は千差万別であり、必ずしもユーザにとっては適正に補正されていると言えない撮影画像は存在してしまう。その理由としては、良い画像というものは、画像全体の上記のようなバランスとは別に、画像の中の観察者が着目する被写体が、ユーザがイメージするような画像でなっているか?に応じて判断されるからである。このような判断処理は、撮像画像ごとに異なるのが普通であり、このような複雑な処理をデジタル・カメラでは実行することができない。可能なのは全てに通用する処理のみである。しかしながら、デジタル・カメラではユーザのこのような好みに合わせるように色々な撮影モードが設けられているが、そのような操作を撮影の度に行うことは煩雑であり、一挙動作で設定することができないのが通常である。したがって、そのような適切な撮影モードで撮像されることが少なく、またそのような撮影モードを良好な撮影画像とすることができるが、撮影したもの全てを良好な画像とすることはできない。   However, even with a digital camera that automatically performs white balance correction and exposure / contrast correction at the time of shooting, the shooting environment is different, and it is not necessarily correct for the user. There are still captured images that cannot be said to have been used. The reason is that a good image is an image that the user focuses on the subject that the observer in the image focuses on, apart from the balance as described above. It is because it is judged according to. Such a determination process is usually different for each captured image, and such a complicated process cannot be executed by a digital camera. All that is possible is a process that works for everything. However, the digital camera has various shooting modes to suit the user's preference. However, it is cumbersome to perform such an operation every time it is shot, and it can be set with a single action. It is usually not possible. Therefore, it is rare that an image is captured in such an appropriate shooting mode, and such a shooting mode can be set as a good shot image, but not all shot images can be set as a good image.

また、良い画像の条件の1つとして、画像中にはユーザが着目する重要な領域が存在する場合があり、その領域の状態が良く絵作りされていることが挙げられる。反対にそのような領域の状態が良く絵作りされていないと不満の残る画像となってしまう。このような一般的に、ユーザが着目する重要な領域としては、たとえば、人の顔や肌の部分などがある。   Further, as one of the conditions for a good image, there may be an important area in which the user pays attention, and the state of the area is well made. On the other hand, if the state of such a region is not well made, an unsatisfactory image is obtained. In general, examples of the important region that the user pays attention to include a human face and a skin portion.

従来においても、たとえば、放送局が使用するようなテレビジョン・カメラ(スタジオカメラ)においては、撮像した信号中の人の肌色部分を検出して、その部分の輪郭補正を弱めることが行われている。これは、肌色部分の僅かのレベル変化が輪郭補正(あるいはアパーチャー補正)で強調されないようにするためである。   Conventionally, for example, in a television camera (studio camera) used by a broadcasting station, a human skin color portion in an imaged signal is detected and the contour correction of the portion is weakened. Yes. This is to prevent a slight level change in the skin color portion from being emphasized by the contour correction (or aperture correction).

また、テレビジョン受信装置においても、受信した映像信号の色差信号から、1フレーム中の肌色部分の面積を検出して、その領域を人物肌領域として、輝度補正の目標設定値として利用し、ガンマ補正回路制御信号を作成することで、視聴者が映像の状態に応じた最適な映像信号補正状態でのテレビジョンの視聴を可能とすることも行われている(たとえば、特許文献1を参照)。   The television receiver also detects the area of the flesh color part in one frame from the color difference signal of the received video signal, uses that area as a human skin area, and uses it as a target setting value for luminance correction. By creating a correction circuit control signal, it is also possible for a viewer to view a television in an optimal video signal correction state corresponding to the video state (see, for example, Patent Document 1). .

また、撮像済みの画像を後処理するにあたり、圧縮記録された画像データから所定のブロックごとに空間周波数情報と色度情報とを取得して、これを画像データ中の注目画像の検索のために利用することも行われている(たとえば特許文献2を参照)。この場合、まず、まず交流周波数成分から特徴部分が検出され、次に検出した特徴部分に対して色度の特徴部分が検出されている。   In addition, when post-processing the captured image, spatial frequency information and chromaticity information are acquired for each predetermined block from the compressed and recorded image data, and this is used for searching for a target image in the image data. It is also used (see, for example, Patent Document 2). In this case, first, a feature portion is detected from the AC frequency component, and then a chromaticity feature portion is detected with respect to the detected feature portion.

特許第3203946号明細書Japanese Patent No. 3203946 特開2004−38480号明細書Japanese Patent Application Laid-Open No. 2004-38480

本発明は、デジタル・カメラなどの入力機器で撮影した画像(Jpeg画像など)を、たとえば、パーソナル・コンピュータを介して、あるいはダイレクトに(たとえば、インクジェット方式の)プリンタ等でプリントしようとする場合に、対処する。従来の銀塩写真では、現像されたネガフィルムに対して手操作が加えられた露光量を使用して印画紙に焼き付けられて、いわゆるプリントが作成されていた。すなわち、撮像した状態そのままでなく、少なくとも明るさ(輝度)(場合によっては色温度)に対する変更が、人手により適切に加えられてプリントが作成されていた。言い換えれば、撮像時のバラツキなどが、適切に補正されていた。しかしながら、デジタル・カメラなどの場合、撮像したデータを処理せずにプリントすることが可能である。この場合、撮像時のバラツキなどが適切に補正されないまま、プリントすることになり、同じようなシーンを撮像した場合でも、プリントされた結果は、銀塩写真とデジタル・カメラなどで異なることになる。この場合、適切に補正された銀塩写真のプリントと比較すると、デジタル・カメラなどプリント結果は適切な補正がされない分、よいプリントとは評価されないことになる。   The present invention is intended to print an image (such as a jpeg image) taken with an input device such as a digital camera, for example, via a personal computer or directly (for example, an ink jet type) printer or the like. ,deal with. In conventional silver halide photography, a so-called print was created by printing on a photographic paper using an exposure amount that was manually applied to the developed negative film. That is, not only the imaged state but also a change to at least brightness (luminance) (in some cases, color temperature) is appropriately applied manually to create a print. In other words, variation at the time of imaging was appropriately corrected. However, in the case of a digital camera or the like, it is possible to print the captured data without processing. In this case, printing is performed without properly correcting variations at the time of imaging, and even when a similar scene is imaged, the printed result differs between a silver halide photograph and a digital camera. . In this case, compared with a print of a silver halide photograph that has been appropriately corrected, the print result of a digital camera or the like is not evaluated as a good print because it is not appropriately corrected.

したがって、銀塩写真のプリントのように、デジタル・カメラなどの入力機器で撮影した画像中の人物などの注目画像が、より良くプリントできるように必要に応じて補正を行うことを可能にする必要がある。銀塩写真の場合には、印画紙への露光量を調節することで明るさを、また光源に適切な色温度変換フィルタを入れることで色温度を調節することが可能である。しかし、デジタル・カメラなどの入力機器で撮影した画像の場合は、この補正は、画像データそのものを、その画像データに応じて加工することで実現される。したがって、補正を行うためには、画像中の注目画像を見つけ出し、その注目画像部分のデータに基づいて補正処理を実行することが求められる。   Therefore, it is necessary to be able to make corrections as necessary so that attention images such as people in images taken with an input device such as a digital camera can be printed better, such as printing silver halide photographs. There is. In the case of a silver salt photograph, it is possible to adjust the brightness by adjusting the amount of exposure to the photographic paper and the color temperature by inserting an appropriate color temperature conversion filter in the light source. However, in the case of an image taken with an input device such as a digital camera, this correction is realized by processing the image data itself according to the image data. Therefore, in order to perform correction, it is required to find a target image in the image and perform correction processing based on the data of the target image portion.

また、デジタル・カメラからプリンタへ直接プリントを行うダイレクト・プリントなどのデータ処理能力の低いシステム構成でも使用できるように、この注目画像の検出処理は、できるだけその処理負荷が軽く済む方法が求められる。   Further, a method for reducing the processing load as much as possible is required for this attention image detection processing so that it can be used even in a system configuration with low data processing capability such as direct printing for direct printing from a digital camera to a printer.

この時に撮影データの中に人物など注目画像の有無の検出として人物の肌領域の検出を行う場合において、領域検出プロセスの中に、色度もしくは色度比率などの色成分による判定を加えている場合がある。また、その色度判定を行う場合、検出の対象として定義した色度は人の肌の色度分布より定義されたものである。また、検出対象の撮影データにおける被写体そのものの色度には差があり、さらに、撮影時の光源状態により、その被写体を撮像した結果としての画像の色度が影響を受けることとがわかっている。   At this time, when detecting the skin area of a person as the presence / absence of an image of interest such as a person in the photographed data, a determination based on color components such as chromaticity or chromaticity ratio is added to the area detection process. There is a case. When the chromaticity determination is performed, the chromaticity defined as the detection target is defined by the chromaticity distribution of the human skin. It is also known that there is a difference in the chromaticity of the subject itself in the shooting data to be detected, and that the chromaticity of the image as a result of imaging the subject is affected by the light source state at the time of shooting. .

この場合、画一の色度代表によるグループ検出処理だと、抽出領域が色度判定の結果により完全には検出できない、もしくは、同じ色相の対象外の領域を含んでしまい、抽出対象の検出が、不完全になる問題があった。   In this case, in the group detection process by the chromaticity representative of the uniform, the extraction area cannot be completely detected due to the result of the chromaticity determination, or the extraction target is not included in the same hue. There was an incomplete problem.

本発明は、上記問題点を、比較的、データ処理能力に制限があるような装置に置いて、注目画像の領域を効率よく、比較的正確に検出する方法を提供することを目的とする。言い換えれば、注目画像の領域を検出することによってし、その部分に対して適切な補正ができるようにする画像処理方法を提供することを目的とする。   An object of the present invention is to provide a method for efficiently and relatively accurately detecting a region of an image of interest by placing the above problem in an apparatus having relatively limited data processing capability. In other words, an object of the present invention is to provide an image processing method by which a region of a target image is detected and an appropriate correction can be performed on that portion.

本発明は、このような目的を達成するために、請求項1に記載の発明は、空間周波数成分、色度、および画像サイズ情報を有する圧縮画像データを入力して、当該画像データの中に、所望の特徴領域が存在するか否かと存在する場合に当該特徴領域を検出する画像処理方法であって、前記所望の特徴領域に関連付けて予め設定された色度に関する範囲に基づいて、前記圧縮画像データを圧縮ブロック単位ごとに検査し、圧縮ブロック単位ごとに予め定めた色度を有するか否かを判定して、予め定めた色度を有すると見なされる候補ブロックから構成される候補領域を決定する第1のステップと、互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第2のステップと、前記候補画像領域内の圧縮ブロックそれぞれに対して、前記画像サイズ情報と前記候補画像領域サイズにより予め定められる空間周波数に関する範囲に基づいて、前記候補画像領域内の圧縮ブロック単位ごとの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされる圧縮ブロックを決定する第3のステップと、前記第3のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成するステップとを備えることを特徴とする。   In order to achieve the above object, according to the present invention, the invention described in claim 1 inputs compressed image data having spatial frequency components, chromaticity, and image size information, and enters the image data. An image processing method for detecting whether or not a desired feature region exists, and detecting the feature region, wherein the compression is performed based on a range related to chromaticity set in advance in association with the desired feature region. The image data is inspected for each compressed block unit, and it is determined whether or not it has a predetermined chromaticity for each compressed block unit, and a candidate area composed of candidate blocks considered to have a predetermined chromaticity is determined. A first step of determining, a second step of determining a size of one or a plurality of candidate image areas composed of a plurality of candidate blocks adjacent to each other, and the inside of the candidate image area For each compressed block, the distribution or amount of the spatial frequency component for each compressed block unit in the candidate image area is inspected based on a range relating to the spatial frequency predetermined by the image size information and the candidate image area size. A third step of determining a compressed block that is considered to have a predetermined spatial frequency distribution or amount, and a region having a desired feature region defined by the compressed block determined in the third step And a step of creating data.

また、請求項2に記載の発明は、請求項1に記載の画像処理方法であって、互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第2のステップは、前記複数の候補画像領域のうちの最大の領域のサイズを求めることを含み、前記第3のステップは、前記画像サイズと前記最大の領域のサイズにより予め定められる空間周波数に関する範囲に基づくことを特徴とする。   Further, the invention according to claim 2 is the image processing method according to claim 1, wherein the second method obtains the size of one or a plurality of candidate image areas composed of a plurality of the candidate blocks adjacent to each other. The step includes obtaining a size of a maximum region among the plurality of candidate image regions, and the third step is performed within a range relating to a spatial frequency that is predetermined by the image size and the size of the maximum region. Based on.

また、請求項3に記載の発明は、請求項1又は2に記載の画像処理方法であって、前記第3のステップによって決定された領域のサイズを検出して、当該サイズと前記画像サイズにより予め定められる空間周波数に関する範囲に基づいて、前記候補画像領域内の圧縮ブロックそれぞれの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされる圧縮ブロックを決定する第4のステップをさらに備え、前記所望の特徴領域とした領域データを作成するステップは、前記第4のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成することを特徴とする。   The invention according to claim 3 is the image processing method according to claim 1 or 2, wherein the size of the region determined by the third step is detected, and the size and the image size are used. Based on a range related to a predetermined spatial frequency, the distribution or amount of each spatial frequency component in the compressed block in the candidate image region is examined, and a compressed block that is considered to have a predetermined spatial frequency distribution or amount is obtained. A fourth step of determining, wherein the step of creating the region data as the desired feature region includes the region data having the region composed of the compressed blocks determined in the fourth step as the desired feature region; It is characterized by creating.

また、請求項4に記載の発明は、請求項1又は2に記載の画像処理方法であって、前記第3のステップによって決定された領域内の空間周波数の頻度分布を調べて、当該頻度分布の上限と下限とが延長された範囲を新たな空間周波数適合値とする領域で、内部に前記ステップ3で決定された領域を含む領域を設定する第5のステップと、前記第5のステップで設定された領域について、前記所望の特徴領域に関連付けて予め設定された色度に関する範囲よりも拡大された範囲に基づいて、前記圧縮画像データを圧縮ブロック単位ごとに検査し、圧縮ブロック単位ごとに前記拡大され範囲の色度を有するか否かを判定して、有すると見なされる候補領域を決定する第6のステップと、前記第6のステップで決定された互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第7のステップと、前記前記第6のステップで決定された候補画像領域内の圧縮ブロックそれぞれに対して、前記画像サイズ情報と前記候補画像領域サイズにより予め定められる空間周波数に関する情報に基づいて、前記特徴領域内の圧縮ブロック単位ごとの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされるブロックを決定する第8のステップとをさらに備え、前記所望の特徴領域とした領域データを作成するステップは、前記第8のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成することを特徴とする。   The invention according to claim 4 is the image processing method according to claim 1 or 2, wherein the frequency distribution of the spatial frequency in the region determined by the third step is examined, and the frequency distribution is determined. In the fifth step, the region including the region determined in the step 3 is set as a region in which the range in which the upper and lower limits are extended is set as a new spatial frequency adaptive value, and in the fifth step For the set area, the compressed image data is inspected for each compressed block unit based on a range that is larger than the range related to chromaticity set in advance in association with the desired feature area, and for each compressed block unit. A sixth step of determining whether or not the enlarged chromaticity of the range is determined, and determining a candidate region considered to have a plurality of adjacent ones determined in the sixth step A seventh step for obtaining the size of one or a plurality of candidate image areas composed of complementary blocks, and the image size information for each compressed block in the candidate image area determined in the sixth step. And the spatial frequency component distribution or amount for each compressed block unit in the feature region based on the information on the spatial frequency predetermined by the candidate image region size, and the predetermined spatial frequency distribution or amount is determined. An eighth step of determining a block that is regarded as having the desired feature region, and the step of creating the region data as the desired feature region has a desired region defined by the compressed block determined in the eighth step. It is characterized by creating area data as a feature area.

また、請求項5に記載の発明は、請求項1に記載の画像処理方法であって、前記第1のステップは、予め定めた色度を有して特徴領域と見なされる候補ブロックを検出しない場合、および予め定めた色度を有して特徴領域と見なされる候補ブロックの互いに隣接ブロックから構成される1つあるいは複数の領域の最大のサイズが、予め定めたサイズよりも小さい場合、検出不成功を表すデータを出力し、前記第3のステップは、予め定めた空間周波数の分布あるいは量を有すると見なされるブロックを検出しない場合、および予め定めた空間周波数の分布あるいは量を有すると見なされる候補ブロックの互いに隣接ブロックから構成される1つあるいは複数の領域の最大のサイズが、予め定めたサイズよりも小さい場合、検出不成功を表すデータを出力し、前記領域データを作成するステップは、前記何れかの検出不成功を表すデータを入力した場合に、ヌル値を出力することを特徴とする。   The invention according to claim 5 is the image processing method according to claim 1, wherein the first step does not detect a candidate block having a predetermined chromaticity and regarded as a feature region. If the maximum size of one or a plurality of areas composed of adjacent blocks of candidate blocks having a predetermined chromaticity and regarded as a characteristic area is smaller than a predetermined size, detection is not possible. Outputs data representing success, and the third step is considered to have no predetermined spatial frequency distribution or amount if it does not detect a block that is considered to have a predetermined spatial frequency distribution or amount When the maximum size of one or a plurality of areas composed of blocks adjacent to each other in the candidate block is smaller than a predetermined size, a data indicating unsuccessful detection is detected. Outputs data, the step of creating the area data, when input data representative of the one of the detection failure, and outputs a null value.

また、請求項6に記載の発明は、請求項1に記載の画像処理方法であって、前記第3のステップは、前記圧縮画像データの前記画像サイズ情報とファイル・サイズおよび前記候補画像領域サイズにより予め定められる空間周波数に関する範囲に基づくことを特徴とする。   The invention according to claim 6 is the image processing method according to claim 1, wherein the third step includes the image size information, the file size, and the candidate image region size of the compressed image data. Based on a range relating to the spatial frequency determined in advance.

また、請求項7に記載の発明は、請求項1〜5の何れかに記載の画像処理方法であって、前記所望の特徴領域は、少なくとも人物の肌領域を含むことを特徴とする。   The invention according to claim 7 is the image processing method according to any one of claims 1 to 5, wherein the desired feature region includes at least a human skin region.

請求項8に記載の発明は、プログラムであって、空間周波数成分、色度、および画像サイズ情報を有する圧縮画像データを入力して、当該画像データの中に、所望の特徴領域が存在するか否かと存在する場合に当該特徴領域を検出するために、コンピュータに、前記所望の特徴領域に関連付けて予め設定された色度に関する範囲に基づいて、前記圧縮画像データを圧縮ブロック単位ごとに検査し、圧縮ブロック単位ごとに予め定めた色度を有するか否かを判定して、予め定めた色度を有すると見なされる候補ブロックから構成される候補領域を決定する第1のステップと、互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第2のステップと、前記候補画像領域内の圧縮ブロックそれぞれに対して、前記画像サイズ情報と前記候補領域サイズにより予め定められる空間周波数に関する範囲に基づいて、前記候補画像領域内の圧縮ブロック単位ごとの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされる圧縮ブロックを決定する第3のステップと、前記第3のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成するステップとを実行させることを特徴とする。   The invention according to claim 8 is a program that inputs compressed image data having spatial frequency components, chromaticity, and image size information, and whether a desired feature region exists in the image data. In order to detect the feature area when it exists, the compressed image data is inspected for each compressed block unit based on a range relating to chromaticity preset in association with the desired feature area. A first step of determining whether or not to have a predetermined chromaticity for each compressed block unit, and determining a candidate area composed of candidate blocks considered to have a predetermined chromaticity, adjacent to each other A second step of determining a size of one or a plurality of candidate image areas composed of a plurality of candidate blocks, and compressed blocks in the candidate image areas, respectively In contrast, the distribution or amount of the spatial frequency component for each compressed block unit in the candidate image area is inspected based on a range relating to the spatial frequency that is predetermined by the image size information and the candidate area size, and is predetermined. A third step of determining a compressed block that is considered to have a distribution or amount of spatial frequency, and creating region data having a region constituted by the compressed block determined in the third step as a desired feature region And executing a step.

また、請求項9に記載の発明は、コンピュータ読み取り可能記録媒体であって、請求項8に記載のプログラムを記録したことを特徴とする。   The invention described in claim 9 is a computer-readable recording medium, wherein the program described in claim 8 is recorded.

上記構成を有する本発明は、画像全体をみての画像補正では画質を良好に補正できない撮影画像データに対して、補正のために、所望の特徴領域を表すデータを作成することができ、その検出した特徴領域結果を補正に反映させることを可能にする。この補正にあたり、個別に必要に応じた特徴領域の抽出を、その撮影画像データに関連付けて精度良く行う判定手段を提供することを可能とするので、画像中の特徴領域の特性把握を正確に行うことできるようになる。また、その検出した特徴領域結果を補正処理に反映させることで、最終的に、撮影画像データに対して個別に良好な画像補正を実現することを可能とする。特に、抽出した対象領域に限定したフィルタ処理を実施する場合は、領域検出の精度が高い程効果があり、本発明の方法は、この高精度の領域検出に使用することができる。   In the present invention having the above-described configuration, it is possible to create data representing a desired feature region for correction of photographed image data whose image quality cannot be corrected satisfactorily by image correction for the entire image, and to detect the data. It is possible to reflect the result of the feature region thus corrected. In this correction, it is possible to provide a determination means that accurately extracts characteristic regions as needed individually in association with the captured image data, so that the characteristics of the characteristic regions in the image are accurately grasped. Be able to In addition, by reflecting the detected feature region result in the correction process, it is possible to finally realize good image correction individually for the captured image data. In particular, when the filtering process limited to the extracted target region is performed, the higher the region detection accuracy, the more effective, and the method of the present invention can be used for this highly accurate region detection.

(第1の実施形態)
以下、図面を参照して本発明の実施形態について説明する。
(First embodiment)
Hereinafter, embodiments of the present invention will be described with reference to the drawings.

通常、デジタル・カメラやデジタル・ビデオなどでは、静止画をJpegファイルにて保存することが一般的になっている。したがって、まず、現在、最も一般的な画像圧縮ファイルの“Jpeg file”における情報省略と符号化・復号化について、説明する。   Usually, in a digital camera, a digital video, and the like, it is common to save a still image as a Jpeg file. Accordingly, first, information omission and encoding / decoding in the most common image compression file “JPEG file” will be described.

(圧縮符号化の説明)
デジタル・カメラやデジタル・ビデオなどでは、撮像対象の画像は、RGBもしくはCMYフィルタを介して、入力機器の受光素子であるCCDなどに入る。入射した光信号を、電気信号として読み出してA/D変換し、フレーム・メモリに取り込む。次にこの情報を輝度と色度情報の2次元データ(ビットマップ)に変換する。その後、各2次元データ(ビットマップ)を8*8(64個)の画素からなる複数の正方画素ブロックに分割する。
(Description of compression encoding)
In a digital camera, digital video, or the like, an image to be captured enters a CCD, which is a light receiving element of an input device, via an RGB or CMY filter. The incident optical signal is read out as an electrical signal, A / D converted, and taken into the frame memory. Next, this information is converted into two-dimensional data (bitmap) of luminance and chromaticity information. After that, each two-dimensional data (bitmap) is divided into a plurality of square pixel blocks composed of 8 * 8 (64 pixels).

図1は、符号化の例を示しており、(1)で示す表は、輝度データのビットマップを、複数の8*8ブロックに分割したうちの1ブロックのデータ例を示している。各マス目内の数値は、8ビットで表された輝度値の10進表現の例を示している。(2)に示す表は、(1)に示す表の0〜255の画素値をレベル・シフトして−128〜127の信号に変換した後の値を示している。さらに、(3)に示す表は、(2)に示す表をDCT(離散コサイン変換)した結果のDCT係数の各係数値を示している。また、(4)に示す表は、視覚特性を考慮した量子化テーブルの例であり、高周波成分の省略を大きくした量子化テーブルの例を示している。この量子化テーブルを用いて、上記(3)に示すDCT係数に対して量子化を行うことになる。また、(5)に示す表は、量子化を行った結果の例を示している。この値をエントロピー符号化してハフマン符号で表すことにより符号化信号である圧縮データを生成する。   FIG. 1 shows an example of encoding, and the table shown in (1) shows an example of data of one block among the luminance data bitmap divided into a plurality of 8 * 8 blocks. A numerical value in each square indicates an example of a decimal representation of a luminance value represented by 8 bits. The table shown in (2) shows the values after the pixel values of 0 to 255 in the table shown in (1) are level-shifted and converted into signals of -128 to 127. Further, the table shown in (3) shows coefficient values of DCT coefficients obtained as a result of DCT (discrete cosine transform) on the table shown in (2). The table shown in (4) is an example of a quantization table in consideration of visual characteristics, and shows an example of a quantization table in which omission of high frequency components is increased. Using this quantization table, the DCT coefficients shown in (3) above are quantized. The table shown in (5) shows an example of the result of quantization. This value is entropy encoded and expressed by a Huffman code to generate compressed data that is an encoded signal.

次に、復号化においては、符号化の逆の工程を行う。圧縮データに対してエントロピー符号化の逆を実行して、量子化DCT係数の値を得る。次に、逆量子化を行うために量子化テーブルを乗ずることでDCT係数を得る。その後、逆DCTを行うことでレベル・シフトした画像が復元され、さらに逆レベル・シフトの値128を加算することで1ブロックの画像に復号される。この復号されたデータは、図1の(1)で示すようなデータである。   Next, in decoding, the reverse process of encoding is performed. The inverse of entropy coding is performed on the compressed data to obtain quantized DCT coefficient values. Next, a DCT coefficient is obtained by multiplying the quantization table to perform inverse quantization. Thereafter, the level-shifted image is restored by performing inverse DCT, and further, the inverse level shift value 128 is added to be decoded into one block image. The decoded data is data as shown in (1) of FIG.

図2は、図1の(3)に示すDCT変換後の係数データ配置のイメージを表したものである。“0”で示す部分は、直流(DC)成分のデータであり、“1〜63”で示す部分は、交流(AC)成分のデータであり、若い番号は空間周波数成分の低い部分を表している。この順序付けは、通常、ジグザグスキャンと呼ばれる、係数のスキャン順序を示している。他の順序付けの方法も使用することができるけれども、以後においては、係数値の周波数分布を表現する場合、この係数順を使用するものとする。   FIG. 2 shows an image of coefficient data arrangement after DCT conversion shown in (3) of FIG. The portion indicated by “0” is direct current (DC) component data, the portion indicated by “1 to 63” is alternating current (AC) component data, and the young number represents a portion having a low spatial frequency component. Yes. This ordering indicates a coefficient scanning order, usually called a zigzag scan. Although other ordering methods can be used, hereinafter, the coefficient order will be used when expressing the frequency distribution of coefficient values.

(システムの構成)
図3は、本発明の第1の実施形態による画像処理方法を、実装したり、あるいは実施したりすることができるシステムの構成を示す概略ブロック図である。図3に示すように、本実施形態の方法を実装するシステムは、限定されないが、いわゆるパーソナル・コンピュータの構成を有することができる。具体的には、このシステムは、データが入出力される入出力ポート51と、ポインティング・デバイスであるマウス52と、数値や文字等を入力するキーボード53と、種々の表示を行うためのモニタ54とを備える。また、装置全体の動作を制御する制御部55と、メモリ・カードに記録された画像データを読み出すメモリ・カード・ドライブ56と、データやプログラムを記憶するハードディスク57と、各部を接続するバス58とを備える。
(System configuration)
FIG. 3 is a schematic block diagram showing the configuration of a system that can implement or implement the image processing method according to the first embodiment of the present invention. As shown in FIG. 3, the system for implementing the method of the present embodiment is not limited, but can have a so-called personal computer configuration. Specifically, this system includes an input / output port 51 for inputting / outputting data, a mouse 52 as a pointing device, a keyboard 53 for inputting numerical values and characters, and a monitor 54 for performing various displays. With. Also, a control unit 55 that controls the operation of the entire apparatus, a memory card drive 56 that reads image data recorded on a memory card, a hard disk 57 that stores data and programs, and a bus 58 that connects the units. Is provided.

モニタ54としては、たとえば液晶モニタ、CRTモニタ、ELディスプレイ、プラズマ・ディスプレイ、テレビジョン受像機を用いることができる。さらに、マウス52、キーボード53およびモニタ54の各機能を備えた、いわゆるタッチ・パネルを用いてもよい。   As the monitor 54, for example, a liquid crystal monitor, a CRT monitor, an EL display, a plasma display, or a television receiver can be used. Furthermore, you may use what is called a touch panel provided with each function of the mouse | mouth 52, the keyboard 53, and the monitor 54. FIG.

制御部55は、マウス52やキーボード53からの入力に基づいて、入出力ポート51もしくは、メモリ・カード・ドライブ56において読み出された画像データに対する各種処理を行う。   The control unit 55 performs various processes on the image data read by the input / output port 51 or the memory card drive 56 based on the input from the mouse 52 or the keyboard 53.

本実施形態においては、本発明の画像処理をパーソナル・コンピュータ(PC)に実装するとして説明を行う。しかし、画像を扱うものであれば、画像を扱うマルチ・ファンクション・プリンタやフォト・ダイレクト・プリンタなどノンPCの組み込み機器や携帯電話など画像を扱う機器においても同様に実装することができる。   In the present embodiment, description will be made assuming that the image processing of the present invention is implemented in a personal computer (PC). However, as long as it can handle images, it can be similarly implemented in non-PC embedded devices such as multi-function printers and photo direct printers that handle images and devices that handle images such as mobile phones.

(全体的な処理)
図4は、たとえばPC上で行われる、本発明を適用した補正処理を実行する場合の、全体の処理の流れを示している。この処理には、たとえば撮影データの中に人物など注目画像の有無の検出として人物の肌領域の検出を行い、検出した人物の肌領域とそれ以外の部分に分けた輪郭補正や、また、検出した人物の肌領域の着目した明るさ補正やガンマ補正などを含むことができる。
(Overall processing)
FIG. 4 shows the flow of the entire process when the correction process to which the present invention is applied, for example, performed on a PC. In this process, for example, the human skin area is detected as detection of the presence of an image of interest such as a person in the photographed data, and the contour correction divided into the detected human skin area and other parts is detected. Brightness correction or gamma correction focusing on the skin area of the selected person can be included.

まず、S401ステップにおいては、入出力ポート51もしくは、メモリ・カード・ドライブ56において読み出された撮像後の画像データ、及びハードディスク57に保存している画像データをマウス52やキーボード53からの入力に基づいて読み込む。   First, in step S <b> 401, the captured image data read by the input / output port 51 or the memory card drive 56 and the image data stored in the hard disk 57 are input to the mouse 52 or the keyboard 53. Read based on.

次のS402ステップは、本発明による特徴領域抽出処理を実行するステップであり、ここでは、予め設定されている特徴を有する特徴領域、すなわち注目画像の領域を抽出する処理を実行する。   The next step S402 is a step of executing a feature region extraction process according to the present invention. Here, a process of extracting a feature region having a preset feature, that is, a region of a target image is executed.

次のS403ステップにおいては、S402ステップにおける特徴領域が検出されたか否か、あるいは注目画像領域が存在したか否かが判定される。特徴領域が検出された場合、あるいは注目画像領域が存在する場合、たとえば、特徴領域が有意量存在するとした場合、その有意量が存在する領域に対して、S404ステップで、その画像の補正目標値を決定する。たとえば、輝度補正の場合、その特徴領域の最終的な輝度を決定する。補正目標値の決定後、その補正目標値を使用して、S405ステップで画像補正処理、たとえば輝度補正を実行することになる。S403ステップで、有意量の特徴領域が検出できなかったと判定した場合は、S406ステップで、通常の画像補正処理を実行することになる。   In the next step S403, it is determined whether or not the feature region in step S402 has been detected or whether or not the image region of interest exists. If a feature area is detected or if there is an image area of interest, for example, if there is a significant amount of the feature area, in step S404, the correction target value of the image is determined for the area where the significant amount exists. To decide. For example, in the case of luminance correction, the final luminance of the feature area is determined. After the correction target value is determined, the correction target value is used to execute image correction processing such as luminance correction in step S405. If it is determined in step S403 that a significant amount of feature region has not been detected, normal image correction processing is executed in step S406.

S405ステップでは、たとえば、輝度補正の場合、通常の補正処理における特徴領域の輝度補正値が、補正目標値となるように補正値の置き換えを行った後に、画像補正を実行する。言い換えれば、通常の補正処理は、たとえば全体または中央部を重点的にみて補正量を設定するが、本発明においては、特徴領域の補正値が補正目標値となるように、画像全体を補正することになる。また、S405の補正処理が輪郭補正のような場合で、しかも特徴領域が人物の肌領域の場合は、特徴領域に対しては輪郭補正をせず、あるいは弱めた輪郭補正を実行し、その他の領域に対しては、通常のあるいは設定した輪郭補正をすることになる。   In step S405, for example, in the case of luminance correction, image correction is performed after replacement of the correction value so that the luminance correction value of the feature region in the normal correction processing becomes the correction target value. In other words, in the normal correction process, for example, the correction amount is set focusing on the whole or the central portion. In the present invention, the entire image is corrected so that the correction value of the feature region becomes the correction target value. It will be. If the correction process of S405 is contour correction and the feature region is a human skin region, no contour correction is performed on the feature region or weak contour correction is performed. A normal or set contour correction is performed on the area.

(特徴領域抽出処理)
本発明のキーとなる、特徴領域抽出処理の実施形態として、注目画像が、たとえば人物画像で、特徴領域の定義として画像中の主要な人物の肌領域である場合についてフローチャートを基に説明する。図5は、本願発明に係わる、画像データからの特徴領域の抽出処理の概要を説明するフローチャートである。この抽出処理は、図4では、S402ステップの処理を表している。
(Feature region extraction processing)
As an embodiment of the feature region extraction process that is a key of the present invention, a case where the target image is, for example, a person image and the skin region of the main person in the image as the definition of the feature region will be described based on a flowchart. FIG. 5 is a flowchart for explaining the outline of the feature region extraction processing from the image data according to the present invention. This extraction process represents the process of step S402 in FIG.

図5のS501ステップで、図4のS401ステップから入力した画像データに対して、Jpeg画像の圧縮単位である8*8画素ブロックを単位とした、設定された色度比率(たとえば、RGBの各比率)に基づく抽出を、まず実行する。この色度判定処理について詳細に説明する。   In step S501 in FIG. 5, a set chromaticity ratio (for example, each RGB color) in units of 8 * 8 pixel blocks, which are compression units of JPEG images, is applied to the image data input from step S401 in FIG. Extraction based on the ratio) is first performed. This chromaticity determination process will be described in detail.

(色度判定処理)
本実施形態における色度判定は、Jpeg画像の画像圧縮単位である8*8画素のそれぞれに対して行われる。ここで、本発明の実施形態を説明するにあたり、最も利用が考えられる特徴領域として人物で、しかも人物の肌部分として説明する。したがって、色度判定の実施形態として、人物肌の色度判定処理となる。
(Chromaticity judgment processing)
The chromaticity determination in the present embodiment is performed for each of 8 * 8 pixels that is an image compression unit of a Jpeg image. Here, in describing the embodiment of the present invention, a human being will be described as a feature region that is most likely to be used, and a human skin portion. Therefore, human skin chromaticity determination processing is performed as an embodiment of chromaticity determination.

人物の肌部分の色度の検索方法としては、複数の方法、たとえば、以下の1)および2)がある。
1)B(青)/G(緑)の比率が0.7〜0.8の範囲に収まり、R(赤)/G(緑)の比率が1.4〜1.8の範囲に収まる色度を持つもの。
2)図10の概念図に示すように、肌色を確率楕円にて表すことができる。求める式としては下記の(1)〜(3)になる。
As a method of searching for the chromaticity of the skin portion of a person, there are a plurality of methods, for example, 1) and 2) below.
1) A color in which the ratio of B (blue) / G (green) falls within the range of 0.7 to 0.8 and the ratio of R (red) / G (green) falls within the range of 1.4 to 1.8. Have a degree.
2) As shown in the conceptual diagram of FIG. 10, the skin color can be represented by a probability ellipse. The following equations (1) to (3) are obtained.

Figure 2008061209
Figure 2008061209

Figure 2008061209
Figure 2008061209

ここで、 here,

Figure 2008061209
Figure 2008061209

であり、r,gは肌色色度の平均値、σ やσ は分散であり、ηは、確率を表す係数である。η=2.0、η=1.5、η=1.0でそれぞれ確率楕円95%、84%、68%に対応する。 Where r and g are average values of skin color chromaticity, σ r 2 and σ g 2 are variances, and η is a coefficient representing probability. η = 2.0, η = 1.5, and η = 1.0 correspond to the probability ellipses of 95%, 84%, and 68%, respectively.

本実施例においては、処理の簡便さを考慮に入れて、下記式(4)で示される色度分布範囲を肌色の色度範囲とした。この範囲を表したのが図11である。   In the present example, taking into account the simplicity of processing, the chromaticity distribution range represented by the following formula (4) was used as the skin color chromaticity range. This range is shown in FIG.

Figure 2008061209
Figure 2008061209

色度判定の結果として得られる最小単位は、8*8ブロック(8*8のピクセルから構成されるブロック)であるが、色度判定そのものは8*8ブロック内の画素が使用される。   The minimum unit obtained as a result of the chromaticity determination is an 8 * 8 block (a block composed of 8 * 8 pixels), but the pixels in the 8 * 8 block are used for the chromaticity determination itself.

図12は、本実施形態で用いている、8*8ブロックの色度判定に使用する、8*8ブロック内の画素の位置と、判定された結果のブロックとの関係を図示したものである。また、これによると8*8画素単位ブロックの四隅の画素の色度の全てが、所定の色度範囲に入っているかを確認し、全てが範囲に入っている場合に、その8*8ブロックが適合範囲内の色度であると判定している。図12においては上段の左から2つ目と下段の左から1つ目、2つ目、3つ目のブロックが、適合範囲内の色度を有するブロックに該当する。上段の一番左のブロックは4ポイントのうち左上の色度は非肌色ピクセルと判定されるので、これを含むブロックは肌色の範囲外(適合範囲外)と判定される。同じように上段の右側1,2ブロックと下段の一番右のブロックが範囲外となる。   FIG. 12 illustrates the relationship between the position of the pixel in the 8 * 8 block and the determined block used for chromaticity determination of the 8 * 8 block used in this embodiment. . Also, according to this, it is confirmed whether all the chromaticities of the pixels at the four corners of the 8 * 8 pixel unit block are within a predetermined chromaticity range. Is determined to be within the compatible range. In FIG. 12, the second block from the left in the upper stage and the first, second, and third blocks from the left in the lower stage correspond to blocks having chromaticity within the matching range. In the upper leftmost block, the chromaticity at the upper left of the four points is determined to be a non-skin color pixel, and therefore a block including this is determined to be outside the skin color range (out of the matching range). Similarly, the upper right 1 block and the lower right 2 block are out of range.

(配置等による候補領域の存在の決定)
次に、抽出した8*8画素ブロックの配置組合せ(たとえば、隣接する複数の8*8画素ブロックから構成される領域の位置や大きさ、形状等)により、主要な人物の肌領域と見なされる、1つまたは複数の候補グループの検出処理を実行する。たとえば、3人の人物の顔を含む被写体を撮像した画像の場合、通常であれば、少なくとも3つの顔領域とこれに隣接した肌の露出部分が検出されることになる。これらの各部分は、通常、隣接した複数のブロックからなる固まりとして検出されることになる。この部分には、一般的には、肌の色と誤検出した部分も含まれることになる。したがって、この段階で検出される部分は、色度のみに基づいているので、単に人肌画像と見なすことが可能な領域の候補であるに過ぎない。
(Determination of the existence of candidate areas by arrangement etc.)
Next, the extracted 8 * 8 pixel block arrangement combination (for example, the position, size, shape, etc. of the area composed of a plurality of adjacent 8 * 8 pixel blocks) is regarded as the skin area of the main person. One or a plurality of candidate group detection processes are executed. For example, in the case of an image obtained by imaging a subject including the faces of three persons, normally, at least three face areas and an exposed part of the skin adjacent thereto are detected. Each of these portions is normally detected as a cluster composed of a plurality of adjacent blocks. This part generally includes a part erroneously detected as a skin color. Accordingly, the portion detected at this stage is based only on chromaticity, and is merely a candidate for a region that can be regarded as a human skin image.

候補とされた部分とそれ以外の部分との関係において、それ以外の部分内に候補とされた部分で且つ周囲から孤立した部分が存在するか否かが検出されて、存在する場合に、候補となるグループを検出したとすることができる。この存在/不存在については、候補とされた部分の領域の大きさ(たとえば、面積や形を含む)や、その領域の画像データ中の位置(中央部分か、端部か等)を含むことができる。たとえば、候補領域の大きさが小さすぎたり、画像全体の端部のみに存在したりする場合は、検出に失敗したとすることができる。反対に、候補領域の大きさが小さすぎず、端部にも存在するが中央部にも存在する場合は、少なくともこの段階では候補グループを検出したとすることができる。   In the relationship between the candidate part and the other part, it is detected whether there is a part that is a candidate and isolated from the surroundings in the other part. Can be detected. The existence / non-existence includes the size of the candidate area (including the area and shape, for example) and the position of the area in the image data (whether it is the central part or the edge). Can do. For example, if the size of the candidate area is too small or exists only at the end of the entire image, it can be assumed that the detection has failed. On the other hand, if the size of the candidate region is not too small and exists at the end portion but also at the center portion, it can be assumed that the candidate group is detected at least at this stage.

図5に戻り、次のS502ステップでは、S501ステップにおいて候補となるグループを検出したか否かを判定する。   Returning to FIG. 5, in the next step S502, it is determined whether or not a candidate group has been detected in step S501.

検出に失敗した場合は、S506ステップへ移行して主要人物肌領域の検出に失敗したことをセットする[HM=“0000”]。検出に成功した場合は、S503ステップへ移行する。   If the detection fails, the process proceeds to step S506, and the fact that the detection of the main person skin area has failed is set [HM = "0000"]. If the detection is successful, the process proceeds to step S503.

S503ステップでは、画像圧縮単位である8*8ブロックの圧縮特性である空間周波数成分データをブロックごとに取得する。取得後、そのブロック単位の集合として構成する所望の特徴領域である主要人物肌領域候補のグループに対して、空間周波数特性の代表値(後述する)を算出し、その結果と、予め設定して保存してある空間周波数特性の範囲に適合するか比較する。このステップは、主要な人物肌領域を空間周波数の面から検出可能であるか否かを確認するためのものである。人物の肌領域を空間周波数の面から検出した場合、次のステップでより細部に亘って空間周波数の面から検出することになる。このステップでは、比較結果に対して、上述したS502ステップと同様の処理(領域の大きさや配置に関する判定)を実行することになる。このステップの判定に使用する空間周波数範囲については、入力した画像サイズとファイル・サイズとから決定された範囲とすることができる。   In step S503, spatial frequency component data, which is compression characteristics of 8 * 8 blocks, which are image compression units, is acquired for each block. After acquisition, a representative value (described later) of the spatial frequency characteristic is calculated for a group of main human skin region candidates that are desired feature regions configured as a set of block units, and the result is set in advance. Compare with the stored spatial frequency characteristics range. This step is for confirming whether or not the main human skin region can be detected from the aspect of spatial frequency. When the human skin region is detected from the surface of the spatial frequency, it is detected from the surface of the spatial frequency in more detail in the next step. In this step, processing similar to that in step S502 described above (determination regarding area size and arrangement) is performed on the comparison result. The spatial frequency range used for the determination in this step can be a range determined from the input image size and file size.

次に、S504ステップにおいては、S503ステップにおいて候補となるグループを検出したか判定する。検出に失敗した場合は、S506ステップへ移行して主要人物肌領域の検出に失敗したことをセットする[HM=“0000”]。また、検出した場合は、S507ステップへ移行する。   Next, in step S504, it is determined whether a candidate group has been detected in step S503. If the detection fails, the process proceeds to step S506, and the fact that the detection of the main person skin area has failed is set [HM = "0000"]. If detected, the process proceeds to step S507.

以上の処理は、主要な人物肌領域の存在を色度と空間周波数の面から独立に検出可能か否かを判定することにその主目的がある。共に検出可能である場合にのみ、以下に説明するさらに詳細な検出処理、いわゆる絞り込み処理を実行することになる。   The main purpose of the above processing is to determine whether or not the presence of the main human skin region can be detected independently from the aspect of chromaticity and spatial frequency. Only when both can be detected, a more detailed detection process described below, that is, a so-called narrowing-down process is executed.

S507ステップにおいては、図6と図7を使用して後述する処理を実行する。   In step S507, processing described later with reference to FIGS. 6 and 7 is executed.

S507ステップの処理を完了すると、S508ステップで、所望の特徴領域である主要人物肌領域候補のグループが、所望の特徴領域である主要人物肌とすべきかが判定する。判定の結果、主要人物肌とすべき領域が存在しない(検出されない)とされた場合は、S506ステップへ移行して主要人物肌領域の検出に失敗したことをセットする[HM=“0000”]。また、存在する(検出された)と判定された場合は、S505ステップへ移行して主要人物肌領域の検出に成功したことをセットする[HM=“1111”]。さらにに、検出した主要人物肌領域のデータを保存する。主要人物肌領域の検出に失敗した場合は、この主要人物肌領域のデータには、ヌル値がセットされ、領域を表すデータが存在しないことが示される。   When the process of step S507 is completed, it is determined in step S508 whether the group of main person skin areas that are desired feature areas should be the main person skin that is the desired feature areas. As a result of the determination, if it is determined that there is no region that should be the main human skin (it is not detected), the process proceeds to step S506, and the fact that the detection of the main human skin region has failed is set [HM = “0000”]. . On the other hand, if it is determined that it exists (is detected), the process proceeds to step S505, and the fact that the main person skin area has been successfully detected is set [HM = “1111”]. Further, the data of the detected main person skin area is stored. When the detection of the main person skin area fails, a null value is set in the data of the main person skin area, indicating that there is no data representing the area.

(候補領域の空間周波数を使用した絞り込み)
S507ステップの詳細の動作フローについて、図6と図7を用いてさらに詳細に説明する。この処理概要は、色度比率により検出して候補領域とした部分について、さらにその候補領域に関連付けた空間周波数の適合範囲を使用して、候補領域をさらに絞り込み、所望する特徴を備えた領域を決定する処理である。
(Narrowing using the spatial frequency of the candidate area)
The detailed operation flow of step S507 will be described in more detail with reference to FIGS. The outline of this process is to further narrow down the candidate area using the spatial frequency matching range associated with the candidate area detected by the chromaticity ratio and to select an area having a desired feature. It is a process to decide.

まず、図6のS601ステップにおいては、上述した図5のS501ステップの処理の結果得られた候補領域を表すデータ(Jpegファイルにおける画像圧縮単位の8*8ブロックを適合色度比率によりグループ化して検出した候補領域)を取得する。   First, in step S601 of FIG. 6, data representing candidate areas obtained as a result of the processing of step S501 of FIG. 5 described above (groups of 8 * 8 blocks of image compression units in the Jpeg file are grouped by the matching chromaticity ratio. Detected candidate area) is acquired.

S602ステップにおいては、取得した候補領域を表すデータを使用して、1つの候補グループ(隣接する8*8ブロックからなる固まり)内の各8*8ブロックのデータを取得する。また、これに換えて、候補領域とした際に使用した候補領域の代表値としての特徴量の判定処理に使用したデータを使用することもできる。   In step S602, data representing each 8 * 8 block in one candidate group (a group of adjacent 8 * 8 blocks) is obtained using the data representing the obtained candidate area. Alternatively, the data used for the feature amount determination process as the representative value of the candidate area used when the candidate area is used can be used.

次に、空間周波数を使用して候補領域をさらに絞り込むために、S603ステップでは、判定基準を設定することになる。この判定基準は候補領域のサイズによって変わる。たとえば、注目画像が人物肌として顔画像である場合、その顔画像の大きさによっても、その顔部分の空間周波数が変化することになる。また、この空間周波数の基準は、VGAサイズの画像(図8)や、UXGAサイズの画像(図9)のように、画像サイズによっても変化する。したがって、空間周波数から、顔画像、すなわち人物肌領域と判断するには、画像全体のサイズと、候補領域の大きさ(たとえば、1つの候補グループとされた固まりの横幅、高さ等)によって変化させる必要がある。   Next, in order to further narrow down the candidate region using the spatial frequency, a determination criterion is set in step S603. This criterion depends on the size of the candidate area. For example, when the target image is a face image as human skin, the spatial frequency of the face portion also changes depending on the size of the face image. The spatial frequency reference also changes depending on the image size, such as a VGA size image (FIG. 8) or a UXGA size image (FIG. 9). Therefore, in order to determine a face image, that is, a human skin region from the spatial frequency, it varies depending on the size of the entire image and the size of the candidate region (for example, the width, height, etc. of a group made into one candidate group). It is necessary to let

図8は、本発明において使用したもので、VGA(640*480)のサイズの画像データにおける、候補画像の横幅をパラメータとした注目画像である人物肌の空間周波数特性の範囲の例を表したものである。   FIG. 8 shows an example of the range of spatial frequency characteristics of human skin, which is an image of interest, using the width of a candidate image as a parameter in image data of VGA (640 * 480) size, which is used in the present invention. Is.

図8の最上段の数値は、図2に示した係数の番号付けを表している。たとえば、1〜10は、係数1〜係数10を表している。1つの候補グループを構成する複数の互いに隣接する連続ブロック値を2〜8個のグループ(〜L8)と9〜20個のグループ(L9〜20)と21個以上のグループ(L21〜)の3グループにまとめて、グループごとに周波数の適正範囲を設定したものである。また、連続ブロック値を2〜8個の場合、注目画像である人物肌の空間周波数特性の範囲は、係数1〜係数10の係数の和が50以上で300以下であることを示している。   The numerical value at the top of FIG. 8 represents the numbering of the coefficients shown in FIG. For example, 1 to 10 represent a coefficient 1 to a coefficient 10. A plurality of adjacent consecutive block values constituting one candidate group are divided into 3 groups of 2 to 8 groups (to L8), 9 to 20 groups (L9 to 20), and 21 or more groups (L21 to). In this group, an appropriate frequency range is set for each group. When the number of continuous block values is 2 to 8, the range of the spatial frequency characteristics of the human skin that is the target image indicates that the sum of the coefficients 1 to 10 is 50 or more and 300 or less.

このような周波数や連続ブロック数の分類は処理の簡略化と検出精度のバランスで行ったもので、これに縛られる必要は無い。   Such classification of the frequency and the number of continuous blocks is performed by a balance between simplification of processing and detection accuracy, and there is no need to be bound by this.

図9は、UXGA画像用判定テーブルである。この構成は、図8のVGA画像用判定テーブルと同じであり、図8と異なる部分は、画像サイズの違いによる空間周波数範囲の違いのみである。   FIG. 9 is a UXGA image determination table. This configuration is the same as the VGA image determination table of FIG. 8, and the only difference from FIG. 8 is the difference in the spatial frequency range due to the difference in image size.

ここで、空間周波数特性の代表値を説明する。これは、図8や図9に示した範囲を表すデータと比較するために、複数の係数値を1つの数値に纏めたデータである。8*8ブロックの代表値とは、各周波数の低い順に、図8や図9に示すように複数個単位(実施形態の場合M10個単位で、最後は3個)のグループごとの係数値の積算値を求めたものである。実施形態の場合では、63個の計数値データを7個の数値で代表させるように構成されることになる。   Here, the representative value of the spatial frequency characteristic will be described. This is data in which a plurality of coefficient values are combined into one numerical value for comparison with data representing the range shown in FIG. 8 or FIG. 9. The representative value of the 8 * 8 block is a coefficient value for each group of a plurality of units (in the case of the embodiment, M10 units and finally 3 units) as shown in FIGS. The integrated value is obtained. In the case of the embodiment, the configuration is such that 63 pieces of count value data are represented by 7 numbers.

図6に戻り、S603ステップでは、空間周波数判定基準(適合範囲)を算出する。ここで算出するのは、S601ステップで取得した候補領域に関するものである。すなわち、図6では、詳細を示していないが、候補領域として複数のグループ(互いに隣接する8*8ブロックの固まり)がある場合、最初に取得した1つの候補領域のグループに関するものである。候補領域として複数のグループのある場合、それぞれについてS604〜S605の各ステップを実行することになる。   Returning to FIG. 6, in step S <b> 603, a spatial frequency determination standard (applicable range) is calculated. The calculation here relates to the candidate area acquired in step S601. That is, although details are not shown in FIG. 6, when there are a plurality of groups (a group of 8 * 8 blocks adjacent to each other) as candidate areas, it relates to a group of one candidate area acquired first. When there are a plurality of groups as candidate areas, steps S604 to S605 are executed for each of the groups.

(空間周波数判定基準)
ここで、空間周波数判定基準(適合範囲)の算出について、図7のフローを用いて説明を行う。
(Spatial frequency criteria)
Here, the calculation of the spatial frequency determination standard (applicable range) will be described using the flow of FIG.

まず、S701ステップにおいては、以下のそれぞれを取得する。
(1)入力画像ファイルのファイル・サイズ(ファイルを構成するバイト数)。
(2)画像の画素数を確認するための画像サイズ(たとえば、VGA、UXGA等)。
(3)S501ステップにおいて主要人物肌領域候補のグループであるとした候補領域の画像サイズ(たとえば、最初に処理する1つの候補領域(塊)のサイズ、たとえば8*8ブロック単位の数値で、横幅、縦幅)。
First, in step S701, each of the following is acquired.
(1) File size of input image file (number of bytes constituting file).
(2) Image size (for example, VGA, UXGA, etc.) for confirming the number of pixels of the image.
(3) The image size of the candidate area that is assumed to be a group of main human skin area candidates in step S501 (for example, the size of one candidate area (block) to be processed first, for example, a numerical value in units of 8 * 8 blocks, , Vertical width).

S702ステップにおいては、(1)入力画像ファイルのファイル・サイズと、(2)画像の画素数を確認するための画像サイズより、画像圧縮単位である8*8ブロックの空間周波数適合値を設定する。たとえば、図8に示した表を設定する。ここで、Jpegファイル・サイズは、同じ画像サイズでも空間周波数成分が高いほど大きくなるので、たとえば、図8や図9に示した範囲を表す数値を、Jpegファイル・サイズに応じて変更することになる。   In step S702, a spatial frequency adaptive value of 8 * 8 blocks as an image compression unit is set from (1) the file size of the input image file and (2) the image size for confirming the number of pixels of the image. . For example, the table shown in FIG. 8 is set. Here, since the Jpeg file size increases as the spatial frequency component increases even with the same image size, for example, the numerical values representing the ranges shown in FIGS. 8 and 9 are changed in accordance with the Jpeg file size. Become.

次に、S703ステップにおいて、現在、対象としている複数の互いに隣接する8*8ブロックから構成される候補領域グループの大きさから、たとえば、図8に示した表のうちの〜L8、L9〜20、L21〜のうちの何れを使用するかを設定する。   Next, in step S703, from the size of the candidate area group that is currently made up of a plurality of adjacent 8 * 8 blocks, for example, ~ L8, L9-20 in the table shown in FIG. , L21 to L2 to be used.

(空間周波数判定基準(適合範囲)を使用した検出)
図6に戻り、S604ステップにおいては、S603ステップで求めた空間周波数判定基準と、対応する候補領域を構成している各8*8ブロックごとの空間周波数成分(上述した各8*8ブロックブロックの代表値)を比較する。この比較によって、8*8ブロックごとにその空間周波数が判定基準に適合しているか(空間周波数が適合範囲に入っているか)判定が行われる。たとえば、ファイル・サイズと画像サイズから、図8に示された表が設定される。さらに処理の対象とする候補領域のサイズが、L21〜(21個以上の連続ブロックのサイズ)の場合、図4の最下段に示すような範囲にそのブロックの空間周波数の代表値が入っているか否かを判定する。これを、対象とする候補領域の全ての8*8ブロックに対して実行する。
(Detection using spatial frequency criteria (conformance range))
Returning to FIG. 6, in step S604, the spatial frequency determination criteria obtained in step S603 and the spatial frequency components for each 8 * 8 block constituting the corresponding candidate region (for each 8 * 8 block block described above). Compare representative values. By this comparison, it is determined for each 8 * 8 block whether the spatial frequency conforms to the criterion (whether the spatial frequency is within the conforming range). For example, the table shown in FIG. 8 is set from the file size and the image size. Further, if the size of the candidate area to be processed is L21 to (the size of 21 or more continuous blocks), whether the representative value of the spatial frequency of the block is in the range as shown in the bottom of FIG. Determine whether or not. This is executed for all 8 * 8 blocks of the candidate area of interest.

S605ステップにおいては、S604ステップにおいて、判定基準に対して不適合と判定された8*8ブロックを、処理対象の候補領域から除外して絞り込んだ候補領域を確定する。   In step S605, candidate areas are narrowed down by excluding the 8 * 8 blocks determined to be incompatible with the determination criteria in step S604 from the candidate areas to be processed.

残りの候補領域のグループに対して、以上のS703、S604、S605の各ステップを繰り返す。残りの候補グループが無い場合、終了する。   The above steps S703, S604, and S605 are repeated for the remaining candidate area groups. If there are no remaining candidate groups, exit.

(絞り込まれた候補領域に対するサイズ適応空間周波数適合判定)
上述した処理において、たとえば、S501ステップで検出した候補領域が、S605ステップで、さらに絞り込まれた領域となり、これらの領域のサイズの変更が無視できない大きさである場合がある。この場合、この変更の程度を検出して、所定以上の場合に、絞り込まれた領域のサイズに基づいて、再度S703、S604、605ステップの処理をやり直すことが、正確な検出に役立つ。この再度の処理は、最初の処理の結果得られた(絞り込まれた)領域をさらに絞り込むのではなく、最初の処理と入れ替わる処理である。この場合、高い周波数成分に対する許容量が増加する可能性があるので、最初のステップで絞り込まれた領域よりも、再度のステップで絞り込まれた領域の方が、若干拡大された領域となる可能性がある。
(Size-adaptive spatial frequency conformance judgment for narrowed candidate areas)
In the process described above, for example, the candidate area detected in step S501 may be further narrowed down in step S605, and the size of these areas may not be negligible. In this case, it is useful for accurate detection that the degree of this change is detected and the processing in steps S703, S604, and 605 is performed again based on the size of the narrowed-down area when the change is greater than or equal to a predetermined value. This re-processing is a process that replaces the first process rather than further narrowing down the area obtained as a result of the first process. In this case, the tolerance for high frequency components may increase, so the area narrowed down in the second step may be a slightly enlarged area rather than the area narrowed down in the first step. There is.

また、上述では、候補領域の各グループに対して、S703、S604、S605の各ステップを繰り返すとしたが、複数の候補領域のうちの最大の候補領域のサイズにより空間周波数の設定値(適合値)を決定し、これを候補領域の全てに適用することもできる。   In the above description, the steps of S703, S604, and S605 are repeated for each group of candidate regions. However, the spatial frequency setting value (adapted value) is determined according to the size of the largest candidate region among the plurality of candidate regions. Can be applied to all of the candidate regions.

以上の再度の処理をS606ステップで実行する。このS606ステップの処理の結果、色度が適合範囲に入り、さらに空間周波数を使用した2回の処理を行うことで、所望する特徴領域を検出することが可能になる。   The above re-execution process is executed in step S606. As a result of the processing in step S606, it is possible to detect a desired feature region by performing chromaticity within the matching range and performing processing twice using a spatial frequency.

図5に戻り、S508ステップにおいては、所望の特徴領域である主要人物肌領域候補のグループが所望の特徴領域である主要人物肌と判定されたかを判定することになる。たとえば、S507ステップ後の、絞り込まれた所望の特徴領域である主要人物肌領域候補の各グループのどれもが、画像サイズに対して所定の面積比を有していない場合は、検出不成功とされる。また、所定の面積比を有しているグループが1つ存在する場合は、検出成功とされる。検出成功とされた場合、その判定の基になった絞り込まれた候補グループそれぞれの領域データ(たとえば、1ビットの2次元データや、境界をなだらかにした複数ビットからなる2次元データ)を保存する。   Returning to FIG. 5, in step S <b> 508, it is determined whether or not the group of main person skin area candidates that are desired feature areas is determined to be the main person skin that is the desired feature area. For example, if none of the main human skin region candidate groups, which are desired feature regions that have been narrowed down, after step S507, has a predetermined area ratio with respect to the image size, the detection is unsuccessful. Is done. If there is one group having a predetermined area ratio, the detection is successful. When the detection is successful, the area data (for example, 1-bit 2-dimensional data or 2-dimensional data consisting of a plurality of bits with a smooth boundary) is stored for each candidate group that has been narrowed down. .

なお、この領域データは、画像データに関連付けられることが望ましい。たとえば、輝度補正した後、数日経過してから輪郭補正をする場合に、最初の輝度補正時に検出した領域データが再利用できることが望ましい。   Note that this area data is desirably associated with image data. For example, when the contour correction is performed after several days have passed after the luminance correction, it is desirable that the area data detected at the first luminance correction can be reused.

上述の場合、前述した図4のS404ステップにおいては、S402ステップにおける検出結果“HM”が“1111”と判定されていることになり、画像より抽出した特徴領域を利用した画像補正目標値を設定する必要があると判定することになる。たとえば、輝度補正をする場合、特徴領域の状況を踏まえて、その特徴領域をどの輝度レベルまで補正するか、言い替えれば、その特徴領域の特性やレベルを最終目標値に近付けるかを設定することになる。次に、この設定した、目標値を使用して補正用テーブルを作成することになる。また、輪郭補正の場合は、検出した特徴領域とその他の領域を分離して、独立にユーザ設定されるようにしたり、あるいは特徴領域に対して補正量をゼロにしたりすることになる。   In the above-described case, in step S404 in FIG. 4 described above, the detection result “HM” in step S402 is determined to be “1111”, and an image correction target value using the feature region extracted from the image is set. It will be judged that it is necessary to do. For example, when performing brightness correction, based on the situation of the feature area, to what brightness level the feature area is to be corrected, in other words, to set the characteristics and level of the feature area close to the final target value. Become. Next, a correction table is created using the set target value. In the case of contour correction, the detected feature region and other regions are separated and set independently by the user, or the correction amount for the feature region is set to zero.

また、上述したS402ステップにおける検出結果“HM”が“0000”と判定されている時には、S406ステップにて通常の画像補正を実行することになる。つまり、画像全体に均一な補正量を設定し、補正を実行することになる。   When the detection result “HM” in step S402 is determined to be “0000”, normal image correction is executed in step S406. That is, a uniform correction amount is set for the entire image, and correction is executed.

S405ステップにおいては、共通の定義に基づく画像補正に対して、作成した補正用テーブルを利用できるように共通の定義に基づく画像補正に対して置き換えを行った後に、画像補正を実行することになる。   In step S405, the image correction is executed after the image correction based on the common definition is replaced with the image correction based on the common definition so that the created correction table can be used. .

(第1の実施形態が適用可能な画像例)
図13は、本発明に関わる第1の実施形態を適用することが望ましい画像例を示す図である。
1)に示す図は、入力した画像の例である。
2)に示す図は、候補領域検出の工程で、図6のS601ステップで取得したデータ、すなわち、S501ステップの色度判定において、式(4)で示される範囲に入っているか否かの結果を示す図である。この図では、セーターの部分は、肌色に近い(適合色度比率の閾値に合致する)ために色度比率では肌の候補領域として検出されている。
3)に示す図は、図5のS503ステップにて各8*8ブロックの単位で、空間周波数特性の判定を実施した判定結果である。明色部分は、空間周波数特性において、候補領域には不適当と判定された部分である。
(Example of image to which the first embodiment can be applied)
FIG. 13 is a diagram illustrating an image example to which the first embodiment according to the present invention is preferably applied.
The figure shown in 1) is an example of an input image.
The diagram shown in 2) shows the result of whether or not the data is acquired in step S601 in FIG. 6 in the candidate region detection step, that is, whether or not it falls within the range indicated by equation (4) in the chromaticity determination in step S501. FIG. In this figure, since the sweater portion is close to the skin color (matches the threshold value of the suitable chromaticity ratio), it is detected as a skin candidate region in the chromaticity ratio.
The diagram shown in 3) shows the determination result obtained by determining the spatial frequency characteristics in units of 8 * 8 blocks in step S503 in FIG. The bright color portion is a portion determined to be inappropriate for the candidate region in the spatial frequency characteristics.

上記結果より、本実施例においては、2)における暗部部分が候補領域であり、この暗部部分と、3)における暗部部分とのANDが取られる形になって、さらに絞り込まれることになる。   From the above results, in this embodiment, the dark part in 2) is a candidate area, and the dark part and the dark part in 3) are ANDed to further narrow down.

その後、この絞り込まれた領域(顔画像部分)のサイズを検出して、検出したサイズに応じた空間周波数の適合範囲が設定され、これ基づいて再度空間周波数の適合性が判定されることになる。この最後の判定処理を実施することで、本来検出したい候補領域をより正確に検出できる。   Thereafter, the size of the narrowed area (face image portion) is detected, and a spatial frequency adaptation range corresponding to the detected size is set. Based on this, the spatial frequency suitability is determined again. . By performing this final determination process, it is possible to more accurately detect a candidate region that is originally desired to be detected.

なお、本実施例では、特徴領域を人物の肌領域として説明したが、空間周波数を利用して、検出領域の境界をより正確に検出するための技術であるので、検出対象は人物の肌でなくても良いことは明らかである。色度と空間周波数を使用して、周囲の画像から識別可能な対象物を含む画像であれば、本発明を使用して対象物の領域を検出することができる。   In this embodiment, the feature region is described as a human skin region. However, since the feature region is a technique for more accurately detecting the boundary of the detection region using the spatial frequency, the detection target is the human skin. Obviously it is not necessary. If the image includes an object that can be identified from surrounding images using chromaticity and spatial frequency, the present invention can be used to detect the region of the object.

(第2の実施形態)
上述した第1の実施形態においては、色度比率により検出対象の領域の全てが検出され、さらに、空間周波数を使用してさらに絞り込むことによって、より正確な、特徴領域の検出を目指す方法である。しかし、最初に色度比率を利用する場合、検出対象の色かぶりや、色度の個別ばらつきにより、所望する候補領域を完全には検出できない場合がある。この場合の特徴領域の検出精度を上げることを目的とし、画像全体に対する空間周波数を利用した検出結果を利用して、最初に色度比率を使用した検出では完全に検出できない部分をも検出するようにした第2の実施形態を示す。
(Second Embodiment)
In the first embodiment described above, all of the detection target areas are detected based on the chromaticity ratio, and further, by further narrowing down using the spatial frequency, the method aims to detect feature areas more accurately. . However, when the chromaticity ratio is first used, a desired candidate region may not be completely detected due to a color cast to be detected or individual variations in chromaticity. In order to improve the detection accuracy of the feature area in this case, the detection result using the spatial frequency for the entire image is used to detect even the part that cannot be completely detected by the first detection using the chromaticity ratio. A second embodiment is shown.

基本的な構成は、第1の実施形態と同一であり、差異部分のみ詳細に説明を行う。   The basic configuration is the same as that of the first embodiment, and only the differences will be described in detail.

この方法は、第1の実施形態における検出処理のうちで、図5のS507ステップ部分についての検出及び判定処理にのみ違いがある。   This method is different from the detection processing in the first embodiment only in the detection and determination processing for the step S507 in FIG.

図14は、上述した図5のS507ステップ部分の第2の実施形態における処理フローを示すである。また、この図14の処理は、図6に示す処理と一部類似する。ただし、ここでは、説明を簡単にするため、候補領域としては1つの候補グループしかない場合で、かつ、第1の実施形態で、図5のS508ステップで検出成功とされる場合における、S507ステップの部分を説明する。   FIG. 14 shows a processing flow in the second embodiment of the step S507 in FIG. 5 described above. 14 is partially similar to the process shown in FIG. However, here, in order to simplify the description, in the case where there is only one candidate group as a candidate region, and in the case where the detection is successful in step S508 in FIG. 5 in the first embodiment, step S507 is performed. Will be described.

S1401ステップは、図6のS601ステップと同様であり、Jpegファイルにおける画像圧縮単位の8*8ブロックを適合色度比率によりグループ化して検出した第1の候補領域を、取得する。   Step S1401 is the same as step S601 in FIG. 6, and obtains a first candidate region detected by grouping 8 * 8 blocks of image compression units in a Jpeg file by matching chromaticity ratios.

S1402ステップは、図6のS602ステップと同様であり、Jpegファイルにおける画像圧縮単位の8*8ブロックのDCT変換による交流成分を利用した候補領域の代表値としての特徴量を判定処理、及びその結果を取得する。   The step S1402 is the same as the step S602 in FIG. 6, and the determination processing of the feature quantity as the representative value of the candidate area using the AC component by the DCT conversion of the 8 * 8 block of the image compression unit in the JPEG file, and the result To get.

S1403ステップにおいては、図6のS603ステップと同様であり、前述した画像圧縮単位である8*8ブロックに対する空間周波数判定基準を算出する。   Step S1403 is the same as step S603 in FIG. 6, and the spatial frequency determination criterion for the 8 * 8 block that is the above-described image compression unit is calculated.

S1404ステップは、図6のS603ステップと同様である。ここでは、S1403ステップで求めた画像圧縮単位の8*8ブロックに対する境界領域検出用の空間周波数特性による閾値と、候補領域を構成している各8*8ブロックごとの空間周波数成分を比較し、適合範囲に入っているか判定を行う。   Step S1404 is the same as step S603 in FIG. Here, the threshold based on the spatial frequency characteristics for boundary region detection for the 8 * 8 block of the image compression unit obtained in step S1403 is compared with the spatial frequency component for each 8 * 8 block constituting the candidate region, Judge whether it is within the conformity range.

以降のステップは、第2の実施形態に特有な処理である。   The subsequent steps are processes unique to the second embodiment.

第1の実施形態においては、図6のS605ステップの処理において、絞り込まれた候補領域を、たとえば、入力された画像と重畳して表示した場合、ほぼ正確に人物肌領域を検出していると判断されることになると思われる。しかし、明らかに絞り込まれた候補領域に不足があると判断される場合も想定される。この想定に基づいて、既に絞り込まれた候補領域に関連する領域の検出を実行する。   In the first embodiment, in the process of step S605 in FIG. 6, when the narrowed candidate area is displayed, for example, superimposed on the input image, the human skin area is detected almost accurately. It will be judged. However, there may be a case where it is determined that there is a shortage of candidate areas that are clearly narrowed down. Based on this assumption, detection of an area related to the already narrowed candidate area is executed.

まず、S1405ステップにおいては、S1401ステップにて検出した第1の候補領域に隣接するJpeg8*8ブロックで、新たに設定した適合値に合致するブロックで構成する第2の候補領域を検出する。ここで、新たに設定した適合値の範囲が最初の適合値の範囲を含む場合、この第2の候補領域は、第1の候補領域を含むことになる。   First, in step S1405, a second candidate area composed of a block that matches the newly set fitness value is detected in the Jpeg 8 * 8 block adjacent to the first candidate area detected in step S1401. Here, when the newly set fitness value range includes the first fitness value range, the second candidate region includes the first candidate region.

ここで、適合値としては、空間周波数との範囲とする。このステップにおける各ブロックの空間周波数における新たな適合値の決定は、以下の方法から得ることができる。まず、各8*8ブロック単位のDCT係数の総和(8*8ブロック単位の空間周波数の代表値)を算出し、算出値から全画像に対する総和値の分布を作成する(不図示)。次に、同様に、絞り込まれた候補領域についても分布を作成する。この分布は、たとえば、輝度ヒストグラムのような分布となる。例として図15に全画像領域データの輝度ヒストグラムと、絞り込まれた候補領域の輝度ヒストグラムを提示する。この図15は、空間周波数分布ではないが、このような分布において、絞り込まれた候補領域の周波数頻度分布の上限と下限を設定し、この上限の上部5%と下限の下5%程度の範囲を含む範囲を、新たな適合範囲として設定する。これ以外の方法で同様の範囲を設定する場合であっても、それまでに絞り込まれた候補領域の8*8ブロックのデータを元にした新たな適合領域の設定であれば、指定方法が違う分散など統計的手法を用いても考えとしては一緒である。   Here, the adaptive value is in the range with the spatial frequency. The determination of a new fitness value at the spatial frequency of each block in this step can be obtained from the following method. First, the sum of the DCT coefficients in each 8 * 8 block unit (representative value of the spatial frequency in 8 * 8 block unit) is calculated, and a distribution of the sum value for all images is created from the calculated value (not shown). Next, similarly, a distribution is created for the narrowed candidate areas. This distribution is, for example, a distribution like a luminance histogram. As an example, FIG. 15 presents a luminance histogram of all image area data and a luminance histogram of narrowed candidate areas. FIG. 15 is not a spatial frequency distribution, but in such a distribution, an upper limit and a lower limit of the frequency frequency distribution of the narrowed candidate area are set, and a range of about 5% above the upper limit and about 5% below the lower limit. The range including is set as a new conforming range. Even if a similar range is set by any other method, the specification method is different if a new matching area is set based on the 8 * 8 block data of the candidate area narrowed down so far. Even if statistical methods such as variance are used, the idea is the same.

ここで、上述したような新たに設定された空間周波数の範囲に適合し、その内部にそれまでに絞り困れた領域を有する領域が、S1405で設定される。   Here, an area that conforms to the newly set spatial frequency range as described above and has an area that has previously been difficult to narrow down is set in step S1405.

S1406ステップにおいては、上述した第2の候補領域の8*8ブロックに対して、先の式4で設定した色度比率より適合範囲が広い第2の色度比率による第3の候補領域を検出する。   In step S1406, for the 8 * 8 block of the second candidate area described above, the third candidate area with the second chromaticity ratio having a wider matching range than the chromaticity ratio set in Expression 4 above is detected. To do.

S1407ステップにおいては、第3の候補領域のサイズに応じた空間周波数適合範囲を使用して、第3の候補領域内の空間周波数算出及び判定を、実施する。このような処理の結果、少なくと、第1の実施形態よって最終的に検出した領域よりも広い領域で、しかも所望する特徴領域を備えた領域を検出することが可能になる。   In step S1407, spatial frequency calculation and determination in the third candidate region is performed using the spatial frequency matching range corresponding to the size of the third candidate region. As a result of such processing, it is possible to detect at least a region wider than the region finally detected by the first embodiment and having a desired feature region.

(第2の実施形態が適用可能な画像例)
図16は、本発明に関わる第2の実施形態を適用することが望ましい画像例を示す図である。
1)に示す図は、入力した画像の例である。
2)に示す図は、候補領域検出の工程で、図14のS1401ステップで取得したデータ、すなわち、S501ステップの色度判定において、式(4)で示される範囲に入っているか否かの結果を示す図である。この図からは、式4で設定した適合色度比率による肌色設定範囲に入らない肌色領域が存在し、元画像における肌領域の全てを検出することができていない、ことがわかる。従来の検出の場合、この候補領域に対して空間周波数代表値の特徴量を算出し、判定に持ち込むため、判定値に入った場合は、実際の肌色領域より少ない状態でしか候補領域を検出することができない。また、判定値に入らなかった場合は、人物の顔部分が検出領域に含まれているにもかかわらず候補領域は検出不能と判断されてしまうことになる。
3)に示す図は、図14のS1404ステップにて各8*8ブロックの単位で、空間周波数特性の判定を実施した判定結果である。明色部分は、空間周波数特性において、候補領域には不適当と判定された部分である。この図からは、所望の特徴領域については、少なくとも、その前の色度判定よりも正確に検出していることがわかる。
(Image example to which the second embodiment can be applied)
FIG. 16 is a diagram showing an example of an image to which the second embodiment related to the present invention is preferably applied.
The figure shown in 1) is an example of an input image.
The figure shown in 2) is a result of whether or not the data is acquired in step S1401 in FIG. 14 in the candidate area detection step, that is, whether or not it is within the range indicated by equation (4) in the chromaticity determination in step S501. FIG. From this figure, it can be seen that there is a skin color region that does not fall within the skin color setting range based on the adaptive chromaticity ratio set in Expression 4, and it is not possible to detect all the skin regions in the original image. In the case of conventional detection, the feature quantity of the spatial frequency representative value is calculated for this candidate area and brought into the determination. When the determination value is entered, the candidate area is detected only in a state smaller than the actual skin color area. I can't. If the determination value is not entered, the candidate region is determined to be undetectable even though the face portion of the person is included in the detection region.
The diagram shown in 3) shows the determination result obtained by determining the spatial frequency characteristics in units of 8 * 8 blocks in step S1404 in FIG. The bright color portion is a portion determined to be inappropriate for the candidate region in the spatial frequency characteristics. From this figure, it can be seen that the desired feature region is detected more accurately than at least the previous chromaticity determination.

上記結果より、本発明の第2の実施形態においては、2)において、検出した領域(暗部部分)を主にその領域を含み、その領域から、3)における不適当とされた部分までの領域を含めるような領域を求める処理を実行する。この拡大された領域に対して、先の式4で設定した色度比率より適合範囲が広い第2の色度比率を使用して第3の候補領域を検出するものである。言い換えれば、そのような処理を実行するために、まず、第一の実施形態の処理を実行して、得られた領域が有する空間周波数範囲よりも広い範囲の領域に対して、範囲が拡大された色度判定処理と、領域のサイズに応じた空間周波数の適合性判定することにある。   From the above results, in the second embodiment of the present invention, in 2), the detected area (dark part) mainly includes the area, and the area extends from that area to the inappropriate part in 3). A process for obtaining an area that includes A third candidate area is detected using the second chromaticity ratio having a wider matching range than the chromaticity ratio set in the previous equation 4 for the enlarged area. In other words, in order to execute such a process, first, the process of the first embodiment is executed, and the range is expanded for a region having a wider range than the spatial frequency range of the obtained region. Chromaticity determination processing and spatial frequency compatibility determination according to the size of the region.

上述した第1の実施形態あるいは、第2の実施形態は、最終的に検出した特徴領域を、画像全体に重畳する形で表示し、ユーザが、その両者の関係を視認することもできる。このようにした場合に、各パラメータや、各実施形態の選択などをユーザあるいはオペレータが指示することにより、最終的に得られた特徴領域を所望する領域と実質的に一致させることが可能になる。   In the first embodiment or the second embodiment described above, the finally detected feature area is displayed so as to be superimposed on the entire image, and the user can also visually recognize the relationship between the two. In this case, when the user or operator instructs each parameter, selection of each embodiment, etc., it becomes possible to substantially match the finally obtained feature region with the desired region. .

また、同じような条件で撮像された複数の画像に対して補正を実施する場合に、上述した方法の各種の設定を最初の画像に対してユーザが設定するだけで、残りの画像に対しては、追加のユーザ設定を実質的に必要とせずに、所望の処理を実施させることができる。   In addition, when performing correction on a plurality of images captured under the same conditions, the user simply sets various settings of the above-described method for the first image, and the remaining images are set. Can perform the desired processing with substantially no additional user settings required.

なお、本実施例では、候補領域を人物の肌領域として説明したが、本発明は、空間周波数を利用して、検出領域の境界をより正確に検出するための技術でもあるので、検出対象は人物の肌でなくても良いことは明らかである。   In the present embodiment, the candidate area is described as a human skin area, but the present invention is also a technique for more accurately detecting the boundary of the detection area using the spatial frequency. Obviously, it does not have to be human skin.

また、上述した図13や図16のDCT/AC成分による分割の図から、空間周波数を利用して、検出領域の境界を比較的正確に検出できることが理解されよう。上述した第2の実施形態は、空間周波数を利用すると検出領域の境界を比較的正確に検出することができることを前提に構成されている。   In addition, it can be understood from the above-described division diagrams based on DCT / AC components in FIG. 13 and FIG. 16 that the boundary of the detection region can be detected relatively accurately using the spatial frequency. The second embodiment described above is configured on the assumption that the boundary of the detection region can be detected relatively accurately when the spatial frequency is used.

ただし、検出できるのは境界であるので、上述した実施形態では、まず実施形態1を使用して、不満足ながらも少なくとも所望の領域からなる限定された領域を求める。そしてこの求めた領域の圧縮ブロックのDCT係数に基づいて、この領域を含む拡大された領域を設定し、再度この領域に対して色度と空間周波数成分の判定を実行させている。   However, since it is possible to detect the boundary, in the above-described embodiment, first, the first embodiment is used to obtain a limited area including at least a desired area, which is unsatisfactory. Based on the obtained DCT coefficient of the compressed block of the area, an enlarged area including this area is set, and the determination of the chromaticity and the spatial frequency component is executed again for this area.

本発明は、デジタル・カメラ等からの撮像データを入力し、従来の銀塩フィルムのDPEのようなスタイルでプリントを作成する場合に利用することが可能である。また、そのような場合に、撮像条件等に余り影響されない、良好なプリント結果を得る処理の実行を容易にする。   The present invention can be used when image data from a digital camera or the like is input and a print is created in a style similar to a conventional silver salt film DPE. In such a case, it is easy to execute a process for obtaining a good print result that is not significantly affected by the imaging conditions and the like.

本発明は、上記で例示した画像補正のための人物肌領域検出だけでなく、画像中からの人物の顔検出、個人顔承認などにおける検出にも対しても使用することができる。   The present invention can be used not only for human skin area detection for image correction exemplified above, but also for detection of a human face in an image, detection of personal face, and the like.

Jpegの画像圧縮単位である8*8Blockを例にしたJpeg形式へ変換する処理過程を示す図である。It is a figure which shows the process of converting into the Jpeg format which used 8 * 8Block which is a Jpeg image compression unit as an example. Jpeg画像ファイル形式における8*8Blockの係数番号の例を示す図である。It is a figure which shows the example of the coefficient number of 8 * 8Block in a Jpeg image file format. 本発明を適用可能な、コンピュータのハード構成を示す図である。It is a figure which shows the hardware constitutions of the computer which can apply this invention. 本発明を使用した画像補正処理の全体の流れを表すフローチャートである。It is a flowchart showing the whole flow of the image correction process using this invention. 本発明の実施形態に関わる主要人物肌領域検出処理の概要フローチャートである。It is a general | schematic flowchart of the main person skin area | region detection process in connection with embodiment of this invention. 本発明の実施形態に関わる色度比率と空間周波数特徴データより候補領域の検出処理を行うフローチャートである。It is a flowchart which performs the detection process of a candidate area | region from the chromaticity ratio and spatial frequency characteristic data in connection with embodiment of this invention. 本発明の実施形態に関わる空間周波数適合値算出フローチャートである。It is a spatial frequency adaptation value calculation flowchart regarding the embodiment of the present invention. 入力画像サイズがVGAの場合の、Jpeg file画像圧縮単位である8*8BlockのAC成分特性を利用した判別テーブルの例を示す図である。It is a figure which shows the example of the discrimination | determination table using the AC component characteristic of 8 * 8Block which is a Jpeg file image compression unit in case an input image size is VGA. 入力画像サイズがUXGAの場合の、Jpeg file画像圧縮単位である8*8BlockのAC成分特性を利用した判別テーブルの例を示す図である。It is a figure which shows the example of the discrimination | determination table using the AC component characteristic of 8 * 8Block which is a Jpeg file image compression unit in case an input image size is UXGA. 肌色のRG色度分布を示す確率楕円範囲の例を示す図である。It is a figure which shows the example of the probability ellipse range which shows RG chromaticity distribution of skin color. 本発明の実施形態で使用した肌色のRG色度分布を示す図である。It is a figure which shows RG chromaticity distribution of the skin color used in embodiment of this invention. 本発明の実施形態における、Jpeg file画像圧縮単位である8*8Blockを、適合範囲の色度を有すると決定する例を示す図である。It is a figure which shows the example which determines with 8 * 8Block which is a Jpeg file image compression unit in embodiment of this invention having the chromaticity of a suitable range. 本発明の第1の実施形態にふさわしい画像例を示す図であり。1)は元画像、2)は色度を利用して検出した結果であり、色度による特徴領域の候補領域、3)は、入力画像のDCTのAC成分が、8*8Block単位で、所定の範囲内か否かの判定結果、を示す。It is a figure which shows the example of an image suitable for the 1st Embodiment of this invention. 1) is an original image, 2) is a result of detection using chromaticity, a candidate region of a feature region based on chromaticity, and 3) a DCT AC component of an input image is predetermined in units of 8 * 8 Block. The determination result of whether or not it is within the range is shown. 第1の実施形態の図6の代わりに、本発明の第2の実施形態に関わる図であり、色度比率と空間周波数特徴データより候補領域の検出処理を行うフローチャートである。It is a figure in connection with the 2nd Embodiment of this invention instead of FIG. 6 of 1st Embodiment, and is a flowchart which performs the detection process of a candidate area | region from chromaticity ratio and spatial frequency characteristic data. 本発明の第2の実施形態に関わる図であり、画像全領域と、第1の実施形態の結果得られた特徴領域と、における8*8ブロック単位の輝度ヒストグラムを示す図である。It is a figure in connection with the 2nd Embodiment of this invention, and is a figure which shows the brightness | luminance histogram of a 8 * 8 block unit in the image whole area | region and the characteristic area obtained as a result of 1st Embodiment. 本発明の第2の実施形態にふさわしい画像例を示す図である。1)は、元画像、2)は色度を利用して検出した結果であり、色度による特徴領域の候補領域、3)は入力画像のDCTのAC成分が、8*8Block単位で、所定の範囲内か否かの判定結果、を示す。It is a figure which shows the example of an image suitable for the 2nd Embodiment of this invention. 1) is an original image, 2) is a result of detection using chromaticity, a candidate region of a feature region based on chromaticity, and 3) a DCT AC component of an input image is predetermined in units of 8 * 8 Block. The determination result of whether or not it is within the range is shown.

符号の説明Explanation of symbols

51 入出力ポート
52 マウス
53 キーボード
54 モニタ
55 制御部(コントローラ)
56 メモリ・カード・ドライブ
57 ハードディスク
51 I / O Port 52 Mouse 53 Keyboard 54 Monitor 55 Control Unit (Controller)
56 Memory card drive 57 Hard disk

Claims (9)

空間周波数成分、色度、および画像サイズ情報を有する圧縮画像データを入力して、当該画像データの中に、所望の特徴領域が存在するか否かと存在する場合に当該特徴領域を検出する画像処理方法であって、
前記所望の特徴領域に関連付けて予め設定された色度に関する範囲に基づいて、前記圧縮画像データを圧縮ブロック単位ごとに検査し、圧縮ブロック単位ごとに予め定めた色度を有するか否かを判定して、予め定めた色度を有すると見なされる候補ブロックから構成される候補領域を決定する第1のステップと、
互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第2のステップと、
前記候補画像領域内の圧縮ブロックそれぞれに対して、前記画像サイズ情報と前記候補画像領域サイズにより予め定められる空間周波数に関する範囲に基づいて、前記候補画像領域内の圧縮ブロック単位ごとの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされる圧縮ブロックを決定する第3のステップと、
前記第3のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成するステップと
を備えることを特徴とする画像処理方法。
Image processing for inputting compressed image data having spatial frequency components, chromaticity, and image size information, and detecting the feature area when the desired feature area exists in the image data A method,
Based on a range relating to chromaticity preset in association with the desired feature region, the compressed image data is inspected for each compressed block unit, and it is determined whether or not the predetermined chromaticity is set for each compressed block unit. A first step of determining a candidate area composed of candidate blocks considered to have a predetermined chromaticity;
A second step of determining a size of one or a plurality of candidate image areas composed of a plurality of candidate blocks adjacent to each other;
For each compressed block in the candidate image area, a spatial frequency component for each compressed block unit in the candidate image area is determined based on the image size information and a range relating to the spatial frequency determined in advance by the candidate image area size. A third step of examining the distribution or quantity to determine a compressed block that is deemed to have a predetermined spatial frequency distribution or quantity;
And a step of creating region data in which a region constituted by the compressed blocks determined in the third step is a desired feature region.
互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第2のステップは、前記複数の候補画像領域のうちの最大の領域のサイズを求めることを含み、
前記第3のステップは、前記画像サイズと前記最大の領域のサイズにより予め定められる空間周波数に関する範囲に基づく
ことを特徴とする請求項1に記載の画像処理方法。
A second step of determining a size of one or a plurality of candidate image regions composed of a plurality of candidate blocks adjacent to each other includes determining a size of a maximum region of the plurality of candidate image regions;
The image processing method according to claim 1, wherein the third step is based on a range relating to a spatial frequency that is predetermined by the image size and the size of the maximum region.
前記第3のステップによって決定された領域のサイズを検出して、当該サイズと前記画像サイズにより予め定められる空間周波数に関する範囲に基づいて、前記候補画像領域内の圧縮ブロックそれぞれの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされる圧縮ブロックを決定する第4のステップをさらに備え、
前記所望の特徴領域とした領域データを作成するステップは、前記第4のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成する
ことを特徴とする請求項1又は2に記載の画像処理方法。
The size of the area determined by the third step is detected, and the distribution of the spatial frequency components of each compressed block in the candidate image area based on the range related to the spatial frequency predetermined by the size and the image size Or a fourth step of examining the quantity to determine a compressed block that is deemed to have a predetermined spatial frequency distribution or quantity;
2. The step of creating region data as the desired feature region creates region data with the region composed of the compressed blocks determined in the fourth step as a desired feature region. Or the image processing method of 2.
前記第3のステップによって決定された領域内の空間周波数の頻度分布を調べて、当該頻度分布の上限と下限とが延長された範囲を新たな空間周波数適合値とする領域で、内部に前記ステップ3で決定された領域を含む領域を設定する第5のステップと、
前記第5のステップで設定された領域について、前記所望の特徴領域に関連付けて予め設定された色度に関する範囲よりも拡大された範囲に基づいて、前記圧縮画像データを圧縮ブロック単位ごとに検査し、圧縮ブロック単位ごとに前記拡大され範囲の色度を有するか否かを判定して、有すると見なされる候補領域を決定する第6のステップと、
前記第6のステップで決定された互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第7のステップと、
前記前記第6のステップで決定された候補画像領域内の圧縮ブロックそれぞれに対して、前記画像サイズ情報と前記候補画像領域サイズにより予め定められる空間周波数に関する情報に基づいて、前記特徴領域内の圧縮ブロック単位ごとの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされるブロックを決定する第8のステップと
をさらに備え、
前記所望の特徴領域とした領域データを作成するステップは、前記第8のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成する
ことを特徴とする請求項1又は2に記載の画像処理方法。
The frequency distribution of the spatial frequency in the region determined by the third step is examined, and a region in which the upper limit and the lower limit of the frequency distribution are extended is set as a new spatial frequency adaptation value. A fifth step of setting an area including the area determined in 3;
For the area set in the fifth step, the compressed image data is inspected for each compressed block unit based on a range that is larger than a range related to chromaticity set in advance in association with the desired feature area. A sixth step of determining whether or not each of the compressed block units has the expanded range of chromaticities and determining a candidate region that is deemed to have
A seventh step of obtaining a size of one or a plurality of candidate image areas composed of a plurality of candidate blocks adjacent to each other determined in the sixth step;
For each compressed block in the candidate image area determined in the sixth step, compression in the feature area is performed based on the image size information and information on a spatial frequency predetermined by the candidate image area size. An eighth step of examining the distribution or amount of the spatial frequency component for each block unit to determine a block that is considered to have a predetermined spatial frequency distribution or amount; and
2. The step of creating region data as a desired feature region creates region data with a region composed of compressed blocks determined in the eighth step as a desired feature region. Or the image processing method of 2.
前記第1のステップは、予め定めた色度を有して特徴領域と見なされる候補ブロックを検出しない場合、および予め定めた色度を有して特徴領域と見なされる候補ブロックの互いに隣接ブロックから構成される1つあるいは複数の領域の最大のサイズが、予め定めたサイズよりも小さい場合、検出不成功を表すデータを出力し、
前記第3のステップは、予め定めた空間周波数の分布あるいは量を有すると見なされるブロックを検出しない場合、および予め定めた空間周波数の分布あるいは量を有すると見なされる候補ブロックの互いに隣接ブロックから構成される1つあるいは複数の領域の最大のサイズが、予め定めたサイズよりも小さい場合、検出不成功を表すデータを出力し、
前記領域データを作成するステップは、前記何れかの検出不成功を表すデータを入力した場合に、ヌル値を出力する
ことを特徴とする請求項1に記載の画像処理方法。
The first step does not detect a candidate block that has a predetermined chromaticity and is regarded as a feature region, and from adjacent blocks of candidate blocks that have a predetermined chromaticity and are regarded as a feature region. If the maximum size of the configured region or regions is smaller than a predetermined size, data indicating unsuccessful detection is output,
The third step is composed of blocks adjacent to candidate blocks that are assumed to have a predetermined spatial frequency distribution or amount, and that blocks that are considered to have a predetermined spatial frequency distribution or amount are not detected. If the maximum size of the region or regions to be performed is smaller than a predetermined size, output data indicating unsuccessful detection;
The image processing method according to claim 1, wherein the step of creating the region data outputs a null value when data indicating any one of the detection failures is input.
前記第3のステップは、前記圧縮画像データの前記画像サイズ情報とファイル・サイズおよび前記候補画像領域サイズにより予め定められる空間周波数に関する範囲に基づくことを特徴とする請求項1に記載の画像処理方法。   2. The image processing method according to claim 1, wherein the third step is based on a range relating to a spatial frequency predetermined by the image size information, the file size, and the candidate image region size of the compressed image data. . 前記所望の特徴領域は、少なくとも人物の肌領域を含むことを特徴とする請求項1〜5の何れかに記載の画像処理方法。   6. The image processing method according to claim 1, wherein the desired feature region includes at least a human skin region. 空間周波数成分、色度、および画像サイズ情報を有する圧縮画像データを入力して、当該画像データの中に、所望の特徴領域が存在するか否かと存在する場合に当該特徴領域を検出するために、コンピュータに、
前記所望の特徴領域に関連付けて予め設定された色度に関する範囲に基づいて、前記圧縮画像データを圧縮ブロック単位ごとに検査し、圧縮ブロック単位ごとに予め定めた色度を有するか否かを判定して、予め定めた色度を有すると見なされる候補ブロックから構成される候補領域を決定する第1のステップと、
互いに隣接する複数の前記候補ブロックから構成される1つあるいは複数の候補画像領域のサイズを求める第2のステップと、
前記候補画像領域内の圧縮ブロックそれぞれに対して、前記画像サイズ情報と前記候補画像領域サイズにより予め定められる空間周波数に関する範囲に基づいて、前記候補画像領域内の圧縮ブロック単位ごとの空間周波数成分の分布あるいは量を検査して、予め定めた空間周波数の分布あるいは量を有すると見なされる圧縮ブロックを決定する第3のステップと、
前記第3のステップで決定した圧縮ブロックから構成される領域を所望の特徴領域とした領域データを作成するステップと
を実行させるためのプログラム。
To input compressed image data having spatial frequency components, chromaticity, and image size information, and to detect the feature area when the desired feature area exists in the image data To the computer,
Based on a range relating to chromaticity preset in association with the desired feature region, the compressed image data is inspected for each compressed block unit, and it is determined whether or not the predetermined chromaticity is set for each compressed block unit. A first step of determining a candidate area composed of candidate blocks considered to have a predetermined chromaticity;
A second step of determining a size of one or a plurality of candidate image areas composed of a plurality of candidate blocks adjacent to each other;
For each compressed block in the candidate image area, a spatial frequency component for each compressed block unit in the candidate image area is determined based on the image size information and a range relating to the spatial frequency determined in advance by the candidate image area size. A third step of examining the distribution or quantity to determine a compressed block that is deemed to have a predetermined spatial frequency distribution or quantity;
And a step of creating region data in which a region composed of the compressed blocks determined in the third step is a desired feature region.
請求項8に記載のプログラムを記録したコンピュータ読み取り可能記録媒体。   The computer-readable recording medium which recorded the program of Claim 8.
JP2006239111A 2006-09-04 2006-09-04 Image processing method Pending JP2008061209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006239111A JP2008061209A (en) 2006-09-04 2006-09-04 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006239111A JP2008061209A (en) 2006-09-04 2006-09-04 Image processing method

Publications (1)

Publication Number Publication Date
JP2008061209A true JP2008061209A (en) 2008-03-13

Family

ID=39243398

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006239111A Pending JP2008061209A (en) 2006-09-04 2006-09-04 Image processing method

Country Status (1)

Country Link
JP (1) JP2008061209A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009252243A (en) * 2008-04-04 2009-10-29 Nhn Corp Adult object determination method and system
JP2016102953A (en) * 2014-11-28 2016-06-02 株式会社ニコン Focus detection device and camera
JP2018201119A (en) * 2017-05-26 2018-12-20 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd Mobile platform, flying object, support apparatus, portable terminal, method for assisting in photography, program, and recording medium
JP2019148817A (en) * 2019-04-22 2019-09-05 株式会社ニコン Focusing state detection device and camera
JP2021051322A (en) * 2020-12-09 2021-04-01 株式会社ニコン Focusing state detection device and camera

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009252243A (en) * 2008-04-04 2009-10-29 Nhn Corp Adult object determination method and system
JP2016102953A (en) * 2014-11-28 2016-06-02 株式会社ニコン Focus detection device and camera
JP2018201119A (en) * 2017-05-26 2018-12-20 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd Mobile platform, flying object, support apparatus, portable terminal, method for assisting in photography, program, and recording medium
JP2019148817A (en) * 2019-04-22 2019-09-05 株式会社ニコン Focusing state detection device and camera
JP2021051322A (en) * 2020-12-09 2021-04-01 株式会社ニコン Focusing state detection device and camera

Similar Documents

Publication Publication Date Title
US9525868B2 (en) Mobile terminal apparatus which displays captured images
US7652717B2 (en) White balance correction in digital camera images
US9497355B2 (en) Image processing apparatus and recording medium for correcting a captured image
US20070071316A1 (en) Image correcting method and image correcting system
US8391646B2 (en) Image processing device and method that performs image quality adjustment and resize processing on image data
US8374439B2 (en) Image processing apparatus, image processing method, program, and computer-readable print medium
JP2012027687A (en) Image processing apparatus and program
JP2018006981A (en) Image processing device, image processing method, and computer program
JP2018107593A (en) Image processing apparatus, image processing method, and program
JP4618153B2 (en) Image processing apparatus, digital camera, image data structure, printing apparatus with automatic color correction function, method for generating captured image with face object information, and color correction method
JP2008061209A (en) Image processing method
US8351737B2 (en) Image processing apparatus
US20110026818A1 (en) System and method for correction of backlit face images
CN107018277B (en) Image processing apparatus that reads an image of an original when light is emitted to the original
JP2014123881A (en) Information processing device, information processing method, and computer program
JP7039219B2 (en) Information processing equipment, image processing method, program
US7684588B2 (en) System and method for providing robust information tags to image files
JP2001292449A (en) Image processing unit, image processing method, and recording medium
JP2005192158A (en) Image processing method, image processing apparatus, and image recording apparatus
US7609425B2 (en) Image data processing apparatus, method, storage medium and program
JP2008060623A (en) Electronic camera
JP2004222078A (en) Image processor, image processing method, and program thereof
JP4235592B2 (en) Image processing method and image processing apparatus
JP4292873B2 (en) Image processing method, image processing apparatus, and image recording apparatus
JP5310782B2 (en) Electronic camera