JP4137015B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP4137015B2
JP4137015B2 JP2004194287A JP2004194287A JP4137015B2 JP 4137015 B2 JP4137015 B2 JP 4137015B2 JP 2004194287 A JP2004194287 A JP 2004194287A JP 2004194287 A JP2004194287 A JP 2004194287A JP 4137015 B2 JP4137015 B2 JP 4137015B2
Authority
JP
Japan
Prior art keywords
processing
image
sharpening
pixel
processing intensity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004194287A
Other languages
Japanese (ja)
Other versions
JP2006019930A5 (en
JP2006019930A (en
Inventor
清 梅田
信二郎 堀
信孝 三宅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2004194287A priority Critical patent/JP4137015B2/en
Publication of JP2006019930A publication Critical patent/JP2006019930A/en
Publication of JP2006019930A5 publication Critical patent/JP2006019930A5/ja
Application granted granted Critical
Publication of JP4137015B2 publication Critical patent/JP4137015B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像に対して鮮鋭化処理を行う画像処理装置および方法に関する。   The present invention relates to an image processing apparatus and method for performing a sharpening process on an image.

近年のコンシューマ向け昇華型、あるいはインクジェット方式のプリンタの進歩は著しい。特にインクジェット方式においては、プリントヘッドの印字解像度は4800dpiを超え、インクドロップの小滴化も向上したため、非常に高精彩な画像を、粒状感をほとんど感じないレベルでプリントすることが可能となっている。このような背景から、近年では、デジタルカメラで撮影した画像を自宅でプリントアウトするHome DPE(Development Print Enlargement)が一般ユーザにも浸透している。   In recent years, the progress of consumer sublimation or ink jet printers has been remarkable. In particular, in the ink jet method, the print resolution of the print head exceeds 4800 dpi and the ink droplet size has been improved, so it is possible to print very high-definition images at a level that hardly feels graininess. Yes. Against this background, in recent years, Home DPE (Development Print Enlargement), which prints out images taken with a digital camera at home, has also spread to general users.

しかし、一般のユーザがデジタルカメラを用いて撮像した画像は、様々な要因により鮮鋭度が失われ、いわゆる「ボケて」いる状態となっていることが多い。画像がボケる原因としては、まず手ぶれなどの撮影テクニック上の問題がある。特に、デジタルカメラの撮影モードをAutoにしたまま、光量の少ない環境下で撮影を行うと手ぶれを生じやすい。また、オートフォーカスで撮影を行うと、被写体にピントを合わせたつもりでも、背景にピントが合ってしまい、肝心の被写体がボケているという失敗写真も数多く存在する。また、普及価格帯の望遠レンズを用いて撮影を行うと、レンズの特性から鮮鋭度が失われることも多い。以上述べたような様々な要因により画像の鮮鋭度が低下すると、プリンタの性能を100%発揮することができないという問題がある。この問題を解消するためには、なんらかのエッジ強調処理を行って鮮鋭度を向上させてプリントすることが望ましい。   However, an image captured by a general user using a digital camera often loses sharpness due to various factors and is in a so-called “blurred” state. As a cause of blurring of the image, there is a problem in shooting technique such as camera shake. In particular, camera shake is likely to occur when shooting in an environment with a small amount of light while the shooting mode of the digital camera is set to Auto. Also, when shooting with autofocus, there are many failed photos where the subject is out of focus even if you intend to focus on the subject and the background is in focus. In addition, when taking a picture using a telephoto lens in a popular price range, sharpness is often lost due to the characteristics of the lens. When the sharpness of the image is lowered due to various factors as described above, there is a problem that the performance of the printer cannot be exhibited 100%. In order to solve this problem, it is desirable to perform printing by improving the sharpness by performing some edge enhancement processing.

ところで、一般のユーザが撮影する主な被写体は、人物の顔であることがよく知られている。従って、上記問題を解決するためには、画像中から顔領域を抽出し、同領域に対して鮮鋭化処理を行うことが望ましい。このような処理の例として、特許文献1がある。特許文献1では、顔領域を抽出し、同領域に対して鮮鋭化処理を行うが、その際に、顔のサイズが小さくなるほどエッジ強調の度合いを強くすることで、小さいサイズの画像は目鼻立ちをよりはっきりさせ、サイズの大きい顔に対しては、人肌上のノイズを増幅させない処理が可能であるとしている。また、顔領域等を画像より抽出する技術に関しては、特許文献2〜13に記載がある。
特開2003−3313306号公報 特開2002−183731号公報 特開2003−30667号公報 特開平8−63597号公報 特開2000−105829号公報 特開平8−77334号公報 特開2001−216515号公報 特開平5−197793号公報 特開平11−53525号公報 特開2000−132688号公報 特開2000−235648号公報 特開平11−250267号公報 特許第2541688号明細書
By the way, it is well known that a main subject photographed by a general user is a human face. Therefore, in order to solve the above problem, it is desirable to extract a face area from an image and perform a sharpening process on the area. There exists patent document 1 as an example of such a process. In Patent Document 1, a face area is extracted, and sharpening processing is performed on the face area. At that time, by increasing the degree of edge enhancement as the face size is reduced, an image with a small size can be noticeable. It is said that processing that does not amplify noise on human skin is possible for a face that is clearer and larger in size. Further, Patent Documents 2 to 13 describe a technique for extracting a face area and the like from an image.
JP 2003-3313306 A JP 2002-183731 A JP 2003-30667 A JP-A-8-63597 JP 2000-105829 A JP-A-8-77334 JP 2001-216515 A JP-A-5-197793 JP-A-11-53525 JP 2000-132688 A JP 2000-235648 A JP-A-11-250267 Japanese Patent No. 2541688

しかし、上記従来技術には以下のような課題がある。まず、処理範囲の境界を目立たないようにさせる工夫が提案されていなかった。すなわち、画像から抽出した顔領域に対して鮮鋭化処理を行う場合、鮮鋭化強度が一定であるため、処理領域(顔領域)の境界が不自然に目立ってしまう。   However, the above prior art has the following problems. First, no idea has been proposed to make the boundaries of the processing range inconspicuous. That is, when the sharpening process is performed on the face area extracted from the image, the sharpening intensity is constant, so that the boundary of the processing area (face area) becomes unnaturally conspicuous.

また、一般に、画像から顔が複数個検出された場合には、個々の顔領域について鮮鋭化処理が施される。このため、複数の顔領域による重複領域が存在する場合、その重複領域については複数回の鮮鋭化処理が施されてしまい、画質劣化の要因となる。   In general, when a plurality of faces are detected from an image, a sharpening process is performed on each face area. For this reason, when there is an overlapping area due to a plurality of face areas, the overlapping area is subjected to sharpening processing a plurality of times, causing deterioration in image quality.

本発明は上記の課題に鑑みてなされたものであり、抽出された部分領域に対して鮮鋭化処理を施した場合に、当該部分領域の境界部分の画像が不自然にならないように鮮鋭化処理を制御可能とすることを目的とする。
また、本発明の他の目的は、複数の部分領域が重複領域有する場合に、重複領域に対して適切に鮮鋭化処理を施すことを可能にすることを目的とする。
The present invention has been made in view of the above problems, and when sharpening processing is performed on an extracted partial region, sharpening processing is performed so that an image of a boundary portion of the partial region does not become unnatural. The purpose is to make controllable.
Another object of the present invention is to make it possible to appropriately sharpen an overlapping area when a plurality of partial areas have overlapping areas.

上記の目的を達成するための本発明による画像処理装置は以下の構成を備える。すなわち、
画像から顔領域を抽出する抽出手段と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定手段と、
前記設定手段は、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字モードとして画質重視のモードが選択された場合、速度重視の印字モードが選択された場合と比較して前記処理強度を小さく設定し、
前記抽出手段で抽出した顔領域の各画素に、前記設定手段で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化手段とを備える。
また、上記の目的を達成するための本発明の他の態様による画像処理装置は以下の構成を備える。すなわち、
画像から顔領域を抽出する抽出手段と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定手段と、
前記設定手段は、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を拡大縮小処理して印字媒体に印字する場合、前記拡大縮小処理の拡大縮小比率が大きいほど処理強度が大きくなるように前記処理強度を設定し、
前記抽出手段で抽出した顔領域の各画素に、前記設定手段で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化手段とを備える。
更に、上記の目的を達成するための本発明の他の態様による画像処理装置は以下の構成を備える。すなわち、
画像から顔領域を抽出する抽出手段と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定手段と、
前記設定手段は、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字媒体が普通紙の場合、高品位用紙の場合と比較して前記処理強度を大きく設定し、
前記抽出手段で抽出した顔領域の各画素に、前記設定手段で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化手段とを備える。
In order to achieve the above object, an image processing apparatus according to the present invention comprises the following arrangement. That is,
Extracting means for extracting a face region from an image;
Setting means for setting the processing strength of the sharpening process for each pixel in the face area;
The setting means sets the processing intensity using a first parameter that decreases in value as the pixel position approaches the boundary at least near the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image quality-oriented mode is selected as the print mode for printing the image, it is compared with the case where the speed-oriented print mode is selected. To reduce the processing intensity,
Sharpening means for applying a sharpening process to each pixel of the face area extracted by the extracting means with the processing intensity set by the setting means.
An image processing apparatus according to another aspect of the present invention for achieving the above object has the following configuration. That is,
Extracting means for extracting a face region from an image;
Setting means for setting the processing strength of the sharpening process for each pixel in the face area;
The setting means sets the processing intensity using a first parameter that decreases in value as the pixel position approaches the boundary at least near the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image is enlarged and reduced and printed on a print medium, the processing intensity increases as the enlargement / reduction ratio of the enlargement / reduction process increases. Set the processing intensity as
Sharpening means for applying a sharpening process to each pixel of the face area extracted by the extracting means with the processing intensity set by the setting means.
Furthermore, an image processing apparatus according to another aspect of the present invention for achieving the above object has the following configuration. That is,
Extracting means for extracting a face region from an image;
Setting means for setting the processing strength of the sharpening process for each pixel in the face area;
The setting means sets the processing intensity using a first parameter that decreases in value as the pixel position approaches the boundary at least near the boundary of the face region. The maximum value is set so that the maximum value of one parameter is increased, and the processing strength is set to be larger than that of high-quality paper when the print medium for printing the image is plain paper,
Sharpening means for applying a sharpening process to each pixel of the face area extracted by the extracting means with the processing intensity set by the setting means.

また、上記の目的を達成するための本発明の一態様による画像処理方法は、
画像から顔領域を抽出する抽出工程と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程と、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字モードとして画質重視のモードが選択された場合、速度重視の印字モードが選択された場合と比較して前記処理強度を小さく設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程とを備える。
更に、上記の目的を達成するための本発明の他の態様による画像処理方法は、
画像から顔領域を抽出する抽出工程と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程と、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を拡大縮小処理して印字媒体に印字する場合、前記拡大縮小処理の拡大縮小比率が大きいほど処理強度が大きくなるように前記処理強度を設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程とを備える。
更に、上記の目的を達成するための本発明の他の態様による画像処理方法は、
画像から顔領域を抽出する抽出工程と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程と、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字媒体が普通紙の場合、高品位用紙の場合と比較して前記処理強度を大きく設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程とを備える。
An image processing method according to an aspect of the present invention for achieving the above-described object is as follows:
An extraction step of extracting a face region from the image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image quality-oriented mode is selected as the print mode for printing the image, it is compared with the case where the speed-oriented print mode is selected. To reduce the processing intensity,
A sharpening step of applying a sharpening process to each pixel of the face area extracted in the extraction step with the processing intensity set in the setting step.
Furthermore, an image processing method according to another aspect of the present invention for achieving the above object is provided:
An extraction step of extracting a face region from the image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image is enlarged and reduced and printed on a print medium, the processing intensity increases as the enlargement / reduction ratio of the enlargement / reduction process increases. Set the processing intensity as
A sharpening step of applying a sharpening process to each pixel of the face area extracted in the extraction step with the processing intensity set in the setting step.
Furthermore, an image processing method according to another aspect of the present invention for achieving the above object is provided:
An extraction step of extracting a face region from the image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. The maximum value is set so that the maximum value of one parameter is increased, and the processing strength is set to be larger than that of high-quality paper when the print medium for printing the image is plain paper,
A sharpening step of applying a sharpening process to each pixel of the face area extracted in the extraction step with the processing intensity set in the setting step.

本発明によれば、抽出された部分領域に対して鮮鋭化処理を施した場合に、当該部分領域の境界部分の画像が不自然にならないように鮮鋭化処理が制御される。
また、本発明によれば、複数の部分領域が重複領域有する場合に、重複領域に対して適切に鮮鋭化処理を施すことが可能となる。
According to the present invention, when the sharpening process is performed on the extracted partial area, the sharpening process is controlled so that the image of the boundary portion of the partial area does not become unnatural.
Further, according to the present invention, when a plurality of partial areas have overlapping areas, it is possible to appropriately sharpen the overlapping areas.

以下、添付の図面を参照して本発明の好適な実施形態について説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.

尚、以降で説明する処理は、主として、プリンタエンジンへ出力すべき画像情報を作成するコンピュータ内のプリンタドライバソフト、もしくは、スキャナ等の光学読取り装置を動作させるためのドライバソフト、もしくはアプリケーションソフトとして内蔵することが効率的であるが、複写機、ファクシミリ、プリンタ本体等にハードウェア、及びソフトウェアとして内臓することにも効果がある。   The processing described below is mainly built in as printer driver software in a computer for creating image information to be output to the printer engine, driver software for operating an optical reading device such as a scanner, or application software. However, it is also effective to be incorporated as hardware and software in a copying machine, a facsimile, a printer main body and the like.

<第1実施形態>
(ハードウエア構成)
図1は第1実施形態による画像処理を実現するためのコンピュータにおけるハードウエア構成例を示すブロック図である。図1に示されるように、コンピュータ100は、CPU101、ROM102、RAM103、ディスプレイなどの表示装置104、キーボード107、マウス106などのユーザインターフェース、ハードディスクなどの2次記憶装置105、他のコンピュータやプリンタ109などと接続するためのインターフェース108とで構成されている。以上の構成において、CPU101が2次記憶装置105に記憶された制御プログラムをRAM103へロードし、これを実行することにより以下に説明する各機能が実現される。
<First Embodiment>
(Hardware configuration)
FIG. 1 is a block diagram showing a hardware configuration example in a computer for realizing image processing according to the first embodiment. As shown in FIG. 1, a computer 100 includes a CPU 101, a ROM 102, a RAM 103, a display device 104 such as a display, a user interface such as a keyboard 107 and a mouse 106, a secondary storage device 105 such as a hard disk, another computer and a printer 109. Etc., and an interface 108 for connecting with the above. In the above configuration, the CPU 101 loads the control program stored in the secondary storage device 105 to the RAM 103 and executes it to implement each function described below.

(処理の概要)
図2は、本実施形態における画像処理の機能構成を示すブロック図である。以下、図2を参照しながら本実施形態の画像処理の概要を説明する。図2に示すように、本実施形態の画像処理は、顔検出部201、処理範囲設定部202、最大処理強度決定部203、鮮鋭化処理部204を含む。
(Outline of processing)
FIG. 2 is a block diagram showing a functional configuration of image processing in the present embodiment. The outline of the image processing of this embodiment will be described below with reference to FIG. As shown in FIG. 2, the image processing of the present embodiment includes a face detection unit 201, a processing range setting unit 202, a maximum processing intensity determination unit 203, and a sharpening processing unit 204.

まず、入力画像が顔・器官位置検出部201に入力される。本実施形態において、入力画像としては、デジタルカメラで撮影して得られた画像や、スキャナなどの光学読取装置で原稿を読み込んで得られた画像や、デジタルビデオカメラで撮影された動画中の1フレームを抽出して得られた画像などを想定している。なお、本明細書において、これらの「画像」は電子データ化された画像データを指すものとする。本実施形態では、これらの画像は2次記憶装置105に格納され、顔・器官位置検出部201によって適宜読み出されてRAM103に記憶され、処理に供されるものとする。また、本実施形態では入力画像はRGB各色8ビットで構成された画像データを想定して説明を行うが、本発明はこれに限定されるものではなく、例えばモノクロ画像に対しても容易に適用できることは言うまでもない。   First, an input image is input to the face / organ position detection unit 201. In the present embodiment, the input image is an image obtained by photographing with a digital camera, an image obtained by reading a document with an optical reading device such as a scanner, or one of moving images photographed with a digital video camera. An image obtained by extracting a frame is assumed. In the present specification, these “images” refer to image data converted into electronic data. In the present embodiment, these images are stored in the secondary storage device 105, appropriately read out by the face / organ position detection unit 201, stored in the RAM 103, and used for processing. In this embodiment, the input image is described on the assumption that image data is composed of 8 bits for each color of RGB. However, the present invention is not limited to this, and can be easily applied to, for example, a monochrome image. Needless to say, you can.

顔検出部201は、入力画像中から人物の顔および目や鼻、口などの器官位置を検出する。検出された顔領域の位置情報は、後段の処理範囲設定部202や最大処理強度決定部203に入力され利用される。   The face detection unit 201 detects a human face and organ positions such as eyes, nose and mouth from the input image. The detected position information of the face area is input to the subsequent processing range setting unit 202 and the maximum processing intensity determination unit 203 and used.

次に、入力画像は処理範囲設定部202に入力される。処理範囲設定部202は、顔検出部201で検出した顔領域周辺に対して鮮鋭化強調処理の適用範囲を決定する。なお、本実施形態では、鮮鋭化処理としてアンシャープマスク処理を用いた場合を例に挙げて説明するが、他の公知の鮮鋭化処理を適用してもよいことはいうまでもない。アンシャープマスク処理のアルゴリズムは、公知である以下の式、
S’=S+k・(U−S) …(式1)
により表現することができる。
Next, the input image is input to the processing range setting unit 202. The processing range setting unit 202 determines the application range of the sharpening enhancement process for the periphery of the face area detected by the face detection unit 201. In the present embodiment, a case where an unsharp mask process is used as the sharpening process will be described as an example, but it goes without saying that other known sharpening processes may be applied. The unsharp mask processing algorithm is the following known formula:
S ′ = S + k · (U−S) (Formula 1)
It can be expressed by

上式のうち、Sは原画像信号、Uは注目画素周辺に対して設定したエリア(注目画素周辺エリア)内の平滑化信号(平滑化信号としては、例えばエリア内の画素値の平均値、なんらかのローパスフィルタを施した結果を用いることができる)を示している。従って(U−S)は、原画像信号と平滑化信号との差分の絶対値であり、この信号を強調信号と呼ぶ。アンシャープマスクアルゴリズムでは、強調係数kを乗じた強調信号を原画像に加算することで、鮮鋭化処理を実現している。   In the above equation, S is an original image signal, U is a smoothed signal in an area set for the periphery of the target pixel (target pixel peripheral area) (as the smoothing signal, for example, an average value of pixel values in the area, The result of applying some low-pass filter can be used). Therefore, (U−S) is the absolute value of the difference between the original image signal and the smoothed signal, and this signal is called an enhancement signal. In the unsharp mask algorithm, sharpening processing is realized by adding an enhancement signal multiplied by an enhancement coefficient k to an original image.

次に処理は最大処理強度決定部203に移る。最大処理強度決定部203は、後段の鮮鋭化処理部204で実行される鮮鋭化処理の最大処理強度を決定する。本実施形態では、顔領域に対して設定した処理範囲内を、均一の処理強度で鮮鋭化処理を行うのではなく、顔領域の中心から外側に向かうに従って、除々に鮮鋭化強度を小さくするような処理を行う。   Next, the processing moves to the maximum processing intensity determination unit 203. The maximum processing strength determination unit 203 determines the maximum processing strength of the sharpening process executed by the subsequent sharpening processing unit 204. In the present embodiment, the sharpening strength is gradually decreased from the center of the face area toward the outside, instead of performing the sharpening process within the processing range set for the face area with uniform processing strength. Perform proper processing.

本実施形態で用いるアンシャープマスク処理の処理強度を決定するパラメータとして、以下の2つのパラメータが存在する。一つは平滑化信号を生成するために注目画素周辺に設定するエリア(注目画素周辺エリア)の大きさであり、他方は強調係数kである。注目画素周辺エリアの大きさを大きくすると、一般的に注目画素の鮮鋭化強度は強くなる。また、強調係数kの値を大きくすると、強調信号が増幅されるため、鮮鋭化強度は強くなる。本実施形態ではこれらのうち、前者である注目画素周辺エリアのサイズを、処理範囲内部で画素位置に応じて変化させることで、鮮鋭化強度を変化させることにする。具体的には、鮮鋭化処理範囲の中心の注目画素周辺エリアのサイズが最大であり、中心から外側に向かうに従って、注目画素周辺エリアのサイズを小さくしてゆく。最大処理強度決定部203の目的は、処理領域中心の画素に対して適用する注目画素周辺エリアの最大値を、処理対象となっている顔領域の大きさと、ユーザが指定した鮮鋭化処理の強度に応じて決定する。尚、強調係数kは平坦性評価量(後述)により決定される。   The following two parameters exist as parameters for determining the processing intensity of unsharp mask processing used in the present embodiment. One is the size of the area (the target pixel peripheral area) set around the target pixel in order to generate the smoothed signal, and the other is the enhancement coefficient k. Increasing the size of the area around the pixel of interest generally increases the sharpening strength of the pixel of interest. Further, when the value of the enhancement coefficient k is increased, the enhancement signal is amplified, so that the sharpening strength is increased. In the present embodiment, among these, the sharpening intensity is changed by changing the size of the area around the target pixel, which is the former, in accordance with the pixel position within the processing range. Specifically, the size of the area around the pixel of interest at the center of the sharpening processing range is the maximum, and the size of the area around the pixel of interest is reduced from the center toward the outside. The purpose of the maximum processing intensity determination unit 203 is to determine the maximum value of the target pixel peripheral area to be applied to the pixel at the center of the processing area, the size of the face area to be processed, and the sharpening processing intensity specified by the user. To be decided. The enhancement coefficient k is determined by a flatness evaluation amount (described later).

次に処理は鮮鋭化処理部204に移る。鮮鋭化処理部204は、アンシャープマスクアルゴリズムに基づく鮮鋭化処理を行う。鮮鋭化処理部204では、処理範囲決定部202で設定された領域に対し、最大処理強度決定部203で決定された注目画素周辺エリアの最大値に基づいて処理強度を決定し、アンシャープマスク処理を行う。鮮鋭化処理部204における詳細な処理の説明は後述する。   Next, the processing moves to the sharpening processing unit 204. The sharpening processing unit 204 performs a sharpening process based on an unsharp mask algorithm. The sharpening processing unit 204 determines the processing strength for the region set by the processing range determination unit 202 based on the maximum value of the area around the target pixel determined by the maximum processing strength determination unit 203, and performs unsharp mask processing. I do. Detailed processing in the sharpening processing unit 204 will be described later.

上記処理が施された画像データは、表示装置104に表示されたり、圧縮処理が施されて2次記憶装置105に保存されたり、インターフェース108を介して接続されたプリンタ109から出力されたりすることになる。以上が、本実施形態における処理の概要である。これより以下では、各部毎に、処理の詳細を説明してゆく。   The image data that has been subjected to the above processing is displayed on the display device 104, subjected to compression processing and stored in the secondary storage device 105, or output from the printer 109 connected via the interface 108. become. The above is the outline of the processing in the present embodiment. Hereinafter, details of the process will be described for each unit.

(顔検出部201)
上述したように、本実施形態においては、まず顔検出部201において、入力画像中から人物の顔および目や口などの器官位置情報を検出する。顔および器官位置の検出に関しては、従来より様々な方法が提案されている。
(Face detection unit 201)
As described above, in the present embodiment, first, the face detection unit 201 detects organ position information such as a person's face and eyes and mouth from the input image. Various methods have been proposed for detecting the face and organ positions.

例えば本出願人による特開2002-183731号公報(特許文献2)によれば、まず、入力画像から目領域を検出し、目領域周辺を顔候補領域とする。そして、この顔候補領域に対して、画素毎の輝度勾配および輝度勾配の重みを算出し、これらを、あらかじめ設定されている理想的な顔基準画像の勾配および勾配の重みと比較する。このとき、各勾配間の平均角度が所定の閾値以下であった場合、入力画像は顔領域を有すると判定する方法が記載されている。   For example, according to Japanese Patent Application Laid-Open No. 2002-183731 (Patent Document 2) by the present applicant, first, an eye region is detected from an input image, and the periphery of the eye region is set as a face candidate region. Then, the luminance gradient and luminance gradient weight for each pixel are calculated for this face candidate region, and these are compared with the gradient and gradient weight of an ideal face reference image set in advance. At this time, a method is described in which it is determined that the input image has a face area when the average angle between the gradients is equal to or smaller than a predetermined threshold value.

また、特開2003-30667号公報(特許文献3)によれば、まず画像中から肌色領域を検出し、検出された領域内において人間の虹彩色画素を検出することにより、目の位置を検出することが可能であるとしている。   According to Japanese Patent Laid-Open No. 2003-30667 (Patent Document 3), first, a skin color area is detected from an image, and a human iris color pixel is detected in the detected area, thereby detecting the eye position. It is possible to do.

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

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

その他、顔および器官位置を検出する方法としては、特許文献6〜13など、数多くの手法が提案されており、本実施形態においてはそれらのうちどのような手法を用いても良い。また、顔および器官位置の検出法については、上記記載に限定されることはなく、その他のどのような手法を用いても構わない。なお、顔および器官位置の検出に関しては、様々な文献および特許で開示されているため、ここでの詳細な説明は省略する。   In addition, many methods such as Patent Documents 6 to 13 have been proposed as methods for detecting the face and organ positions, and any of these methods may be used in the present embodiment. Further, the method for detecting the face and organ positions is not limited to the above description, and any other method may be used. Note that detection of face and organ positions is disclosed in various documents and patents, and thus detailed description thereof is omitted here.

(処理範囲設定部202)
処理範囲設定部202では、顔検出部201で検出した顔領域に基づいて鮮鋭化処理の対象となる領域を設定する。図3は本実施形態において処理対象とする画像の例と顔領域の検出の様子を示す図である。図3に示す画像からは1個所の顔領域を検出することが可能である。本実施形態では、顔検出部から得られる顔領域として、図3に示すような矩形領域301を想定する。なお顔領域を示す矩形領域301は、顔領域のうち少なくとも目、口、鼻を含む領域であると定義する。すなわち、検出或いは推定された目、口、鼻の各領域の全体を包含する最小の矩形を求め、これを所定倍して矩形領域301とする。
(Processing range setting unit 202)
The processing range setting unit 202 sets a region to be sharpened based on the face region detected by the face detection unit 201. FIG. 3 is a diagram showing an example of an image to be processed and how a face area is detected in the present embodiment. One face area can be detected from the image shown in FIG. In the present embodiment, a rectangular area 301 as shown in FIG. 3 is assumed as the face area obtained from the face detection unit. Note that a rectangular area 301 indicating a face area is defined as an area including at least eyes, mouth, and nose among the face areas. That is, a minimum rectangle that encompasses the entire eye, mouth, and nose regions detected or estimated is obtained, and this is multiplied by a predetermined amount to obtain a rectangular region 301.

この場合、処理範囲設定部202では、図3に示すように、該矩形領域に外接する楕円領域302を鮮鋭化対象の処理範囲に設定する。この楕円の短軸、および長軸の長さを、図4に示すようにra、rbとする。また、該短軸と長軸の比は、処理対象となる楕円領域が人物の顔領域に設定されていることを考慮し、ra:rb=2:3、もしくはra:rb=3:4程度となっていることが望ましい。なお、上記楕円領域の設定は、画像から検出された全ての顔位置に対して同様に行われる。 In this case, as shown in FIG. 3, the processing range setting unit 202 sets an elliptical region 302 circumscribing the rectangular region as a processing range to be sharpened. The lengths of the minor axis and the major axis of the ellipse are denoted by r a and r b as shown in FIG. The ratio of the short axis and the long axis, considering that elliptical area to be processed is set to the face region of the person, r a: r b = 2 : 3, or r a: r b = It is desirable that the ratio is about 3: 4. The ellipse area is set in the same manner for all face positions detected from the image.

(最大処理強度決定部203)
最大処理強度決定部203では、検出した顔位置毎に、鮮鋭化処理の最大処理強度を決定する。本実施形態においては、上述したように、後段である鮮鋭化処理部204で適用するアンシャープマスクアルゴリズムの、平滑化対象となる注目画素周辺エリアの最大値を決定する。本実施形態では、処理対象となる顔領域の大きさ、およびユーザが指定した鮮鋭化処理の強度に応じてこの最大値を決定する。
(Maximum processing strength determination unit 203)
The maximum processing intensity determination unit 203 determines the maximum processing intensity of the sharpening process for each detected face position. In the present embodiment, as described above, the maximum value of the area around the target pixel to be smoothed of the unsharp mask algorithm applied by the subsequent sharpening processing unit 204 is determined. In the present embodiment, this maximum value is determined according to the size of the face area to be processed and the sharpening processing intensity specified by the user.

図5は、ユーザが処理強度を指定するためのディスプレイ104上に表示されるユーザインターフェース(UI)の例を示している。図5に示されたUI500では、ユーザが強度指定バー501をマウスなどのインターフェースを用いて操作することにより鮮鋭化強度を決定し、実行ボタン502を押すことにより鮮鋭化処理を実行することが可能である。   FIG. 5 shows an example of a user interface (UI) displayed on the display 104 for the user to specify the processing intensity. In the UI 500 shown in FIG. 5, the user can determine the sharpening intensity by operating the intensity designation bar 501 using an interface such as a mouse, and can execute the sharpening process by pressing the execution button 502. It is.

以下、図6を参照しながら、注目画素周辺エリアの最大値の決定方法を説明する。図6において(a)および(b)はある基準となる顔領域の大きさWstd×Hstd(単位:画素)に対する指定強度と強調係数の最大値Kmax、および注目画素周辺エリアの最大値Dmaxとの関係を示している(尚、エリアの値Dとは当該エリアの一辺の大きさである)。図6の(a)を見るとわかるように、本実施形態においては、指定強度が変化しても強調係数の最大値Kmaxは変化しないこととする。また、図6の(b)を見ればわかるように、指定強度が強くなると注目画素周辺エリアの最大値Dmaxも増加するように設定されている。 Hereinafter, a method for determining the maximum value of the pixel peripheral area will be described with reference to FIG. In FIGS. 6A and 6B, (a) and (b) are the specified intensity and enhancement coefficient maximum value K max for a certain reference face area size W std × H std (unit: pixel), and the maximum value of the area around the target pixel. It shows the relationship with D max (the area value D is the size of one side of the area). As can be seen from FIG. 6A, in this embodiment, the maximum value K max of the enhancement coefficient does not change even if the designated intensity changes. Further, as can be seen from FIG. 6B, the maximum value D max of the area around the target pixel is set to increase as the designated intensity increases.

本実施形態では、検出した顔領域のサイズを、例えば、
顔領域のサイズ=(2・ra+1)×(2・rb+1)
のように定義する。すると、上記サイズに対する注目画素周辺エリアの最大値D'maxは以下のように算出することができる。
In this embodiment, the size of the detected face area is, for example,
Face area size = (2 · r a +1) × (2 · r b +1)
Define as follows. Then, the maximum value D ′ max of the area around the target pixel with respect to the size can be calculated as follows.

Figure 0004137015
Figure 0004137015

すなわち上式は、D'maxが基準画像サイズとの面積比の平方根に比例して決定できることを示している。すなわち、例えばユーザが図4に示したUIで処理強度を「中」と指定した場合、上式により、鮮鋭化処理を適用する顔のサイズが異なったとしても、同様に処理強度が「中」の鮮鋭化処理を適用することが可能となる。 That is, the above equation indicates that D ′ max can be determined in proportion to the square root of the area ratio with the reference image size. That is, for example, when the user designates the processing intensity as “medium” in the UI shown in FIG. 4, even if the face size to which the sharpening process is applied differs according to the above formula, the processing intensity is similarly “medium”. It is possible to apply the sharpening process.

(鮮鋭化処理部204)
次に、処理は鮮鋭化処理部204に移り、検出した全ての顔領域に対して、上記により設定した処理範囲内に対して鮮鋭化処理を適用する。
(Sharpening processing unit 204)
Next, the processing shifts to the sharpening processing unit 204, and the sharpening processing is applied to all the detected face areas within the processing range set as described above.

図7は鮮鋭化処理部204における鮮鋭化対象領域である楕円領域(図7(a)の外側楕円701)の各位置と、アンシャープマスクの鮮鋭化強度を決定する注目画素周辺エリアのサイズD'との関係(図7の(b))を示している。アンシャープマスク処理の処理強度を決定するパラメータの一つである注目画素周辺エリアのサイズD'は、図7(a)に示す外側楕円701の領域内の位置(中心からの距離)に応じて図7(b)に示すように変化する。具体的には、図7(a)に示す内側楕円702の領域内では、図7(b)に示すようにD'は均一(D'=D'max)であり、内側楕円702から外側楕円701の境界に向かうに従ってD'が減衰してゆく。図7(a)において、内側楕円702の短軸および長軸は、外側楕円701の短軸および長軸に所定の係数eを乗じた大きさとなっている。   FIG. 7 shows each position of an ellipse area (outer ellipse 701 in FIG. 7A) that is a sharpening target area in the sharpening processing unit 204, and a size D of the area around the target pixel that determines the sharpening strength of the unsharp mask. The relationship ('in FIG. 7 (b)) is shown. The size D ′ of the area around the target pixel, which is one of the parameters for determining the processing strength of the unsharp mask processing, depends on the position (distance from the center) in the region of the outer ellipse 701 shown in FIG. It changes as shown in FIG. Specifically, in the region of the inner ellipse 702 shown in FIG. 7A, D ′ is uniform (D ′ = D′ max) as shown in FIG. D ′ attenuates toward the boundary of 701. In FIG. 7A, the short axis and long axis of the inner ellipse 702 have a size obtained by multiplying the short axis and long axis of the outer ellipse 701 by a predetermined coefficient e.

なお、係数eの値についてはどのような値であっても本実施形態の範疇に含まれることは言うまでもないが、楕円領域が人物の顔に適用されることから、e=0.6〜0.8程度が望ましい。外側楕円701の境界上で注目画素周辺エリアのサイズD'は小さい値にすることが望ましい。本実施形態では、図7(b)に示すように、外側楕円701の境界においてD'を0としているため、鮮鋭化処理を適用する処理領域と非処理領域との境界で不自然な境界等の発生を強力に抑制することができる。   Needless to say, any value of the coefficient e is included in the category of the present embodiment. However, since the elliptical area is applied to a human face, e = 0.6 to 0 About 8 is desirable. It is desirable that the size D ′ of the area around the target pixel on the boundary of the outer ellipse 701 be a small value. In this embodiment, as shown in FIG. 7B, since D ′ is 0 at the boundary of the outer ellipse 701, an unnatural boundary at the boundary between the processing region to which the sharpening process is applied and the non-processing region, etc. Can be strongly suppressed.

次に、図8のフローチャートを参照して、鮮鋭化処理部204による鮮鋭化処理についてより詳細に説明する。   Next, the sharpening process by the sharpening processing unit 204 will be described in more detail with reference to the flowchart of FIG.

鮮鋭化処理部204では、検出した各顔位置に対して、設定した処理範囲に含まれる各画素を対象としてアンシャープマスク処理による鮮鋭化を行う。まずステップS801では、顔領域中心から注目画素位置までの距離を算出し、ステップS802、およびステップS803において注目画素位置が図7に示した内側楕円領域内か、または内側楕円領域と外側楕円領域の間の領域かの判定を行う。ステップS802の判定を満たす場合、注目画素は内側楕円領域内部に存在するため、ステップS805において注目画素周辺エリアのサイズはD'=D'maxと決定され、ステップS807に処理を移す。一方、ステップS802の判定が否であり、ステップS803の判定を満たす場合には、注目画素は内側楕円領域と外側楕円領域の間の領域に存在することになるため、ステップS806においてD'の算出を行う。D'は、図7(b)に示すように、内側楕円境界から外側楕円境界に向かうに従って単調減少するような直線の関数で算出されることが望ましい。もし、ステップS802およびステップS803の双方の判定が否である場合には、注目画素位置は処理対象範囲に含まれないことになり、ステップS804で画素位置を移動してステップS801に戻る。 The sharpening processing unit 204 performs sharpening by unsharp mask processing on each pixel included in the set processing range for each detected face position. First, in step S801, the distance from the center of the face area to the target pixel position is calculated, and in step S802 and step S803, the target pixel position is within the inner elliptical area shown in FIG. Determine whether the area is between. If the determination in step S802 is satisfied, the pixel of interest exists inside the inner elliptical region, so the size of the area around the pixel of interest is determined as D ′ = D′ max in step S805, and the process proceeds to step S807. On the other hand, if the determination in step S802 is negative and the determination in step S803 is satisfied, the target pixel is present in an area between the inner ellipse area and the outer ellipse area. Therefore, in step S806, D ′ is calculated. I do. As shown in FIG. 7B, D ′ is preferably calculated by a linear function that monotonously decreases from the inner elliptic boundary toward the outer elliptic boundary. If both the determinations in step S802 and step S803 are negative, the target pixel position is not included in the processing target range, the pixel position is moved in step S804, and the process returns to step S801.

ステップS805或いはステップS806においてD'が決定されると、ステップS807において、鮮鋭化処理部204は注目画素周辺の平坦性を算出する。本実施形態では、人物の顔領域に対して鮮鋭化処理を施すことになるが、その際に、目や口のエッジ部だけでなく、比較的平坦な肌領域に対しても同様の処理強度で鮮鋭化を行ってしまうと、ノイズ成分などを増幅し、滑らかな人肌がザラついた印象を与えてしまうという不具合がある。そこで本実施形態では、注目画素とその周辺の画素値との差分の絶対和を算出し、この算出結果を平坦性評価量とし、この平坦性評価量に応じて強調係数kを制御する方法を用いる。すなわち、本実施形態では、D'と平坦性評価量により制御された強調係数K'により式(1)のアンシャープマスク処理を実行することになる。   When D ′ is determined in step S805 or step S806, the sharpening processing unit 204 calculates flatness around the target pixel in step S807. In this embodiment, the sharpening process is performed on the face area of a person. At this time, not only the edge part of the eyes and mouth but also the similar processing intensity is applied to a relatively flat skin area. If sharpening is performed, noise components and the like are amplified, and smooth human skin gives a rough impression. Therefore, in the present embodiment, a method of calculating the absolute sum of the differences between the target pixel and the surrounding pixel values, setting the calculated result as a flatness evaluation amount, and controlling the enhancement coefficient k according to the flatness evaluation amount. Use. In other words, in the present embodiment, the unsharp mask process of Expression (1) is executed using the enhancement coefficient K ′ controlled by D ′ and the flatness evaluation amount.

図9は、該平坦性評価量算出に用いる対象画素位置を示している。図9において、中心に位置する画素が現在の注目画素であり、その周辺に1辺を2D'+1とする正方領域を設定している。本実施形態においては、注目画素値と図9に示す8点の平坦性算出対象画素との差の絶対値の総和を算出し、この算出結果を平坦性評価量Eとする。すなわち、Eが小さいほど注目画素周辺は平坦な領域である可能性が高く、Eが大きいほど注目画素周辺はエッジ部などの変動が大きい領域である可能性が高いことになる。   FIG. 9 shows the target pixel position used for the flatness evaluation amount calculation. In FIG. 9, the pixel located at the center is the current pixel of interest, and a square region having one side of 2D ′ + 1 is set around it. In the present embodiment, the sum of absolute values of differences between the target pixel value and the eight flatness calculation target pixels shown in FIG. 9 is calculated, and this calculation result is used as the flatness evaluation amount E. That is, the smaller E is, the higher the possibility that the area around the pixel of interest is a flat area, and the larger E is, the higher the possibility that the area around the pixel of interest is an area where fluctuations such as an edge portion are large.

図10は、ステップS808で用いる平坦性評価量Eと強調係数K'との関係を示している。図10では、平坦性評価量Eが大きい、すなわち注目画素周辺がエッジ部などである可能性が高い場合には、K'=1であり、Eがある閾値(Th)以下になると、K'は単調減少し、E=0の時K'=0.0となる。   FIG. 10 shows the relationship between the flatness evaluation amount E and the enhancement coefficient K ′ used in step S808. In FIG. 10, when the flatness evaluation amount E is large, that is, when there is a high possibility that the periphery of the pixel of interest is an edge portion or the like, K ′ = 1, and when E falls below a certain threshold (Th), K ′ Decreases monotonously, and when E = 0, K ′ = 0.0.

以上説明したように、平坦性評価量Eに応じて強調係数kを変化させることで、人肌などの比較的平坦な部分において鮮鋭化処理を抑制することが可能となる。なお、上述の平坦性評価方法は一例であり、これに限定されるものではなく、その他様々な方法を用いても構わない。例えば、注目画素周辺エリア内画素値の最大最小差を算出し、この値を平坦性評価量Eとして上記と同様に強調係数kを制御するようにしてもよい。   As described above, by changing the enhancement coefficient k according to the flatness evaluation amount E, it is possible to suppress the sharpening process in a relatively flat portion such as a human skin. The flatness evaluation method described above is merely an example, and the present invention is not limited to this, and various other methods may be used. For example, the maximum / minimum difference between the pixel values in the target pixel peripheral area may be calculated, and the enhancement coefficient k may be controlled in the same manner as described above using this value as the flatness evaluation amount E.

図8に戻り、処理はステップS809に移る。ステップS809では、ステップS805又はステップS806、およびステップS808で算出したパラメータ(D'、K')を用いて、(式1)に示したアルゴリズムに従ってアンシャープマスク処理を行う。すなわち、エリアの大きさをD'として平滑化信号Uを求め、強調係数kは、k=Kmax×K'から求めてアンシャープマスク処理を行う。そしてステップS810で注目画素が最後の画素か否かを判定する。当該注目画素が最後の画素であった場合には本処理を終了する。 Returning to FIG. 8, the process proceeds to step S809. In step S809, unsharp mask processing is performed according to the algorithm shown in (Equation 1) using the parameters (D ′, K ′) calculated in step S805 or S806, and step S808. That is, the smoothed signal U is obtained with the size of the area as D ′, and the enhancement coefficient k is obtained from k = K max × K ′, and unsharp mask processing is performed. In step S810, it is determined whether the target pixel is the last pixel. If the target pixel is the last pixel, this process ends.

以上説明した鮮鋭化処理は、画像から複数個の顔が検出された場合には、それぞれの顔位置に対して実行される。   The sharpening process described above is executed for each face position when a plurality of faces are detected from the image.

また、画像中に人物の顔が存在するにもかかわらず、なんらかの理由により、顔検出部201において顔位置が検出できない場合も存在する。そのような場合に対処するために、顔領域の矩形をマニュアルで指定できるように構成してもよい。この場合、例えば図17に示すようなUI500において、表示されている画像503内の所望の位置に所望の大きさの矩形領域1701をユーザがマウス106などのインターフェースを用いて指定できるようにする。処理範囲設定部202以降では、このようにマニュアルで設定された矩形領域に対して上述した楕円を定義し、顔領域として鮮鋭化処理を適用する。なお、UI500において設定される矩形1701は、画像の縦横方向と平行である必要はなく、回転していてもよい。この場合、顔領域として設定される楕円も回転したものとなる。   In addition, there is a case where the face position cannot be detected by the face detection unit 201 for some reason despite the presence of a human face in the image. In order to deal with such a case, the face area rectangle may be manually specified. In this case, for example, in the UI 500 as shown in FIG. 17, the user can specify a rectangular area 1701 having a desired size at a desired position in the displayed image 503 using an interface such as the mouse 106. In the processing range setting unit 202 and thereafter, the above-described ellipse is defined for the rectangular region set manually as described above, and the sharpening process is applied as the face region. Note that the rectangle 1701 set in the UI 500 need not be parallel to the vertical and horizontal directions of the image, and may be rotated. In this case, the ellipse set as the face area is also rotated.

以上説明したように、第1実施形態によれば、入力画像中から顔領域を自動で検出し、同領域に対して鮮鋭化処理を施すことから、特に重要な人物の顔の鮮鋭度を向上させた画像を、簡単に得ることが可能となる。また、その鮮鋭化強度は、顔領域の中心から徐々に減衰させるので、処理境界が不自然に目立つという不具合も取り除くことが可能となる。また、本実施形態では、顔の大きさが変化しても鮮鋭化強度が同等となるように鮮鋭化パラメータを決定するという特徴をもっている。そのため、ユーザが指定した処理強度に忠実な画像処理を行うことが可能となる。また、画像の平坦度が考慮される、平坦な画像には鮮鋭化処理の強度を弱くするので、鮮鋭化による不自然なざらつき等の発生を防止できる。
As described above, according to the first embodiment, a face area is automatically detected from an input image, and sharpening processing is performed on the area, so that the sharpness of a particularly important person's face is improved. It is possible to easily obtain the image that has been selected. Further, since the sharpening intensity is gradually attenuated from the center of the face area, it is possible to eliminate the problem that the processing boundary is unnaturally conspicuous. In addition, the present embodiment has a feature that the sharpening parameter is determined so that the sharpening strength becomes the same even if the face size changes. Therefore, it is possible to perform image processing that is faithful to the processing intensity specified by the user. Further, since the strength of the sharpening process is weakened for a flat image in which the flatness of the image is taken into consideration, the occurrence of unnatural roughness due to the sharpening can be prevented.

また、上記実施形態によれば、図6(b)に示したように、ユーザが好みの強度指定を行える。すなわち、顔のサイズ等に応じて鮮鋭化度合いを自動的に決定するとともに、ユーザが例えば強、中、弱によって指定した鮮鋭化の度合いを反映することができる。   Further, according to the above embodiment, as shown in FIG. 6B, the user can specify the desired strength. That is, it is possible to automatically determine the sharpening degree according to the face size and the like, and to reflect the sharpening degree specified by the user by, for example, strong, medium or weak.

<第2実施形態>
第1実施形態では、画像中に存在する顔領域は1個所のみという想定の下、鮮鋭化処理の基本アルゴリズムについて説明を行った。しかし当然のことながら、複数個の顔が含まれる画像も数多く存在する。しかし、その場合には、以下のような問題がある。図11は、画像中に複数の顔位置が含まれる画像の例を示しており、図11中の2つの矩形領域1101および1102が、第1実施形態で示した顔の各器官位置を含む矩形領域である。図11に示すように、これらの矩形位置が非常に隣接していた場合、第1実施形態と同様に、該矩形領域それぞれに外接楕円を設定し該楕円を処理範囲とすると、図11中の1103に示すように、重複する処理範囲が発生する場合が考えられる。従って、それぞれの処理範囲毎に鮮鋭化処理を施すと、顔領域の周辺部で鮮鋭化強度を低減して入るものの、重複領域に対しては2度鮮鋭化処理が施されてしまい、同領域のみエッジが強調されすぎるなどの不具合が生じる。
Second Embodiment
In the first embodiment, the basic algorithm for the sharpening process has been described on the assumption that there is only one face area in the image. However, as a matter of course, there are many images including a plurality of faces. However, in that case, there are the following problems. FIG. 11 shows an example of an image in which a plurality of face positions are included in the image, and the two rectangular areas 1101 and 1102 in FIG. 11 are rectangles that include the respective organ positions of the face shown in the first embodiment. It is an area. As shown in FIG. 11, when these rectangular positions are very adjacent to each other, as in the first embodiment, a circumscribed ellipse is set in each rectangular area and the ellipse is set as a processing range. As shown in 1103, a case where overlapping processing ranges occur can be considered. Therefore, if the sharpening process is performed for each processing range, the sharpening strength is reduced at the periphery of the face area, but the sharpening process is performed twice for the overlapping area, and the same area. Only the defects such as the edges are emphasized too much.

第2実施形態の目的は、このような不具合を解決する方法を提案することにある。   The purpose of the second embodiment is to propose a method for solving such a problem.

図12は、第2実施形態による鮮鋭化処理の機能構成を示すブロック図である。第1実施形態と同様に、画像が顔検出部1401に入力されると、入力画像中から人物の顔領域が抽出される。なお、第2実施形態では複数個の顔が検出されることを想定して以下の説明を行う。   FIG. 12 is a block diagram illustrating a functional configuration of the sharpening process according to the second embodiment. As in the first embodiment, when an image is input to the face detection unit 1401, a human face region is extracted from the input image. In the second embodiment, the following description is given on the assumption that a plurality of faces are detected.

処理範囲設定部1202において、検出した各顔位置に対して第1実施形態と同様の楕円領域が設定される(例えば、図11のF1,F2)。次に、処理強度テーブル作成部1203は、入力画像と同じサイズの処理強度テーブルを作成する。処理強度テーブルは入力画像の各画素に対応した処理強度を保持することができ、後段の鮮鋭化処理部1204では、このテーブルを参照しながら処理強度を設定し、鮮鋭化処理を行う。なお、処理強度テーブルで保持される処理強度とは、第1実施形態と同様にアンシャープマスク処理で用いる注目画素周辺エリアのサイズD'である。本実施形態では、処理強度テーブルを作成する際に処理範囲の重複領域を考慮したテーブル作成を行う。   In the processing range setting unit 1202, the same elliptical area as in the first embodiment is set for each detected face position (for example, F1 and F2 in FIG. 11). Next, the processing strength table creation unit 1203 creates a processing strength table having the same size as the input image. The processing intensity table can hold the processing intensity corresponding to each pixel of the input image, and the subsequent sharpening processing unit 1204 sets the processing intensity with reference to this table and performs the sharpening process. Note that the processing intensity held in the processing intensity table is the size D ′ of the area around the target pixel used in the unsharp mask process as in the first embodiment. In this embodiment, when creating a processing intensity table, a table is created in consideration of overlapping areas in the processing range.

図13(a)〜(d)は、処理強度テーブル作成部1203による、処理強度テーブル作成時における注目画素周辺エリアのサイズD'の決定方法を示している。図13の(a)は、図11に示した2つの顔F1,F2に対して、第1実施形態で述べた方法を個別に適用した場合の注目画素周辺エリアのサイズD'を示している。なお、図13では簡単のため、画像の1次元(X軸)方向のみについて示している。また、図13の(b)〜(d)のそれぞれには、重複領域におけるD'の決定方法が太い実線で示している。   FIGS. 13A to 13D show a method for determining the size D ′ of the area around the target pixel when the processing intensity table is created by the processing intensity table creation unit 1203. FIG. 13A shows the size D ′ of the area around the target pixel when the method described in the first embodiment is individually applied to the two faces F1 and F2 shown in FIG. . In FIG. 13, only the one-dimensional (X-axis) direction of the image is shown for simplicity. Further, in each of FIGS. 13B to 13D, the determination method of D ′ in the overlapping region is indicated by a thick solid line.

図13(b)では、重複領域におけるD'は、各顔領域に対して算出したD'のうち大きい方の値を優先的に使用する方法が示されている。また図13(c)では、重複領域におけるD'は、顔領域が大きい方に対して算出したD'を優先的に使用する方法が示されている。また図13(d)では、重複領域におけるD'は、各顔領域に対して算出したD'の平均値を使用する方法が示されている。第2実施形態における処理強度テーブル作成部1203は、上記どの方法を利用してもよい。以上説明した方法により、処理強度テーブル作成部1203において処理強度テーブルが作成される。   FIG. 13B shows a method of preferentially using the larger value of D ′ calculated for each face region as D ′ in the overlapping region. FIG. 13C shows a method of preferentially using D ′ calculated for the larger face area as D ′ in the overlapping area. FIG. 13D shows a method of using the average value of D ′ calculated for each face area as D ′ in the overlapping area. The processing intensity table creation unit 1203 in the second embodiment may use any of the above methods. By the method described above, the processing strength table creation unit 1203 creates a processing strength table.

なお、いずれの場合においても、処理強度を示す太い実線が不連続にならないよう考慮されている。例えば、図13の(c)では、F2との重複領域を抜けた位置から所定の傾きでF1のD'maxへ到達する。この傾きは例えば(r−er)/2の間にD'の値が0からF1のD'maxへ到達するように設定される。また、図13(d)では各領域のD'の傾きと平行な傾きでそれぞれのD'maxへ到達するように設定された例が示されている。 In any case, it is considered that the thick solid line indicating the processing intensity does not become discontinuous. For example, in FIG. 13C, D1 max of F1 is reached with a predetermined inclination from the position that has passed through the overlapping area with F2. This inclination is set so that the value of D ′ reaches from 0 to F ′ D ′ max during (r−er) / 2, for example. FIG. 13D shows an example in which each region is set to reach D ′ max with an inclination parallel to the inclination of D ′.

以上のようにして処理強度テーブルが作成されると、鮮鋭化処理部1204は、この処理強度テーブルを参照しながら、各画素に対してアンシャープマスク処理による鮮鋭化強調処理が行われる。以上の処理が施された画像データは、鮮鋭化処理部1204から出力され、ディスプレイ104に表示されたり、圧縮処理が施されて2次記憶装置105に保存されたり、インターフェース108を介して接続されたプリンタ109から出力されたりすることになる。   When the processing intensity table is created as described above, the sharpening processing unit 1204 performs sharpening enhancement processing by unsharp mask processing on each pixel while referring to the processing intensity table. The image data subjected to the above processing is output from the sharpening processing unit 1204 and displayed on the display 104, subjected to compression processing and stored in the secondary storage device 105, or connected through the interface 108. Or output from the printer 109.

以上説明したように、第2実施形態によれば、抽出した顔領域が複数あり、かつそれらに対して設定した処理範囲が重複していた場合においても、重複領域に対して適切な強度で鮮鋭化処理を行うことが可能となる。また、顔領域以外の領域に対応する画素に対しては処理強度0が処理強度テーブルに登録されるので、処理強度テーブルを参照しながら鮮鋭化処理を実行することにより、全ての顔領域に対して、重複領域に対して鮮鋭化処理が重複して実行されること無く、適切な鮮鋭化処理が実行されることになる。   As described above, according to the second embodiment, even when there are a plurality of extracted face areas and the processing ranges set for them are overlapped, the overlapping areas are sharp with appropriate strength. Can be performed. In addition, since the processing intensity 0 is registered in the processing intensity table for the pixels corresponding to the areas other than the face area, the sharpening process is executed while referring to the processing intensity table, so that all face areas are processed. Thus, the appropriate sharpening process is executed without overlapping the sharpening process with respect to the overlapping region.

<第3実施形態>
これまで説明した方法では、画像中から顔位置を自動的に検出し、原画像の顔位置における鮮鋭度と無関係に、指定された処理強度で鮮鋭化処理を行っていた。従って、例えば複数枚の画像に対して一括で鮮鋭化処理を施した場合に、もともと鮮鋭化処理を行う必要のないピントの合っている顔位置に対しても鮮鋭化処理を施してしまい、エッジを不自然に強調してしまうという問題が考えられる。また、このような問題が顕著に表れる例として、画像に複数の人物が写っており、ある一つの顔にのみピントが合っている場合が挙げられる。このような場合、検出された全ての顔位置に対して均一の強度で鮮鋭化処理を行うことが好ましくないことは明らかである。そこで第3実施形態では、各顔位置の鮮鋭度を推定することにより、鮮鋭化強度を各顔ごとに変化させる制御について説明する。
<Third Embodiment>
In the methods described so far, the face position is automatically detected from the image, and the sharpening process is performed with the specified processing intensity regardless of the sharpness of the face position of the original image. Therefore, for example, when sharpening processing is performed on a plurality of images at once, the sharpening processing is also performed on a focused face position that does not need to be sharpened originally, so that the edge The problem of unnaturally emphasizing is considered. In addition, as an example in which such a problem appears conspicuously, there is a case where a plurality of persons are reflected in an image and only one face is in focus. In such a case, it is obvious that it is not preferable to perform the sharpening process with uniform intensity on all detected face positions. Therefore, in the third embodiment, control for changing the sharpening intensity for each face by estimating the sharpness of each face position will be described.

図14は、第3実施形態による画像処理(鮮鋭化処理)を実現するための機能構成を示したブロック図である。顔検出部1401は、第1実施形態と同様に、入力された画像中から顔位置を抽出する。処理範囲設定部1402は、第1実施形態と同様に、検出した顔に対して鮮鋭化処理対象となる楕円領域を設定する。処理強度テーブル作成部1403は、それぞれの顔領域に対して第2実施形態で述べた如き処理強度テーブルを作成する。この際に、処理強度は、第1実施形態で説明した注目画素周辺サイズD'と平坦度により制御された強調係数K'に加えて、鮮鋭度推定部1404で推定した各顔領域の鮮鋭度を加味して決定する。なお、重複領域が存在する場合は、各顔領域について決定された処理強度を用いて、第2実施形態で説明した手法により重複領域の処理強度を設定する。   FIG. 14 is a block diagram showing a functional configuration for realizing image processing (sharpening processing) according to the third embodiment. As in the first embodiment, the face detection unit 1401 extracts a face position from the input image. Similar to the first embodiment, the processing range setting unit 1402 sets an elliptical region that is a target for sharpening processing on the detected face. The processing intensity table creation unit 1403 creates a processing intensity table as described in the second embodiment for each face area. At this time, in addition to the attention pixel peripheral size D ′ and the enhancement coefficient K ′ controlled by the flatness described in the first embodiment, the processing intensity includes the sharpness of each face region estimated by the sharpness estimation unit 1404. To be determined. If there is an overlapping area, the processing intensity of the overlapping area is set by the method described in the second embodiment using the processing intensity determined for each face area.

画像中の顔位置の鮮鋭度を推定する第1の方法として、検出した顔領域周辺の周波数成分を計測し、高周波成分を多く含む領域を鮮鋭度が高い、すなわち合焦している顔だと推定することが挙げられる。例えば、顔領域周辺を8画素正方ブロックに分割して各ブロック毎に離散コサイン変換(DCT)を施し、その結果得られたDCT係数のうちDC成分を除く高周波係数の電力(2乗和)を算出する。顔矩形領域あるいは顔楕円領域内の高周波電力の平均値を求め、それをあらかじめ定められた閾値と比較することにより、処理対象となっている顔領域がボケているか否かの判定を行う。求められた平均電力が閾値よりも大きい場合には顔領域の鮮鋭度がある程度高く、鮮鋭化処理を行う必要はないと判断される。本実施形態では、処理強度テーブルの顔領域に対応する処理強度を0にすることにより鮮鋭化処理を禁止している。また、平均電力が閾値よりも小さい場合には、以下の式で示される鮮鋭度評価量を、
鮮鋭度評価量=1.0−(平均高周波電力/閾値)
により算出する。そして、この鮮鋭度評価量を注目画素周辺エリアの最大値D'maxに乗じて、処理強度テーブルの値を算出する。すなわち、処理強度テーブルに登録される処理強度(注目画素周辺エリアのサイズ)は、D'=D'max×鮮鋭度評価量ということになる。
As a first method for estimating the sharpness of the face position in the image, the frequency component around the detected face area is measured, and an area containing a lot of high-frequency components is a face with high sharpness, that is, a focused face. Estimation. For example, the periphery of the face region is divided into 8-pixel square blocks, discrete cosine transform (DCT) is performed for each block, and the power (square sum) of the high-frequency coefficient excluding the DC component is obtained from the DCT coefficients obtained as a result. calculate. The average value of the high-frequency power in the face rectangular area or the face ellipse area is obtained and compared with a predetermined threshold value to determine whether or not the face area to be processed is blurred. When the obtained average power is larger than the threshold value, it is determined that the sharpness of the face area is high to some extent and it is not necessary to perform the sharpening process. In the present embodiment, the sharpening process is prohibited by setting the process intensity corresponding to the face area of the process intensity table to 0. When the average power is smaller than the threshold value, the sharpness evaluation amount represented by the following formula is
Sharpness evaluation amount = 1.0− (average high frequency power / threshold)
Calculated by Then, the value of the processing intensity table is calculated by multiplying the sharpness evaluation amount by the maximum value D′ max of the area around the target pixel. That is, the processing intensity (size of the area around the target pixel) registered in the processing intensity table is D ′ = D ′ max × sharpness evaluation amount.

上記方法によって生成した処理強度テーブルを参照しながら鮮鋭化処理を行うことで、平均高周波電力が閾値よりも大きい顔領域に対しては鮮鋭化処理を行わず、平均高周波電力が閾値よりも小さくなるに従って、除去に鮮鋭化強度を大きくするような処理を行うことが可能となる。   By performing the sharpening process while referring to the processing intensity table generated by the above method, the sharpening process is not performed on the face area where the average high frequency power is larger than the threshold value, and the average high frequency power becomes smaller than the threshold value. Accordingly, it is possible to perform a process for increasing the sharpening strength for removal.

また、上記説明では、高周波平均電力をある閾値と比較したが、画像中から複数の顔領域が検出された場合、各顔領域毎に算出した平均電力の相対関係によって処理強度テーブルの値を決定してもよい。例えば、複数個の顔のうち、最も高周波平均電力が高い顔領域に対しては第1実施形態で述べた処理強度「弱」を適用し、最も高周波平均電力が低い顔領域に対しては処理強度「強」を適用し、その他の顔領域に対しては処理強度「中」を適用するように、処理強度テーブルを作成してもよい。もちろん、適用する処理強度は、上記3段階に限定するものではない。   In the above description, the high-frequency average power is compared with a certain threshold value. However, when a plurality of face areas are detected from the image, the value of the processing intensity table is determined by the relative relationship of the average power calculated for each face area. May be. For example, the processing intensity “weak” described in the first embodiment is applied to the face area having the highest high-frequency average power among a plurality of faces, and the process is applied to the face area having the lowest high-frequency average power. The processing strength table may be created so that the strength “high” is applied and the processing strength “medium” is applied to other face regions. Of course, the processing intensity to be applied is not limited to the above three stages.

また、上記では、高周波電力の算出方法としてDCT係数を用いる例を説明したが、本実施形態はこれに限定するものではない。例えば、隣り合う画素同士の差分値を高周波成分としてもよいし、その他の変換、例えばWavelet変換などを用いて、高周波電力を算出してもよい。   In the above description, the example in which the DCT coefficient is used as the high-frequency power calculation method has been described. However, the present embodiment is not limited to this. For example, a difference value between adjacent pixels may be used as a high-frequency component, or high-frequency power may be calculated using other conversions such as Wavelet conversion.

(第3実施形態における鮮鋭度評価の変形例)
以上が、第1の方法による顔領域の鮮鋭度推定法である。次に、画像中の顔位置の鮮鋭度を推定する第2の方法として、撮像装置のフォーカスポイント情報を利用する方法について説明する。図15は、デジタルカメラなどにおいて、撮影する際のファインダーの例を示したものである。図15において、P0〜P4はフォーカスポイントを示している。一般的なデジタルカメラの場合、ユーザがファインダーを覗きながらシャッターボタンを半押しの状態にすると、カメラのオートフォーカス機能が動作し、ピントが合った位置をフォーカスポイントを点滅させたり表示色を変化させたりしてユーザに通知する。ユーザがシャッターボタンをさらに押下することにより、撮影画像を取得することができるが、その際に、どのフォーカスポイントに合焦したか、という情報を撮像画像データのヘッダ部分に記録しておく。記録する情報としては、上記P0〜P4のフォーカスポイントの番号や、そのフォーカスポイントの画像上の座標位置などを用いることができる。また、同情報を記録する方法としては、撮像画像データがJPEG(Joint Photographic Experts Group)形式の場合、JPEGヘッダ部に存在するアプリケーションマーカを利用して記録する方法や、撮像画像データのヘッダ部に様々な撮影情報を記録する個所があれば、その中に記録する方法などがあげられる。
(Modification of Sharpness Evaluation in Third Embodiment)
The above is the face area sharpness estimation method according to the first method. Next, as a second method for estimating the sharpness of the face position in the image, a method using the focus point information of the imaging apparatus will be described. FIG. 15 shows an example of a viewfinder when photographing with a digital camera or the like. In FIG. 15, P 0 to P 4 indicate focus points. For a general digital camera, if the user presses the shutter button halfway while looking through the viewfinder, the camera's autofocus function operates, and the focus point blinks or the display color changes when the camera is in focus. To notify the user. When the user further presses the shutter button, a captured image can be acquired. At this time, information indicating which focus point is in focus is recorded in the header portion of the captured image data. As information to be recorded, the numbers of the focus points P 0 to P 4 and the coordinate positions of the focus points on the image can be used. In addition, as a method for recording the same information, when the captured image data is in the JPEG (Joint Photographic Experts Group) format, a method of recording using an application marker existing in the JPEG header portion, or in the header portion of the captured image data If there is a place where various kinds of shooting information are recorded, a method for recording the information is included.

図16は、上記実施形態の処理のブロック図を示している。上記のごとくヘッダ部にフォーカスポイントの位置情報を含む撮像画像データが顔検出部1601に入力されると、ヘッダ部が抽出され、フォーカス位置取得部1605へ供給される。顔検出部1601では、画像データ本体より顔領域を検出する。フォーカス位置取得部1605は、画像データのヘッダ部分に格納されているフォーカスポイントに関する情報から、フォーカスポイントの画像上の座標位置P(x,y)を求める。鮮鋭度推定部1606は、この座標位置P(x,y)と顔検出部1601で得られた顔領域を示す矩形領域に基づいて、各顔領域の鮮鋭度推定を行う。   FIG. 16 shows a block diagram of the processing of the above embodiment. As described above, when captured image data including focus point position information in the header portion is input to the face detection portion 1601, the header portion is extracted and supplied to the focus position acquisition portion 1605. The face detection unit 1601 detects a face area from the image data body. The focus position acquisition unit 1605 obtains the coordinate position P (x, y) on the image of the focus point from the information regarding the focus point stored in the header portion of the image data. The sharpness estimation unit 1606 estimates the sharpness of each face area based on the coordinate position P (x, y) and the rectangular area indicating the face area obtained by the face detection unit 1601.

この鮮鋭度の推定方法としては、フォーカスポイント位置が矩形領域に含まれる場合、当該顔領域はピントが合っている領域だと判断することができる。よって、当該顔領域に対応する処理強度テーブルの値は0にするか、あるいは小さい値とすることにより、鮮鋭化強度を弱めた処理を行うようにする。また、矩形領域の中心座標C(x,y)とフォーカスポイントの座標位置P(x,y)との距離を鮮鋭度評価量とし、同評価量に応じて処理強度テーブルの値を決定することも考えられる。すなわち、同評価量が小さいほど、顔領域はフォーカスポイントに近いことなり、鮮鋭度は高いものと判断することができるため、処理強度を弱めに設定するようにしてもよい。   As a method for estimating the sharpness, when the focus point position is included in a rectangular area, the face area can be determined to be an in-focus area. Therefore, the value of the processing intensity table corresponding to the face area is set to 0 or set to a small value so that processing with reduced sharpening intensity is performed. Further, the distance between the center coordinate C (x, y) of the rectangular area and the coordinate position P (x, y) of the focus point is used as the sharpness evaluation amount, and the value of the processing intensity table is determined according to the evaluation amount. Is also possible. That is, the smaller the evaluation amount is, the closer the face area is to the focus point, and it can be determined that the sharpness is high. Therefore, the processing intensity may be set weaker.

以上のように、第3実施形態によれば、抽出した顔領域の鮮鋭度を推定することにより、鮮鋭化の必要がない顔領域に対しては処理を行わないようにしたり、鮮鋭度の評価量に応じて鮮鋭化パラメータを決定するといった処理も可能となる。この結果、過度の鮮鋭化が施されることを防止でき、画質劣化を防止できる。また、複数の顔領域が存在する画像においては、各顔領域毎に鮮鋭度を判定して処理強度を設定できるので、ボケた画像の顔領域に対してより強い鮮鋭化処理が施されるような構成を実現できる。   As described above, according to the third embodiment, by estimating the sharpness of the extracted face area, processing is not performed on the face area that does not need to be sharpened, and the sharpness evaluation is performed. Processing such as determining the sharpening parameter according to the amount is also possible. As a result, excessive sharpening can be prevented and image quality deterioration can be prevented. In addition, in an image having a plurality of face areas, the sharpness can be determined for each face area and the processing intensity can be set, so that a stronger sharpening process is applied to the face area of the blurred image. Can be realized.

(第4実施形態)
図1に示すようなハードウェア構成によって、これまで説明してきた方法で顔領域に対して鮮鋭化処理を施した後、プリンタ109によって印字媒体上にプリントすることを考えた場合、プリント時に設定する印字モードや印字サイズ、あるいは印字媒体の種類といった印字条件によって、上記顔領域に対する鮮鋭化強度を変化させることが望ましい。以下では、各印字条件に応じた鮮鋭化パラメータの変更方法について説明する。
(Fourth embodiment)
If the hardware configuration as shown in FIG. 1 is used to sharpen the face area by the method described so far and then print on the print medium by the printer 109, it is set at the time of printing. It is desirable to change the sharpening strength for the face area according to printing conditions such as a printing mode, a printing size, or a type of printing medium. Hereinafter, a method for changing the sharpening parameter according to each printing condition will be described.

まず、印字モードに応じて処理強度テーブルの値を決定することが挙げられる。例えば、ユーザがプリンタの印字モードで画質重視のモード(高品位モード)を選択した場合を考える。この場合、一般的なインクジェットプリンタでは疑似階調処理として誤差拡散処理を用いる場合が多い。誤差拡散処理について詳細な説明は行わないが、一般的に誤差拡散処理は、多値である原画像(例えば、各画素RGB24bitで構成)のディテールを比較的忠実に再現することが可能としている。そのため、過度のエッジ強調を行う必要がないと考えられることから、処理強度テーブルの値を全体的に小さく設定してもよい。   First, the value of the processing intensity table is determined according to the print mode. For example, consider a case where the user has selected an image quality-oriented mode (high quality mode) in the printer printing mode. In this case, an error diffusion process is often used as a pseudo gradation process in a general inkjet printer. The error diffusion process will not be described in detail, but in general, the error diffusion process can reproduce the details of a multi-valued original image (for example, composed of 24 bits of each pixel RGB) relatively faithfully. Therefore, since it is considered unnecessary to perform excessive edge enhancement, the value of the processing intensity table may be set to be small overall.

一方、ユーザがプリンタの印字モードで速度重視のモード(低品位モード)を選択した場合、疑似階調処理としてディザを用いる場合が多い。ディザによる疑似階調処理を行うと、処理は高速で実行することが可能だが、誤差拡散処理に比べ原画像のディテールが損なわれてしまう。従って、このような低品位モードの場合、高品位モードに比較して処理強度テーブルの値を大きく設定してもよい。   On the other hand, when the user selects a speed-oriented mode (low quality mode) in the printer printing mode, dithering is often used as pseudo gradation processing. When the pseudo gradation processing by dither is performed, the processing can be executed at high speed, but the detail of the original image is lost as compared with the error diffusion processing. Therefore, in the case of such a low quality mode, the value of the processing intensity table may be set larger than that in the high quality mode.

また、本実施形態は上記組み合わせに限らず、上記とは逆の方法により処理強度テーブルの値を決定してもよい。すなわち、高品位モードの場合は顔領域の鮮鋭度をより高くした状態でプリントしたいというニーズも考えられることから、低品位モードの場合と比較して、処理強度テーブルの値を全体的に大きく設定するようにしてもよいであろう。   Further, the present embodiment is not limited to the above combination, and the value of the processing intensity table may be determined by a method opposite to the above. In other words, in the high quality mode, there may be a need to print with a higher sharpness of the face area, so the overall processing intensity table value is set larger than in the low quality mode. You may make it.

次に、印字媒体上での画像のサイズに応じて、前記処理強度テーブルの値を決定することが挙げられる。すなわち、入力画像を紙などの印字媒体上にプリントする場合、原画像と印字媒体上のサイズが完全に一致しない限りは、何らかの拡大縮小処理が施されることになる。この際に、例えば拡大縮小処理に公知である線形補間を用いる場合を考える。線形補間を用いた拡大縮小処理では、アルゴリズムが簡易であるため、比較的高速に処理を行うことが可能であるが、拡大縮小比率が大きくなると、画像の鮮鋭度が失われる傾向にある。そこで、線形補間を用いる場合、拡大縮小比率が大きくなるに従って、処理強度テーブルの値を全体的に大きく設定するようにする。   Next, the value of the processing intensity table is determined according to the size of the image on the print medium. That is, when an input image is printed on a printing medium such as paper, some enlargement / reduction processing is performed as long as the original image and the size on the printing medium do not completely match. At this time, for example, a case where linear interpolation known in the enlargement / reduction processing is used is considered. In the enlargement / reduction process using linear interpolation, since the algorithm is simple, the process can be performed at a relatively high speed. However, as the enlargement / reduction ratio increases, the sharpness of the image tends to be lost. Therefore, when linear interpolation is used, the value of the processing intensity table is set to be large overall as the enlargement / reduction ratio increases.

一方、拡大縮小処理としてよく使用されるものに、公知であるbi-cubic補間が存在する。bi-cubic補間を用いると線形補間で拡大縮小した場合にくらべ、多少のエッジ強調効果があることが知られている。よって、bi-cubic補間の場合には処理強度が小さめに設定されるようにする。このように、拡大縮小する補間アルゴリズムに応じて、処理強度テーブルの値を決定するようにする。   On the other hand, a well-known bi-cubic interpolation exists as a frequently used enlargement / reduction process. When bi-cubic interpolation is used, it is known that there is a slight edge enhancement effect compared to enlargement / reduction by linear interpolation. Therefore, in the case of bi-cubic interpolation, the processing intensity is set to be small. As described above, the value of the processing intensity table is determined in accordance with the interpolation algorithm to be enlarged or reduced.

次に、印字媒体の種類に応じて前記処理強度テーブルの値を決定することが挙げられる。例えば、印字媒体が普通紙であった場合、染料インクを用いたインクジェットプリンタで印字を行うと、インクの滲みから画像の鮮鋭度が失われてしまう。逆に、印字媒体が写真専用である高品位用紙であった場合、印字結果においても画像の鮮鋭度が失われることはない。従って、印字媒体が普通紙の場合、高品位用紙の場合と比較して、上記処理強度テーブルの値を大きく設定する。   Next, the value of the processing intensity table may be determined according to the type of print medium. For example, when the printing medium is plain paper, when printing is performed with an ink jet printer using dye ink, the sharpness of the image is lost due to ink bleeding. On the contrary, when the printing medium is a high-quality paper dedicated to photography, the sharpness of the image is not lost even in the printing result. Therefore, when the printing medium is plain paper, the value of the processing intensity table is set larger than that of high-quality paper.

以上のように第4実施形態によれば、画像の出力形態に応じて鮮鋭化パラメータを決定することにより、より最適な鮮鋭化処理を行うことが可能となる。例えば、プリンタドライバのUIにおいて指定された紙サイズや紙種類等の出力形態に応じて鮮鋭化強度を変更して出力するように構成すれば、出力形態を指定するだけで適切な鮮鋭化処理が施されることになり、便利である。   As described above, according to the fourth embodiment, it is possible to perform a more optimal sharpening process by determining the sharpening parameter according to the output form of the image. For example, if the sharpening strength is changed in accordance with the output form such as the paper size and paper type specified in the printer driver UI, the output can be appropriately sharpened only by specifying the output form. It will be applied and it is convenient.

(その他の実施形態)
また、上記実施形態では、鮮鋭化処理としてアンシャープマスク処理を例に挙げて説明したが、本実施形態はこれに限定するものではなく、その他の鮮鋭化フィルタ処理を行ってもよい。また、画像に対して直交変換を行い、その高周波成分を強調した後、逆変換を行って、画像を鮮鋭化しても構わない。また、鮮鋭化処理以外の平滑化処理などを行ってもよい。
(Other embodiments)
In the above-described embodiment, the unsharp mask process has been described as an example of the sharpening process. However, the present embodiment is not limited to this, and other sharpening filter processes may be performed. Alternatively, the image may be sharpened by performing orthogonal transform on the image and enhancing the high-frequency component, and then performing inverse transform. Further, a smoothing process other than the sharpening process may be performed.

また、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用しても良い。   In addition, the present invention can be applied to a system composed of a plurality of devices (for example, a host computer, interface device, reader, printer, etc.), or a device (for example, a copier, a facsimile device, etc.) composed of a single device You may apply to.

また、本発明の目的は、前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Another object of the present invention is to supply a storage medium (or recording medium) that records software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and to perform a computer (or CPU) of the system or apparatus. Needless to say, this can also be achieved by reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

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

本発明を実施するためのハードウェア構成を示す図である。It is a figure which shows the hardware constitutions for implementing this invention. 第1実施形態における処理のブロック図である。It is a block diagram of processing in the first embodiment. 検出した顔矩形領域と設定した処理範囲の例を示す図である。It is a figure which shows the example of the detected face rectangular area and the set processing range. 楕円座標の定義を説明する図である。It is a figure explaining the definition of an elliptical coordinate. ユーザインターフェースの例を示す図である。It is a figure which shows the example of a user interface. 指定強度の鮮鋭化パラメータの関係を示す図である。It is a figure which shows the relationship of the sharpening parameter of designated intensity | strength. 処理範囲と鮮鋭化パラメータの関係を示す図である。It is a figure which shows the relationship between a process range and a sharpening parameter. 鮮鋭化処理部の処理のフローチャートである。It is a flowchart of a process of the sharpening process part. 平坦性評価量の算出方法を説明するための図を示す図である。It is a figure which shows the figure for demonstrating the calculation method of flatness evaluation amount. 平坦性評価量と鮮鋭化パラメータの関係を示す図である。It is a figure which shows the relationship between flatness evaluation amount and a sharpening parameter. 第2実施形態における顔矩形領域と処理範囲の例を示す図である。It is a figure which shows the example of the face rectangular area and process range in 2nd Embodiment. 第2実施形態における処理のブロック図である。It is a block diagram of processing in the second embodiment. 重複における処理強度の決定方法を説明する図である。It is a figure explaining the determination method of the process strength in duplication. 第3実施形態における処理のブロック図である。It is a block diagram of processing in a 3rd embodiment. フォーカスポイントを説明するための図である。It is a figure for demonstrating a focus point. 第3実施形態における処理のブロック図である。It is a block diagram of processing in a 3rd embodiment. 図5のユーザインターフェースを用いて矩形領域を設定する様子を示す図である。It is a figure which shows a mode that a rectangular area is set using the user interface of FIG.

Claims (9)

画像から顔領域を抽出する抽出手段と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定手段と、
前記設定手段は、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字モードとして画質重視のモードが選択された場合、速度重視の印字モードが選択された場合と比較して前記処理強度を小さく設定し、
前記抽出手段で抽出した顔領域の各画素に、前記設定手段で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化手段とを備えることを特徴とする画像処理装置。
Extracting means for extracting a face region from an image;
Setting means for setting the processing strength of the sharpening process for each pixel in the face area;
The setting means sets the processing intensity using a first parameter that decreases in value as the pixel position approaches the boundary at least near the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image quality-oriented mode is selected as the print mode for printing the image, it is compared with the case where the speed-oriented print mode is selected. To reduce the processing intensity,
An image processing apparatus, comprising: a sharpening unit that applies a sharpening process to each pixel of the face area extracted by the extraction unit with a processing intensity set by the setting unit.
画像から顔領域を抽出する抽出手段と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定手段と、
前記設定手段は、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を拡大縮小処理して印字媒体に印字する場合、前記拡大縮小処理の拡大縮小比率が大きいほど処理強度が大きくなるように前記処理強度を設定し、
前記抽出手段で抽出した顔領域の各画素に、前記設定手段で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化手段とを備えることを特徴とする画像処理装置。
Extracting means for extracting a face region from an image;
Setting means for setting the processing strength of the sharpening process for each pixel in the face area;
The setting means sets the processing intensity using a first parameter that decreases in value as the pixel position approaches the boundary at least near the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image is enlarged and reduced and printed on a print medium, the processing intensity increases as the enlargement / reduction ratio of the enlargement / reduction process increases. Set the processing intensity as
An image processing apparatus, comprising: a sharpening unit that applies a sharpening process to each pixel of the face area extracted by the extraction unit with a processing intensity set by the setting unit.
画像から顔領域を抽出する抽出手段と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定手段と、
前記設定手段は、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字媒体が普通紙の場合、高品位用紙の場合と比較して前記処理強度を大きく設定し、
前記抽出手段で抽出した顔領域の各画素に、前記設定手段で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化手段とを備えることを特徴とする画像処理装置。
Extracting means for extracting a face region from an image;
Setting means for setting the processing strength of the sharpening process for each pixel in the face area;
The setting means sets the processing intensity using a first parameter that decreases in value as the pixel position approaches the boundary at least near the boundary of the face region. The maximum value is set so that the maximum value of one parameter is increased, and the processing strength is set to be larger than that of high-quality paper when the print medium for printing the image is plain paper,
An image processing apparatus, comprising: a sharpening unit that applies a sharpening process to each pixel of the face area extracted by the extraction unit with a processing intensity set by the setting unit.
画像から顔領域を抽出する抽出工程と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程と、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字モードとして画質重視のモードが選択された場合、速度重視の印字モードが選択された場合と比較して前記処理強度を小さく設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程とを備えることを特徴とする画像処理方法。
An extraction step of extracting a face region from the image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image quality-oriented mode is selected as the print mode for printing the image, it is compared with the case where the speed-oriented print mode is selected. To reduce the processing intensity,
A sharpening step of applying a sharpening process to each pixel of the face area extracted in the extraction step with the processing intensity set in the setting step.
画像から顔領域を抽出する抽出工程と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程と、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を拡大縮小処理して印字媒体に印字する場合、前記拡大縮小処理の拡大縮小比率が大きいほど処理強度が大きくなるように前記処理強度を設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程とを備えることを特徴とする画像処理方法。
An extraction step of extracting a face region from the image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image is enlarged and reduced and printed on a print medium, the processing intensity increases as the enlargement / reduction ratio of the enlargement / reduction process increases. Set the processing intensity as
A sharpening step of applying a sharpening process to each pixel of the face area extracted in the extraction step with the processing intensity set in the setting step.
画像から顔領域を抽出する抽出工程と、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程と、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字媒体が普通紙の場合、高品位用紙の場合と比較して前記処理強度を大きく設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程とを備えることを特徴とする画像処理方法。
An extraction step of extracting a face region from the image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. The maximum value is set so that the maximum value of one parameter is increased, and the processing strength is set to be larger than that of high-quality paper when the print medium for printing the image is plain paper,
A sharpening step of applying a sharpening process to each pixel of the face area extracted in the extraction step with the processing intensity set in the setting step.
コンピュータに、
画像から顔領域を抽出する抽出工程、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字モードとして画質重視のモードが選択された場合、速度重視の印字モードが選択された場合と比較して前記処理強度を小さく設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程、を実行させることを特徴とするプログラム。
On the computer,
An extraction process for extracting a face region from an image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image quality-oriented mode is selected as the print mode for printing the image, it is compared with the case where the speed-oriented print mode is selected. To reduce the processing intensity,
A program for executing a sharpening process for applying a sharpening process to each pixel of a face area extracted in the extraction process at a processing intensity set in the setting process.
コンピュータに、
画像から顔領域を抽出する抽出工程、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を拡大縮小処理して印字媒体に印字する場合、前記拡大縮小処理の拡大縮小比率が大きいほど処理強度が大きくなるように前記処理強度を設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程、を実行させることを特徴とするプログラム。
On the computer,
An extraction process for extracting a face region from an image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. When the maximum value is set so that the maximum value of one parameter is increased, and when the image is enlarged and reduced and printed on a print medium, the processing intensity increases as the enlargement / reduction ratio of the enlargement / reduction process increases. Set the processing intensity as
A program for executing a sharpening process for applying a sharpening process to each pixel of a face area extracted in the extraction process at a processing intensity set in the setting process.
コンピュータに、
画像から顔領域を抽出する抽出工程、
前記顔領域内の各画素に対する鮮鋭化処理の処理強度を設定する設定工程、
前記設定工程では、少なくとも前記顔領域の境界付近において画素の位置が該境界に近づくにつれて値が小さくなる第1パラメータを用いて前記処理強度を設定し、前記顔領域の大きさが大きいほど前記第1パラメータの最大値が大きくなるように前記最大値を設定し、さらに、前記画像を印字する印字媒体が普通紙の場合、高品位用紙の場合と比較して前記処理強度を大きく設定し、
前記抽出工程で抽出した顔領域の各画素に、前記設定工程で設定された処理強度で鮮鋭化処理を作用させる鮮鋭化工程、を実行させることを特徴とするプログラム。
On the computer,
An extraction process for extracting a face region from an image;
A setting step for setting a processing intensity of a sharpening process for each pixel in the face area;
In the setting step, the processing intensity is set using a first parameter that decreases in value as the pixel position approaches the boundary at least in the vicinity of the boundary of the face region. The maximum value is set so that the maximum value of one parameter is increased, and the processing strength is set to be larger than that of high-quality paper when the print medium for printing the image is plain paper,
A program for executing a sharpening process for applying a sharpening process to each pixel of a face area extracted in the extraction process at a processing intensity set in the setting process.
JP2004194287A 2004-06-30 2004-06-30 Image processing apparatus and method Expired - Fee Related JP4137015B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004194287A JP4137015B2 (en) 2004-06-30 2004-06-30 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004194287A JP4137015B2 (en) 2004-06-30 2004-06-30 Image processing apparatus and method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008004903A Division JP4766702B2 (en) 2008-01-11 2008-01-11 Image processing apparatus and method

Publications (3)

Publication Number Publication Date
JP2006019930A JP2006019930A (en) 2006-01-19
JP2006019930A5 JP2006019930A5 (en) 2006-03-02
JP4137015B2 true JP4137015B2 (en) 2008-08-20

Family

ID=35793784

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004194287A Expired - Fee Related JP4137015B2 (en) 2004-06-30 2004-06-30 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4137015B2 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4580307B2 (en) * 2005-08-12 2010-11-10 富士フイルム株式会社 Detected image region determining device, target image feature value calculating device, control method therefor, and control program therefor
JP4750632B2 (en) * 2006-06-30 2011-08-17 キヤノン株式会社 Image processing method and image processing apparatus
WO2008095037A2 (en) * 2007-01-30 2008-08-07 Fergason Patent Properties, Llc Image acquistion and display system and method using information derived from an area of interest in a video image implementing system synchronized brightness control and use of metadata
JP2009163691A (en) * 2008-01-10 2009-07-23 Casio Comput Co Ltd Image processor and program
JP5229910B2 (en) * 2008-08-08 2013-07-03 株式会社メイクソフトウェア Image processing apparatus, image output apparatus, image processing method, and computer program
JP4528857B2 (en) 2008-12-24 2010-08-25 株式会社東芝 Image processing apparatus and image processing method
JP5029719B2 (en) 2010-03-23 2012-09-19 ブラザー工業株式会社 Image processing device
JP5163801B2 (en) * 2011-10-27 2013-03-13 セイコーエプソン株式会社 Apparatus, method, and computer program
JP5440624B2 (en) * 2012-02-03 2014-03-12 ブラザー工業株式会社 Image processing device
JP5956935B2 (en) * 2013-01-18 2016-07-27 黒崎播磨株式会社 Image processing method and image processing apparatus
JP6379474B2 (en) * 2013-11-14 2018-08-29 株式会社ニコン Spectacle lens evaluation method, spectacle lens manufacturing method, and display method
JP6573798B2 (en) * 2014-11-21 2019-09-11 三星電子株式会社Samsung Electronics Co.,Ltd. Image processing apparatus and image processing method
JP2017102642A (en) * 2015-12-01 2017-06-08 カシオ計算機株式会社 Image processor, image processing method and program
CN111081149B (en) * 2019-12-26 2021-12-03 Tcl华星光电技术有限公司 Display method and display device
CN111461970B (en) * 2020-04-09 2023-08-11 北京百度网讯科技有限公司 Image processing method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1231773B8 (en) * 2001-02-09 2005-09-28 Imaging Solutions AG Local sharpening of photographic images by utilizing masks
JP2004021374A (en) * 2002-06-13 2004-01-22 Fuji Xerox Co Ltd Image processing method, image processing device, program, and storage medium

Also Published As

Publication number Publication date
JP2006019930A (en) 2006-01-19

Similar Documents

Publication Publication Date Title
JP4042563B2 (en) Image noise reduction
JP3726653B2 (en) Image processing method, image processing apparatus, and recording medium on which program for executing image processing method is recorded
JP5595121B2 (en) Image processing apparatus, image processing method, and program
JP4137015B2 (en) Image processing apparatus and method
JP4780374B2 (en) Image processing method and program for suppressing granular noise, and granular suppression processing module for implementing the method
US6373992B1 (en) Method and apparatus for image processing
US11037037B2 (en) Image processing apparatus, image processing method, and non-transitory computer readable storage medium
JP2000115539A (en) Method and device for processing image and recording medium
JP4766702B2 (en) Image processing apparatus and method
JP2005227838A (en) Image processing method, device, and program
JP4099936B2 (en) Image processing apparatus, image processing method, and recording medium storing image processing program
JP2004127064A (en) Image processing method, image processor, image processing program and image recording device
JP4097587B2 (en) Image processing apparatus and image processing method
JP2006343863A (en) Image processor and image processing method
JP2007241424A (en) Image processor and image processing method
JP2009266233A (en) Image processor and image processing method
JP5157678B2 (en) Photo image processing method, photo image processing program, and photo image processing apparatus
JP2005141477A (en) Image sharpening process and image processor implementing this process
JP2006113658A (en) Image processing apparatus and method, and storage medium with program recorded thereon
JP4017312B2 (en) Image processing method, image processing apparatus, and recording medium
JP3729118B2 (en) Image processing method, image processing apparatus, image processing program, and computer-readable recording medium recording the same
JP2006155572A (en) Image processor, image forming device, image processing method and computer program
JP2003274180A (en) Image processor, image processing method, printer driver, computer readable storage medium and computer program
JP4665802B2 (en) Lightness correction processing apparatus and lightness correction determination method
JP4527439B2 (en) Image processing method, apparatus, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051208

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071112

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080111

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080414

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20080424

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080512

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080603

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130613

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees