JP2010170219A - Apparatus, method and program for processing image, and printer - Google Patents

Apparatus, method and program for processing image, and printer Download PDF

Info

Publication number
JP2010170219A
JP2010170219A JP2009010328A JP2009010328A JP2010170219A JP 2010170219 A JP2010170219 A JP 2010170219A JP 2009010328 A JP2009010328 A JP 2009010328A JP 2009010328 A JP2009010328 A JP 2009010328A JP 2010170219 A JP2010170219 A JP 2010170219A
Authority
JP
Japan
Prior art keywords
area
image
face
deformation
enlargement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009010328A
Other languages
Japanese (ja)
Inventor
Eiji Yotsuya
栄史 四谷
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2009010328A priority Critical patent/JP2010170219A/en
Publication of JP2010170219A publication Critical patent/JP2010170219A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve such the problem that since the aspect ratio of a face is also greatly changed in deforming an image including a person, a bad-looking image is produced. <P>SOLUTION: An image processor includes: a region setting part for setting a compression region and an enlargement region in an object image including a face image; an image deformation part for enlarging the enlargement region in a specific direction by a prescribed enlargement rate; and a face deformation part for, when at least a portion of the face image is included in the enlargement region, deforming the face image by compression quantity determined according to the enlargement rate so that the face image included in the enlargement region is compressed in the specific direction. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像処理装置、画像処理方法、画像処理プログラムおよび印刷装置に関する。   The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a printing apparatus.

デジタル画像を対象に、画像を変形するための画像処理技術が知られている(特許文献1参照。)。特許文献1には、顔の画像上の一部の領域(頬の画像を表す領域)を補正領域として設定し、補正領域を所定のパターンに従い複数の小領域に分割し、小領域毎に設定された倍率で画像を拡大または縮小することにより、顔の形状を変形する画像処理が開示されている。   An image processing technique for deforming an image for a digital image is known (see Patent Document 1). In Patent Document 1, a partial area (an area representing a cheek image) on a face image is set as a correction area, the correction area is divided into a plurality of small areas according to a predetermined pattern, and set for each small area. Image processing for deforming the shape of a face by enlarging or reducing the image at a specified magnification is disclosed.

特開2004‐318204号公報JP 2004-318204 A

またユーザーは、画像に顔を含む人物が写っている場合に、人物の体型が好みの体型(例えば、細身の体型)に変形された画像を得たいと望むことがある。このような要望に応える変形処理として、画像内に特定領域を設定してこの特定領域に対して一律な圧縮処理を施し、同時に、当該特定領域外の領域に対して一律な拡大処理を施す場合がある。しかし上記一律な変形(圧縮および拡大)処理を施すと、特定領域あるいは特定領域外に含まれる人物の顔も変形の影響を受け、その結果、顔の縦横比が大きく変化した画像が得られてしまう。このように顔の縦横比が大きく変化した人物の画像(例えば、顔が著しく横長になった画像)は、ユーザーに違和感を与えてしまう。   In addition, when a person including a face is captured in an image, the user may desire to obtain an image in which the figure of the person is transformed into a favorite figure (for example, a slim figure). As a deformation process that meets such demands, a specific area is set in an image and uniform compression processing is performed on the specific area, and at the same time, uniform enlargement processing is performed on an area outside the specific area. There is. However, when the uniform deformation (compression and enlargement) processing is performed, the face of the person included in the specific area or outside the specific area is also affected by the deformation, and as a result, an image in which the aspect ratio of the face is greatly changed is obtained. End up. In this way, an image of a person whose face aspect ratio has changed significantly (for example, an image in which the face is extremely long) gives the user a sense of discomfort.

本発明は上記課題に鑑みてなされたものであり、人物を含む画像について、より見栄えのよい変形結果を容易に得ることが可能な画像処理装置、画像処理方法、画像処理プログラムおよび印刷装置を提供することを目的とする。   The present invention has been made in view of the above problems, and provides an image processing apparatus, an image processing method, an image processing program, and a printing apparatus capable of easily obtaining a better-looking deformation result for an image including a person. The purpose is to do.

上記目的を達成するため、本発明の画像処理装置は、顔画像が含まれる対象画像において、対象画像内に圧縮領域と拡大領域とを設定する領域設定部と、所定の拡大率によって、上記拡大領域を特定方向に拡大する画像変形部と、上記顔画像の少なくとも一部が上記拡大領域に含まれている場合に、当該拡大領域に含まれている顔画像が上記特定方向に圧縮されるように、上記拡大率に応じて決定した圧縮量によって上記顔画像を変形する顔変形部とを備える。本発明によれば、顔変形部は、拡大領域に含まれる顔画像が、拡大領域の拡大率に応じて決定した圧縮量によって特定方向に圧縮されるように変形させる。そのため、画像変形部によって拡大領域が拡大されても、結果的に顔の縦横比は大きく崩れることが無い。よって、ユーザーに違和感を与えることの無い画像を得ることができる。なお、画像変形部による処理と顔変形部による処理の順番はどちらが先でも良い。   In order to achieve the above object, the image processing apparatus according to the present invention includes a region setting unit that sets a compression region and an enlargement region in a target image in a target image including a face image, and a predetermined enlargement ratio. When an image deforming unit that enlarges an area in a specific direction and at least a part of the face image are included in the enlarged area, the face image included in the enlarged area is compressed in the specific direction. And a face deformation unit that deforms the face image by a compression amount determined according to the enlargement ratio. According to the present invention, the face deforming unit deforms the face image included in the enlarged area so as to be compressed in a specific direction by the compression amount determined according to the enlargement ratio of the enlarged area. Therefore, even if the enlargement area is enlarged by the image deformation unit, the aspect ratio of the face does not collapse greatly as a result. Therefore, an image that does not give the user a sense of incongruity can be obtained. Note that the order of processing by the image deformation unit and processing by the face deformation unit may be first.

上記画像変形部は、所定の圧縮率によって上記圧縮領域を上記特定方向に圧縮し、上記顔変形部は、上記顔画像の少なくとも一部が上記圧縮領域に含まれている場合に、当該圧縮領域に含まれている顔画像が上記特定方向に拡大されるように、上記圧縮率に応じて決定した拡大量によって上記顔画像を変形するとしてもよい。当該構成によれば、拡大領域に含まれる顔画像は拡大領域における拡大効果をある程度打ち消すように圧縮されるという効果に加え、圧縮領域に含まれる顔画像は圧縮領域における圧縮効果をある程度打ち消すように拡大されるという効果も奏する。なお、圧縮領域と拡大領域とに跨る位置に存在する顔画像については、圧縮領域に含まれる範囲を特定方向に拡大し、拡大領域に含まれる範囲を特定方向に圧縮する。   The image deformation unit compresses the compression region in the specific direction at a predetermined compression rate, and the face deformation unit is configured to compress the compression region when at least a part of the face image is included in the compression region. The face image may be deformed by an enlargement amount determined according to the compression rate so that the face image included in the image is enlarged in the specific direction. According to this configuration, in addition to the effect that the face image included in the enlarged region is compressed so as to cancel the enlargement effect in the enlarged region to some extent, the face image included in the compressed region cancels the compression effect in the compressed region to some extent. There is also an effect that it is enlarged. For a face image that exists at a position straddling the compression area and the enlargement area, the range included in the compression area is expanded in a specific direction, and the range included in the expansion area is compressed in a specific direction.

上記顔変形部は、上記顔画像の上下方向と上記特定方向とがなす角度が所定の基準角度より大きい場合に、上記顔画像の変形を実行するとしてもよい。当該構成によれば、上下方向が特定方向と略平行な顔画像については変形対象から除外し、特定方向に対して上下方向がある程度立った(略垂直な)顔画像について、拡大領域(圧縮領域)における拡大率(圧縮率)に応じた変形を行なうことができる。   The face deformation unit may perform the deformation of the face image when an angle formed by the vertical direction of the face image and the specific direction is larger than a predetermined reference angle. According to this configuration, the face image whose vertical direction is substantially parallel to the specific direction is excluded from the deformation target, and the enlarged image (compressed region) of the face image whose vertical direction stands to some extent (substantially perpendicular) with respect to the specific direction. ) In accordance with the enlargement ratio (compression ratio).

上記顔変形部は、上記対象画像内に複数の顔画像が存在する場合に、少なくとも一部が互いに重なっている各顔画像を除いた顔画像に対して変形を実行するとしてもよい。当該構成によれば、互いに重なっている各顔画像について個々に変形を行なうことで却って画像が全体的に破綻してしまう、といった不都合を防止できる。   The face deforming unit may perform deformation on a face image excluding face images at least partially overlapping each other when a plurality of face images exist in the target image. According to this configuration, it is possible to prevent the inconvenience that the images collapse on the contrary by individually deforming the face images that overlap each other.

上記顔変形部は、上記拡大率が示す数値のうちの所定割合の数値に基づいて上記圧縮量を決定するとしてもよい。例えば、上記拡大率が20%であれば、当該20%という数値の何割かの数値を上記圧縮量とする。このように、拡大領域に対する拡大効果を完全に打ち消すような圧縮量を顔画像に適用するのではなく、拡大率が示す数値のうちの所定割合の数値に基づいて顔画像の圧縮量を決定することで、画像変形部による処理と顔変形部による処理の両方が終わった後において、拡大領域における顔と顔以外の部分とのバランスが最適となった画像を得ることができる。   The face deforming unit may determine the compression amount based on a predetermined ratio of the numerical values indicated by the enlargement ratio. For example, if the enlargement ratio is 20%, a numerical value that is a percentage of the numerical value of 20% is used as the compression amount. Thus, instead of applying a compression amount that completely cancels the enlargement effect on the enlargement region to the face image, the compression amount of the face image is determined based on a numerical value of a predetermined ratio of the numerical values indicated by the enlargement rate. Thus, after both the processing by the image deforming unit and the processing by the face deforming unit are finished, an image in which the balance between the face and the part other than the face in the enlarged region is optimal can be obtained.

これまでは、本発明の技術的思想を画像処理装置として説明したが、上述した画像処理装置が備える各手段に対応した各工程を備えた画像処理方法の発明や、上述した画像処理装置が備える各手段に対応した各機能をコンピューターに実行させる画像処理プログラムの発明をも把握することができる。また、上記の画像処理装置、画像処理方法および画像処理プログラムは具体的には、パーソナルコンピューターやサーバー等のハードウェアによって実現されてもよいし、画像入力装置としてのデジタルスチルカメラやスキャナー、あるいは、画像出力装置としてのプリンター(印刷装置)やプロジェクターやフォトヴューワー等、様々な製品によって実現することができる。   So far, the technical idea of the present invention has been described as an image processing apparatus. However, the invention of the image processing method including each process corresponding to each means included in the above-described image processing apparatus and the above-described image processing apparatus are included. It is also possible to grasp the invention of an image processing program that causes a computer to execute each function corresponding to each means. Further, the image processing device, the image processing method, and the image processing program may be specifically realized by hardware such as a personal computer or a server, or a digital still camera or scanner as an image input device, or It can be realized by various products such as a printer (printing device) as an image output device, a projector, and a photo viewer.

画像処理装置としてのプリンターの構成を概略的に示す説明図である。FIG. 2 is an explanatory diagram schematically illustrating a configuration of a printer as an image processing apparatus. 画像補正処理の一例を示したフローチャートである。It is the flowchart which showed an example of the image correction process. UIの一例を示した説明図である。It is explanatory drawing which showed an example of UI. 対象画像から顔領域が検出された様子を示した説明図である。It is explanatory drawing which showed a mode that the face area | region was detected from the target image. 顔領域から器官領域が検出された様子を示した説明図である。It is explanatory drawing which showed a mode that the organ area | region was detected from the face area | region. 顔変形処理の詳細を示したフローチャートである。It is the flowchart which showed the detail of the face deformation process. 顔領域に対して変形領域を設定した様子を示した説明図である。It is explanatory drawing which showed a mode that the deformation | transformation area | region was set with respect to the face area | region. 変形領域の小領域への分割方法の一例を示した説明図である。It is explanatory drawing which showed an example of the division | segmentation method to a small area | region of a deformation | transformation area | region. 分割点毎の移動量の一例を示した図である。It is the figure which showed an example of the movement amount for every division | segmentation point. 顔変形処理によって変形領域内の画像が変形される様子の一例を示した図である。It is the figure which showed an example of a mode that the image in a deformation | transformation area | region is deform | transformed by face deformation processing. 小領域画像の変形処理を概念的に示す説明図である。It is explanatory drawing which shows the deformation | transformation process of a small area image notionally. 三角形領域における画像の変形処理方法の概念を示す説明図である。It is explanatory drawing which shows the concept of the deformation | transformation processing method of the image in a triangular area | region. 一方向変形処理によって対象画像の各領域が変形される様子の一例を示した図である。It is the figure which showed an example of a mode that each area | region of a target image was deform | transformed by a one-way deformation | transformation process. 一方向変形処理の詳細を示したフローチャートである。It is the flowchart which showed the detail of the unidirectional deformation process. 一方向変形処理を模式的に示した説明図である。It is explanatory drawing which showed the one-way deformation | transformation process typically. 対象領域内において顔領域が互いに重なった様子を示した図である。It is the figure which showed a mode that the face area | region overlapped in the object area | region. 分割点毎の移動量の他の例を示した図である。It is the figure which showed the other example of the movement amount for every division | segmentation point. 顔変形処理によって変形領域内の画像が変形される様子の他の例を示した図である。It is the figure which showed the other example of a mode that the image in a deformation | transformation area | region is deform | transformed by face deformation processing. 変形領域が圧縮領域と拡大領域に跨っている様子を示した図である。It is the figure which showed a mode that the deformation | transformation area | region straddled the compression area | region and the expansion area | region.

下記の順序に従って、本発明の実施形態を説明する。
1.画像処理装置の概略構成
2.画像補正処理
3.まとめ
The embodiments of the present invention will be described in the following order.
1. 1. Schematic configuration of image processing apparatus 2. Image correction processing Summary

1.画像処理装置の概略構成
図1は、本発明にかかる画像処理装置の一例としてのプリンター100の構成を概略的に示す説明図である。プリンター100は、メモリーカードMC等の記録メディアから取得した画像データに基づき画像を印刷する、いわゆるダイレクトプリントに対応したカラーインクジェットプリンターである。プリンター100は、内部メモリー120と、CPU110と、操作部140と、表示部150と、プリンターエンジン160と、カードインターフェース(カードI/F)170と、カードスロット172とを備えている。
1. Schematic Configuration of Image Processing Device FIG. 1 is an explanatory diagram schematically showing the configuration of a printer 100 as an example of an image processing device according to the present invention. The printer 100 is a color inkjet printer that supports so-called direct printing, in which an image is printed based on image data acquired from a recording medium such as a memory card MC. The printer 100 includes an internal memory 120, a CPU 110, an operation unit 140, a display unit 150, a printer engine 160, a card interface (card I / F) 170, and a card slot 172.

内部メモリー120は、ROMやRAMによって構成されており、機能ブロックとして、画像補正処理部200と、表示処理部310と、印刷処理部320とを備えている。画像補正処理部200は、所定のオペレーティングシステムの下で、後述する画像補正処理を実行するためのコンピュータープログラムである。画像補正処理部200は、プログラムモジュールとして、顔領域検出部210と、変形方向設定部220と、一方向変形部230とを有している。一方向変形部230は、RAMに設けられた一時記憶領域であるバッファ領域と、対応画素数テーブル410とを用いることにより、画像補正処理の一種としての一方向変形処理を実行する。一方向変形部230は、特許請求の範囲における領域設定部および画像変形部を兼ねている。さらに、画像補正処理部200は、プログラムモジュールとして、顔変形部240を含んでいる。顔変形部240は、分割点配置パターンテーブル420を用いて、画像補正処理の一種としての顔変形処理を実行する。これら各部の機能については後述する。   The internal memory 120 includes a ROM and a RAM, and includes an image correction processing unit 200, a display processing unit 310, and a print processing unit 320 as functional blocks. The image correction processing unit 200 is a computer program for executing image correction processing to be described later under a predetermined operating system. The image correction processing unit 200 includes a face area detection unit 210, a deformation direction setting unit 220, and a unidirectional deformation unit 230 as program modules. The unidirectional deformation unit 230 executes a unidirectional deformation process as a kind of image correction process by using a buffer area that is a temporary storage area provided in the RAM and a corresponding pixel number table 410. The unidirectional deformation unit 230 also serves as an area setting unit and an image deformation unit in the claims. Further, the image correction processing unit 200 includes a face deformation unit 240 as a program module. The face deforming unit 240 uses the dividing point arrangement pattern table 420 to perform face deforming processing as a kind of image correction processing. The functions of these units will be described later.

表示処理部310は、表示部150を制御して、表示部150上に処理メニューやメッセージや画像等を表示させるディスプレードライバーである。印刷処理部320は、画像データに対して所定の色変換処理やハーフトーン処理を施すことにより画素毎のインク量を規定した印刷データを生成し、プリンターエンジン160を制御して当該印刷データに基づいて画像の印刷を実行させるためのコンピュータープログラムである。印刷処理部320による色変換処理やハーフトーン処理の処理対象となる画像データには、例えば、画像補正処理部200によって画像補正処理が実行された後の画像を表す画像データが該当する。CPU110は、上述したこれらのプログラムを内部メモリー120から読み出して実行することにより、これら各部の機能をそれぞれ実現する。   The display processing unit 310 is a display driver that controls the display unit 150 to display processing menus, messages, images, and the like on the display unit 150. The print processing unit 320 generates print data that defines the ink amount for each pixel by performing predetermined color conversion processing and halftone processing on the image data, and controls the printer engine 160 based on the print data. This is a computer program for executing image printing. For example, image data representing an image after the image correction processing is executed by the image correction processing unit 200 corresponds to the image data to be processed by the color conversion processing and the halftone processing by the print processing unit 320. The CPU 110 implements the functions of these units by reading these programs from the internal memory 120 and executing them.

操作部140は、ボタンやタッチパネルを備えておりユーザーによる指示等の入力を受け付ける。表示部150は、例えば液晶ディスプレーによって構成されている。プリンターエンジン160は、印刷処理部320から送信される印刷データに基づき印刷を行う印刷機構である。カードI/F170は、カードスロット172に挿入されたメモリーカードMCとの間でデータのやり取りを行うためのインターフェースである。プリンター100は、カードI/F170以外にも、他の機器(例えばデジタルスチルカメラやパーソナルコンピューター)とのデータ通信を行うためのインターフェースを備える構成とすることもできる。以上の各構成要素は、バスを介して互いに接続されている。
プリンター100は、人画像を含む画像に対して顔変形処理および一方向変形処理を実行することにより、人画像を全体的に細くあるいは太く変形させることができるとともに、人物の顔のバランス(顔の縦横比)を適正化することができる。
The operation unit 140 includes buttons and a touch panel, and accepts input such as instructions from the user. The display unit 150 is configured by a liquid crystal display, for example. The printer engine 160 is a printing mechanism that performs printing based on print data transmitted from the print processing unit 320. The card I / F 170 is an interface for exchanging data with the memory card MC inserted into the card slot 172. In addition to the card I / F 170, the printer 100 may include an interface for performing data communication with other devices (for example, a digital still camera or a personal computer). The above components are connected to each other via a bus.
The printer 100 can perform a face deformation process and a one-way deformation process on an image including a human image, thereby deforming the human image as a whole thinly or thickly, and at the same time, the balance of the person's face (face Aspect ratio) can be optimized.

2.画像補正処理
図2は、プリンター100によって実行される画像補正処理をフローチャートにより示している。
ステップS(以下、ステップの表記を省略する。)100では、画像補正処理部200は、処理対象となる対象画像を設定(取得)する。例えば、カードスロット172にメモリーカードMCが挿入されると、表示処理部310は、メモリーカードMCに格納された画像の表示を含むユーザーインターフェース(UI)を表示部150に表示させる。そして、画像補正処理部200は、当該UIからの入力に従って対象画像を設定する。
2. Image Correction Process FIG. 2 is a flowchart showing the image correction process executed by the printer 100.
In step S (hereinafter, step notation is omitted) 100, the image correction processing unit 200 sets (acquires) a target image to be processed. For example, when the memory card MC is inserted into the card slot 172, the display processing unit 310 causes the display unit 150 to display a user interface (UI) including display of an image stored in the memory card MC. Then, the image correction processing unit 200 sets a target image according to the input from the UI.

図3は、表示部150に表示されるUIの一例を示している。例えば、UIは、画像表示欄IAと、2つの画像切替用ボタンB1,B2と、通常印刷ボタンB3と、補正印刷ボタンB4と、キャンセル用ボタンB5とを備えている。ユーザーは、画像表示欄IAを見ながら画像切替用ボタンB1,B2を操作して対象画像を選択し、通常印刷ボタンB3、補正印刷ボタンB4のいずれかを押下することで対象画像を設定できる。図3の例では、人物P1,P2が写った画像TIが対象画像として選択されており、この状態でユーザーが通常印刷ボタンB3、補正印刷ボタンB4のいずれかを押下することで、画像補正処理部200は、画像TIを対象画像として設定する。なおUIは、メモリーカードMC内の複数の画像を一覧表示する構成とすることもできる。   FIG. 3 shows an example of a UI displayed on the display unit 150. For example, the UI includes an image display field IA, two image switching buttons B1 and B2, a normal print button B3, a correction print button B4, and a cancel button B5. The user can set the target image by operating the image switching buttons B1 and B2 while selecting the target image while viewing the image display field IA, and pressing either the normal print button B3 or the corrected print button B4. In the example of FIG. 3, the image TI in which the persons P1 and P2 are captured is selected as the target image. In this state, when the user presses either the normal print button B3 or the corrected print button B4, image correction processing is performed. The unit 200 sets the image TI as a target image. The UI may be configured to display a list of a plurality of images in the memory card MC.

ユーザーが補正印刷ボタンB4を押下すると、画像補正処理部200は、対象画像に対して後述するように顔変形処理および一方向変形処理を施す。プリンター100は、当該フローチャート終了後は、補正処理が実行された画像を印刷する。ただし、ユーザーが通常印刷ボタンB3を押下した場合には、プリンター100は、対象画像について顔変形処理および一方向変形処理を行なうことなく、通常通り印刷する。   When the user presses the correction print button B4, the image correction processing unit 200 performs face deformation processing and unidirectional deformation processing on the target image as described later. After the flowchart is completed, the printer 100 prints the image on which the correction process has been executed. However, when the user presses the normal print button B3, the printer 100 prints the target image as usual without performing the face deformation process and the one-way deformation process.

S200では、画像補正処理部200は、上記UIのボタンに対するユーザーの操作によって、「補正印刷」の実行が指示されているか否か判断し、「補正印刷」が指示されている場合にはS300以下の処理に進み、「通常印刷」が指示されている場合には当該フローチャートを終了する。以下では、S100においてユーザーが補正印刷ボタンB4を押下げし「補正印刷」の実行指示をしたとして、説明を続ける。   In S200, the image correction processing unit 200 determines whether or not execution of “correction printing” is instructed by the user's operation on the UI button. If “correction printing” is instructed, the processing from S300 is performed. If “normal printing” is instructed, the flowchart ends. In the following, the description will be continued on the assumption that the user has pressed the correction print button B4 and instructed execution of “correction printing” in S100.

S300では、顔領域検出部210が、対象画像を表す画像データをメモリーカードMCから内部メモリー120に読み出すとともに、対象画像における顔領域の検出を行う。顔領域とは、対象画像内の顔画像の少なくとも一部を含む領域であって、少なくとも所定の顔器官(目や鼻や口)を含むと想定される領域である。顔領域検出部210は、対象画像を表す画像データを解析して当該顔器官を含むと想定される矩形の領域を顔領域として検出する。顔領域の検出は、例えばテンプレートを利用したパターンマッチングによる方法(特開2006‐279460参照)といった公知の検出方法を用いて実行される。顔領域検出部210は、上記パターンマッチングにも、顔領域を検出可能な手法であればあらゆる手法を採用することができる。例えば、顔領域検出部210は、対象画像内に設定した矩形領域(検出対象領域)単位で、画像の各種情報(例えば、輝度情報やエッジ量やコントラスト等。)を入力し検出対象領域が顔領域に該当するか否かを示す情報を出力する、予め学習されたニューラルネットワークを用いることにより、顔領域の検出を行なっても良いし、サポートベクタマシンを利用して検出対象領域毎に顔領域であるか否かを判断してもよい。   In S300, the face area detection unit 210 reads image data representing the target image from the memory card MC to the internal memory 120 and detects the face area in the target image. The face area is an area including at least a part of the face image in the target image, and is an area assumed to include at least a predetermined facial organ (eyes, nose, mouth). The face area detection unit 210 analyzes image data representing the target image and detects a rectangular area that is assumed to include the face organ as a face area. The face area is detected using a known detection method such as a pattern matching method using a template (see Japanese Patent Application Laid-Open No. 2006-279460). The face area detection unit 210 can employ any technique for the pattern matching as long as it can detect the face area. For example, the face area detection unit 210 inputs various pieces of image information (for example, luminance information, edge amount, contrast, etc.) in units of rectangular areas (detection target areas) set in the target image, and the detection target area is the face. A face area may be detected by using a pre-learned neural network that outputs information indicating whether or not the area corresponds, or a face area for each detection target area using a support vector machine It may be determined whether or not.

図4は、S300における顔領域の検出結果の一例を示す説明図である。図4の例では、対象画像TIに2人の人物P1,P2の画像が含まれているため、人物P1,P2の顔画像に対応する顔領域Fd(Fd1,Fd2)が検出されている。つまり、対象画像内に複数の顔画像が存在する場合には、顔領域検出部210によってそれぞれの顔画像にかかる顔領域Fdが検出される。顔領域Fdは、対応する顔における両目と鼻と口の各画像をすべて含む矩形の領域である。顔領域検出部210は、顔領域Fdを、その領域の4つの頂点の座標により特定する。ただし、メモリーカードMCに格納された対象画像を表す画像データに、既に対象画像内の顔領域Fdの検出結果(画像内の顔領域の位置を特定する情報)が付属情報として存在している場合もある。例えば、対象画像の撮影に用いられたデジタルスチルカメラの機能によって既に対象画像から顔領域Fdが検出され、その検出結果を示した情報が画像データとともにメモリーカードMCに記録されている場合等である。このような場合には、顔領域検出部210は対象画像から顔領域Fdの検出を行なう必要はなく、上記付属情報に基づいて対象画像内の顔領域Fdを特定する。   FIG. 4 is an explanatory diagram showing an example of a face area detection result in S300. In the example of FIG. 4, since the images of two persons P1 and P2 are included in the target image TI, face areas Fd (Fd1 and Fd2) corresponding to the face images of the persons P1 and P2 are detected. That is, when there are a plurality of face images in the target image, the face area detection unit 210 detects the face area Fd related to each face image. The face area Fd is a rectangular area that includes all the eyes, nose, and mouth images of the corresponding face. The face area detection unit 210 identifies the face area Fd based on the coordinates of the four vertices of the area. However, when the detection result of the face area Fd in the target image (information for specifying the position of the face area in the image) already exists as attached information in the image data representing the target image stored in the memory card MC. There is also. For example, when the face region Fd is already detected from the target image by the function of the digital still camera used for capturing the target image, and information indicating the detection result is recorded on the memory card MC together with the image data. . In such a case, the face area detection unit 210 does not need to detect the face area Fd from the target image, and specifies the face area Fd in the target image based on the attached information.

S400では、変形方向設定部220が、一方向変形処理のための変形方向を設定する。以下、「変形方向」と言った場合には、一方向変形処理のための変形方向を意味する。変形方向は、特許請求の範囲における特定方向に該当する。変形方向は、対象画像の横方向または縦方向のどちらかである。本実施形態では、対象画像の長辺方向を横方向とし、対象画像の短辺方向を縦方向として取り扱う。変形方向設定部220は、変形方向を外部からのユーザーの入力に応じて設定することも可能であるし、対象画像の解析結果によって設定することも可能である。   In S400, the deformation direction setting unit 220 sets a deformation direction for the unidirectional deformation process. Hereinafter, the term “deformation direction” means a deformation direction for unidirectional deformation processing. The deformation direction corresponds to a specific direction in the claims. The deformation direction is either the horizontal direction or the vertical direction of the target image. In the present embodiment, the long side direction of the target image is treated as the horizontal direction, and the short side direction of the target image is treated as the vertical direction. The deformation direction setting unit 220 can set the deformation direction according to an external user input, or can set the deformation direction based on the analysis result of the target image.

変形方向をユーザーの入力に応じて設定する場合、変形方向設定部220は、表示処理部310に変形方向設定用のUIを表示する処理を実行することを指示し、表示処理部310は、当該指示に応じて、表示部150に変形方向設定用のUIを表示させる。ユーザーは、変形方向設定用のUIを介し、変形方向として「横方向」または「縦方向」のどちらを選択するかを入力する。変形方向設定部220は、ユーザーの入力によって選択された「横方向」または「縦方向」を、変形方向として設定する。なおユーザーは、表示部150に表示された対象画像を視認しながら、基本的には、対象画像の横方向と縦方向とのうち、対象画像内の顔の左右方向(顔の幅方向)となす角度が小さい方向を、変形方向として選択する。   When the deformation direction is set according to a user input, the deformation direction setting unit 220 instructs the display processing unit 310 to execute a process of displaying a deformation direction setting UI, and the display processing unit 310 In response to the instruction, the display unit 150 displays a deformation direction setting UI. The user inputs whether to select “horizontal direction” or “vertical direction” as the deformation direction via the deformation direction setting UI. The deformation direction setting unit 220 sets “horizontal direction” or “vertical direction” selected by the user's input as the deformation direction. In addition, while visually recognizing the target image displayed on the display unit 150, the user basically determines the left-right direction (face width direction) of the face in the target image among the horizontal direction and the vertical direction of the target image. A direction with a small angle is selected as the deformation direction.

変形方向を対象画像の解析結果によって設定する場合、変形方向設定部220は、対象画像中の顔の傾きに応じて横方向または縦方向のどちらかを変形方向として設定する。例えば、変形方向設定部220は、S300で顔領域検出部210が検出または特定した顔領域Fd内における、右目の画像を含む領域(右目領域)と左目を含む領域(左目領域)とを検出する。この器官領域(右目領域、左目領域)の検出は、顔領域の検出と同様に、例えばテンプレートを利用したパターンマッチングによる方法といった公知の検出方法を用いて実行することができる。   When the deformation direction is set according to the analysis result of the target image, the deformation direction setting unit 220 sets either the horizontal direction or the vertical direction as the deformation direction according to the inclination of the face in the target image. For example, the deformation direction setting unit 220 detects a region including the right eye image (right eye region) and a region including the left eye (left eye region) in the face region Fd detected or specified by the face region detection unit 210 in S300. . The detection of the organ region (right eye region, left eye region) can be performed using a known detection method such as a pattern matching method using a template, as in the detection of the face region.

図5は、器官領域の検出結果の一例を示す説明図である。図5の例では、顔領域Fd1において、右目領域ERと左目領域ELとが検出されている。変形方向設定部220は、検出した右目領域ER、左目領域ELを、それぞれの領域の4つの頂点の座標によって特定することができる。変形方向設定部220は、右目領域ERの中心点CRと左目領域ELの中心点CLとを結ぶ線分L1に対して対象画像TI内で直交する線分L2を、顔の上下方向(顔の高さ方向)を規定する線分として扱い、線分L2の傾きを顔の傾きとする。例えば、変形方向設定部220は、対象画像TIの縦方向に対する線分L2の傾きが45°より小さい場合は、変形方向を「横方向」に設定する。一方、対象画像TIの縦方向に対する線分L2の傾きが45°より大きい場合は、変形方向を「縦方向」に設定する。線分L2の傾きが45°である場合、変形方向を予め定められた標準方向(例えば、横方向)に設定する。   FIG. 5 is an explanatory diagram showing an example of the detection result of the organ region. In the example of FIG. 5, the right eye area ER and the left eye area EL are detected in the face area Fd1. The deformation direction setting unit 220 can specify the detected right eye region ER and left eye region EL by the coordinates of the four vertices of each region. The deformation direction setting unit 220 sets a line segment L2 perpendicular to the line segment L1 connecting the center point CR of the right eye region ER and the center point CL of the left eye region EL in the target image TI (up and down direction of the face) The height direction is defined as a line segment, and the inclination of the line segment L2 is defined as the face inclination. For example, when the inclination of the line segment L2 with respect to the vertical direction of the target image TI is smaller than 45 °, the deformation direction setting unit 220 sets the deformation direction to “horizontal direction”. On the other hand, when the inclination of the line segment L2 with respect to the vertical direction of the target image TI is greater than 45 °, the deformation direction is set to “vertical direction”. When the inclination of the line segment L2 is 45 °, the deformation direction is set to a predetermined standard direction (for example, the horizontal direction).

対象画像に複数の顔が含まれている場合は、変形方向設定部220は、変形方向を、より大きい顔の傾きに応じて設定するとしてもよい。あるいは、対象画像に複数の顔が含まれている場合、対象画像の縦方向または横方向に対する傾きが最も小さい顔の傾きに応じて、変形方向を設定してもよいし、複数の顔の傾きの平均に応じて変形方向を設定してもよい。以下では、変形方向として横方向が設定されたものとして説明を続ける。   When the target image includes a plurality of faces, the deformation direction setting unit 220 may set the deformation direction according to a larger face inclination. Alternatively, when the target image includes a plurality of faces, the deformation direction may be set according to the tilt of the face with the smallest tilt with respect to the vertical or horizontal direction of the target image, or the tilt of the plurality of faces The deformation direction may be set according to the average. Hereinafter, the description will be continued assuming that the horizontal direction is set as the deformation direction.

S500では、顔変形部240が、対象画像内のある一つの顔領域Fdについて、その顔の高さ方向の傾きが後述の顔変形処理の対象となり得る傾きであるか否か判定する。具体的には、S400で設定された変形方向と、顔の高さ方向とがなす角度が基準角度より大きいか否か判定し、基準角度より大きい場合(Yes)にはS600(顔変形処理)に進み、基準角度以下である場合(No)にはS600をスキップしてS700に進む。ここで用いる基準角度としては、例えば45°が該当する。上述したようにS400では、対象画像内の顔の傾きを考慮して基本的にS500で“Yes”と判定されるような変形方向が設定されるものの、ユーザーの設定ミスや、顔が複数ある場合に一部の顔については変形方向に対して顔の高さ方向が寝ている(変形方向と顔の高さ方向との間の角度が45°以内。)事態もあり得る。そのためS500の判定を行う必要がある。   In S500, the face deforming unit 240 determines whether or not the tilt in the height direction of a certain face region Fd in the target image is a tilt that can be a target of the face deforming process described later. Specifically, it is determined whether or not the angle formed by the deformation direction set in S400 and the height direction of the face is larger than the reference angle. If the angle is larger than the reference angle (Yes), S600 (face deformation processing). If the angle is equal to or smaller than the reference angle (No), S600 is skipped and the process proceeds to S700. For example, 45 ° corresponds to the reference angle used here. As described above, in S400, a deformation direction that is basically determined as “Yes” in S500 is set in consideration of the inclination of the face in the target image, but there are a user's setting mistake and a plurality of faces. In some cases, for some faces, the height direction of the face is lying with respect to the deformation direction (the angle between the deformation direction and the height direction of the face is within 45 °). Therefore, it is necessary to perform the determination of S500.

S500の判定を行なうために、画像補正処理部200は、S400でユーザーの入力に応じて変形方向を設定した場合であっても、顔の高さ方向を規定する線分L2の上記器官領域の検出に基づく特定を、顔毎に行なう。
S700では、顔変形部240は、対象画像内で検出された全ての顔領域Fdを一つずつ対象としたS500の判定を終えたか否か判定し、全ての顔領域FdについてS500の判定を終えている場合(Yes)にはS800に進み、終えていない場合(No)にはS500に戻り未判定の顔領域Fdを対象として処理を繰り返す。
In order to perform the determination of S500, the image correction processing unit 200 sets the direction of the organ region of the line segment L2 that defines the height direction of the face even when the deformation direction is set according to the user input in S400. Identification based on detection is performed for each face.
In S700, the face deforming unit 240 determines whether or not the determination in S500 for all the face areas Fd detected in the target image has been completed one by one, and the determination in S500 is completed for all the face areas Fd. If YES in step S800, the process advances to step S800. If not completed (NO), the process returns to step S500 and the process is repeated for the undetermined face area Fd.

なお、図16に示すように、対象画像TI内において検出された複数の顔領域Fdが互いに重なっている場合もある。このように互いに重なっている各顔領域Fdについて顔変形処理の対象とした場合、一方の顔の変形結果が他方の顔に悪影響を与えるなど、かえって画像を破綻させてしまうこともあり得る。そのため本実施形態では、顔変形部240は、対象画像TIから複数の顔領域Fdが検出された場合には、一部分でも他の顔領域Fdと重なっている顔領域Fdについては顔変形処理の処理対象としない。つまりS500では、実質的に、変形方向と顔の高さ方向とがなす角度が基準角度以上かつ他の顔領域Fdと重なっていない顔領域Fdについて、“Yes”と判定する。
S600では、顔変形部240は、対象画像内の各顔画像を対象として、顔変形処理を実行する。
As shown in FIG. 16, a plurality of face regions Fd detected in the target image TI may overlap each other. In this way, when face regions Fd that overlap each other are subjected to face deformation processing, the result of deformation of one face may adversely affect the other face, and the image may be broken. Therefore, in the present embodiment, when a plurality of face areas Fd are detected from the target image TI, the face deforming unit 240 performs face deformation processing on the face area Fd that partially overlaps the other face area Fd. Not targeted. That is, in S500, the face area Fd whose angle between the deformation direction and the face height direction is equal to or larger than the reference angle and does not overlap with the other face area Fd is determined as “Yes”.
In S600, the face deformation unit 240 performs face deformation processing on each face image in the target image.

図6は、S600における顔変形処理の詳細をフローチャートにより示している。
S610では、顔変形部240は、顔領域Fd(直近のS500で判定の対象となった顔領域Fd)を基準にして変形領域を設定する。変形領域とは、対象画像内の顔領域Fdを含む領域であって顔変形処理の対象となる領域を意味する。変形領域は顔画像の全体をカバーする矩形領域であり、変形領域を顔画像として解釈してもよい。また上記では、顔領域Fd同士が重なるものについては、顔変形処理の対象から外すとしたが、変形領域同士が重なる各顔について顔変形処理の対象から外すとしてもよい。
FIG. 6 is a flowchart showing details of the face deformation process in S600.
In S610, the face deforming unit 240 sets a deformed area based on the face area Fd (the face area Fd to be determined in the latest S500). The deformation area means an area that includes the face area Fd in the target image and is a target of face deformation processing. The deformation area is a rectangular area that covers the entire face image, and the deformation area may be interpreted as a face image. In the above description, the face regions Fd that overlap each other are excluded from the target of the face deformation process, but each face that overlaps the deformed regions may be excluded from the target of the face deformation process.

図7は、変形領域の設定方法の一例を示す説明図である。図7において、実線の矩形TAは、顔領域Fdについて設定される変形領域TAを示す。基準線RLは、顔領域Fdの高さ方向(上下方向)を定義すると共に、顔領域Fdの幅方向(左右方向)の中心を示す線である。基準線RLは、矩形の顔領域Fdの重心を通り、顔領域Fdの高さ方向に沿った境界線に平行な直線である。基準線RLは線分L2と略平行な線であるとも言える。よって、上記S500の判定では、変形方向と線分L2との角度を調べる代わりに、変形方向と基準線RLとの角度を調べてもよい。変形領域TAは、顔領域Fdを基準線RLと平行な方向(高さ方向)および基準線RLに直交する方向(幅方向)に伸張した領域として設定される。具体的には、顔領域Fd1の高さ方向の長さをH1、幅方向の大きさをW1とすると、顔領域Fdを、上方向にk1・H1、下方向にk2・H1だけ伸ばすと共に、左右にそれぞれk3・W1だけ伸ばした領域が、変形領域TAとして設定される。k1,k2,k3は、所定の係数である。このように変形領域TAが設定されると、顔領域Fdの高さ方向の輪郭線に平行な直線である基準線RLは、変形領域TAの高さ方向の輪郭線にも平行な直線となる。また、基準線RLは、変形領域TAの幅を半分に分割する直線となる。   FIG. 7 is an explanatory diagram illustrating an example of a method for setting a deformation area. In FIG. 7, a solid-line rectangle TA indicates a deformation area TA set for the face area Fd. The reference line RL is a line that defines the height direction (vertical direction) of the face area Fd and indicates the center in the width direction (horizontal direction) of the face area Fd. The reference line RL is a straight line that passes through the center of gravity of the rectangular face area Fd and is parallel to the boundary line along the height direction of the face area Fd. It can be said that the reference line RL is a line substantially parallel to the line segment L2. Therefore, in the determination of S500, instead of examining the angle between the deformation direction and the line segment L2, the angle between the deformation direction and the reference line RL may be examined. The deformation area TA is set as an area obtained by extending the face area Fd in a direction parallel to the reference line RL (height direction) and a direction orthogonal to the reference line RL (width direction). Specifically, when the length in the height direction of the face region Fd1 is H1 and the size in the width direction is W1, the face region Fd is extended by k1 · H1 upward and k2 · H1 downward, A region extended by k3 · W1 to the left and right is set as the deformation region TA. k1, k2, and k3 are predetermined coefficients. When the deformation area TA is set in this way, the reference line RL, which is a straight line parallel to the contour line in the height direction of the face area Fd, becomes a straight line parallel to the contour line in the height direction of the deformation area TA. . The reference line RL is a straight line that divides the width of the deformation area TA in half.

図7に示すように、変形領域TAは、高さ方向に関しては、概ね顎から頭頂部までの画像を含み、幅方向に関しては、左右の頬の画像を含むような領域として設定される。すなわち本実施形態では、変形領域TAが概ねそのような範囲の画像を含む領域となるように、上述の係数k1,k2,k3を予め実験により求めて設定されている。
S620では、顔変形部240は、S610で設定された変形領域を複数の小領域に分割する。
As shown in FIG. 7, the deformation area TA is set as an area that generally includes an image from the jaw to the top of the head in the height direction and includes images of the left and right cheeks in the width direction. In other words, in the present embodiment, the above-described coefficients k1, k2, and k3 are set in advance through experiments so that the deformation area TA is an area that includes an image in such a range.
In S620, the face deforming unit 240 divides the deformation area set in S610 into a plurality of small areas.

図8は、変形領域の小領域への分割方法の一例を示す説明図である。図8では、変形領域TAを記載している。顔変形部240は、変形領域TAに複数の分割点Dを配置し、分割点Dを結ぶ直線を用いて変形領域TAを複数の小領域に分割する。分割点Dの配置の態様(分割点Dの個数および位置)は、分割点配置パターンテーブル420により定義されている。顔変形部240は、分割点配置パターンテーブル420を参照して分割点Dを配置する。図8の例では、分割点Dは、水平分割線Lhと垂直分割線Lvとの交点と、水平分割線Lhおよび垂直分割線Lvと変形領域TAの外枠との交点とに配置される。水平分割線Lhおよび垂直分割線Lvは、変形領域TA内に分割点Dを配置するための基準となる線である。図8に示すように、本実施形態における分割点Dの配置では、基準線RLと直交する3本の水平分割線Lhと、基準線RLに平行な4本の垂直分割線Lvとが設定される。3本の水平分割線Lhを、変形領域TAの下方から順に、Lh1,Lh2,Lh3と呼ぶ。また、4本の垂直分割線Lvを、変形領域TAの左から順に、Lv1,Lv2,Lv3,Lv4と呼ぶ。   FIG. 8 is an explanatory diagram showing an example of a method of dividing the deformation area into small areas. FIG. 8 shows the deformation area TA. The face deformation unit 240 arranges a plurality of division points D in the deformation area TA and divides the deformation area TA into a plurality of small areas using a straight line connecting the division points D. The arrangement mode of the dividing points D (the number and position of the dividing points D) is defined by the dividing point arrangement pattern table 420. The face deforming unit 240 arranges the dividing points D with reference to the dividing point arrangement pattern table 420. In the example of FIG. 8, the dividing points D are arranged at the intersections of the horizontal dividing line Lh and the vertical dividing line Lv and at the intersections of the horizontal dividing line Lh and the vertical dividing line Lv and the outer frame of the deformation area TA. The horizontal dividing line Lh and the vertical dividing line Lv are reference lines for arranging the dividing point D in the deformation area TA. As shown in FIG. 8, in the arrangement of the dividing points D in the present embodiment, three horizontal dividing lines Lh orthogonal to the reference line RL and four vertical dividing lines Lv parallel to the reference line RL are set. The The three horizontal dividing lines Lh are referred to as Lh1, Lh2, and Lh3 in order from the bottom of the deformation area TA. The four vertical dividing lines Lv are referred to as Lv1, Lv2, Lv3, and Lv4 in order from the left of the deformation area TA.

水平分割線Lh1は、変形領域TAにおいて、顎の画像より下方に配置され、水平分割線Lh2は、目の画像の下付近に配置され、水平分割線Lh3は、目の画像の上付近あるいは額の画像辺りに配置される。垂直分割線Lv1およびLv4は、頬のラインの画像の外側に配置され、垂直分割線Lv2およびLv3は、目尻の画像の外側に配置される。水平分割線Lhおよび垂直分割線Lvの配置は、水平分割線Lhおよび垂直分割線Lvと画像との位置関係が結果的に上述の位置関係となるように予め設定された変形領域TAの大きさとの対応関係に従い実行される。   The horizontal dividing line Lh1 is arranged below the chin image in the deformation area TA, the horizontal dividing line Lh2 is arranged near the bottom of the eye image, and the horizontal dividing line Lh3 is near the top of the eye image or the forehead. Around the image. The vertical division lines Lv1 and Lv4 are arranged outside the cheek line image, and the vertical division lines Lv2 and Lv3 are arranged outside the corner image. The horizontal dividing line Lh and the vertical dividing line Lv are arranged in accordance with the size of the deformation area TA set in advance so that the positional relationship between the horizontal dividing line Lh and the vertical dividing line Lv and the image is the above-described positional relationship. It is executed according to the correspondence relationship.

上述した水平分割線Lhと垂直分割線Lvとの配置に従い、水平分割線Lhと垂直分割線Lvとの交点と、水平分割線Lhおよび垂直分割線Lvと変形領域TAの外枠との交点とに、分割点Dが配置される。図8に示すように、水平分割線Lhi(i=1,2,3のいずれか)上に位置する分割点Dを、左から順に、D0i,D1i,D2i,D3i,D4i,D5iと呼ぶ。例えば、水平分割線Lh1上に位置する分割点Dは、D01,D11,D21,D31,D41,D51と呼ばれる。同様に、垂直分割線Lvj(j=1,2,3,4のいずれか)上に位置する分割点Dを、下から順に、Dj0,Dj1,Dj2,Dj3と呼ぶ。例えば、垂直分割線Lv1上に位置する分割点Dは、D10,D11,D12,D13と呼ばれる。本実施形態における分割点Dの配置は、基準線RLに対して対称の配置となっている。顔変形部240は、配置された分割点Dを結ぶ直線(水平分割線Lhおよび垂直分割線Lv)によって変形領域TAを複数の小領域に分割する。図8の例では、変形領域TAは、20個の矩形の小領域に分割されている。   According to the arrangement of the horizontal dividing line Lh and the vertical dividing line Lv described above, the intersection of the horizontal dividing line Lh and the vertical dividing line Lv, and the intersection of the horizontal dividing line Lh and the vertical dividing line Lv and the outer frame of the deformation area TA In addition, the dividing point D is arranged. As shown in FIG. 8, the division points D located on the horizontal division line Lhi (i = 1, 2, 3) are called D0i, D1i, D2i, D3i, D4i, D5i in order from the left. For example, the dividing points D located on the horizontal dividing line Lh1 are called D01, D11, D21, D31, D41, D51. Similarly, the dividing points D located on the vertical dividing line Lvj (j = 1, 2, 3, 4) are called Dj0, Dj1, Dj2, Dj3 in order from the bottom. For example, the division points D located on the vertical division line Lv1 are called D10, D11, D12, and D13. The arrangement of the dividing points D in the present embodiment is symmetrical with respect to the reference line RL. The face deformation unit 240 divides the deformation area TA into a plurality of small areas by a straight line (horizontal division line Lh and vertical division line Lv) connecting the arranged division points D. In the example of FIG. 8, the deformation area TA is divided into 20 rectangular small areas.

S630では、顔変形部240は、所定の分割点Dについての移動量を、一方向変形処理に用いる圧縮率あるいは拡大率に応じて決定する。ここで、後述の一方向変形処理(S800)では、対象画像内に圧縮領域および拡大領域を設定した状況下、圧縮領域については所定の圧縮率で圧縮し、拡大領域については所定の拡大率で拡大する。圧縮領域および拡大領域の設定は、一方向変形部230が行なう。具体的には、一方向変形部230は、対象画像を変形方向に垂直な分割線(水平分割線Lhおよび垂直分割線Lvとは異なる分割線)によって分割することにより、略中央位置の圧縮領域と、圧縮領域の左右に位置する拡大領域とに分けて設定する。   In S630, the face deformation unit 240 determines the movement amount for the predetermined division point D according to the compression rate or the enlargement rate used for the one-way deformation process. Here, in the unidirectional deformation process (S800) described below, the compression area is compressed at a predetermined compression rate and the expansion area is compressed at a predetermined expansion rate under the condition that the compression area and the expansion area are set in the target image. Expanding. The unidirectional deformation unit 230 sets the compression area and the enlargement area. Specifically, the unidirectional deformation unit 230 divides the target image by a dividing line perpendicular to the deformation direction (a dividing line different from the horizontal dividing line Lh and the vertical dividing line Lv), so that a compression region at a substantially central position. And an enlarged region positioned on the left and right of the compression region.

一方向変形部230による、当該変形方向に垂直な分割線による圧縮領域と拡大領域への分け方は様々であり、例えば、予め固定値として内部メモリー120等に設定されている圧縮領域と拡大領域との面積比によって分けてもよいし、操作部140および表示部150を介してユーザーが対象画像上に指定した分割線の位置によって分けてもよいし、あるいは、対象画像のより中央に位置する変形領域の全体を含む領域を圧縮領域として設定するとともに当該設定した圧縮領域の左右の領域を拡大領域として設定してもよい。以下では、単に「圧縮領域」と言った場合には一方向変形処理の為に対象領域内に設定された圧縮領域を意味し、単に「拡大領域」と言った場合には一方向変形処理の為に対象領域内に設定された拡大領域を意味する。   There are various ways of dividing the compression area and the expansion area by the dividing line perpendicular to the deformation direction by the unidirectional deformation unit 230. For example, the compression area and the expansion area set in the internal memory 120 as a fixed value in advance. May be divided according to the area ratio, or may be divided according to the position of the dividing line designated on the target image by the user via the operation unit 140 and the display unit 150, or may be positioned at the center of the target image. An area including the entire deformation area may be set as a compression area, and areas on the left and right of the set compression area may be set as an enlargement area. In the following, simply referring to “compressed area” means a compressed area set in the target area for unidirectional deformation processing, and simply saying “enlarged area” means unidirectional deformation processing. Therefore, it means an enlarged area set in the target area.

本実施形態では、一方向変形部230は、上記のような対象画像内における圧縮領域および拡大領域の設定を、少なくとも顔変形部240がS630の処理を開始する前に行なっておく。そして、S630では、顔変形部240は、対象画像内が圧縮領域と拡大領域とに分けられていることを前提として、S610で設定された変形領域が圧縮領域と拡大領域とのいずれに含まれているか判断し、圧縮領域に含まれている場合には当該圧縮領域に一方向変形処理で用いられる圧縮率に応じて上記移動量を決定し、拡大領域に含まれている場合には当該拡大領域に一方向変形処理で用いられる拡大率に応じて上記移動量を決定する。以下、単に「圧縮率」と表現した場合には、一方向変形処理の際に圧縮領域に適用される圧縮率を意味し、単に「拡大率」と表現した場合には、一方向変形処理の際に拡大領域に適用される拡大率を意味する。   In the present embodiment, the unidirectional deformation unit 230 performs the setting of the compression region and the enlargement region in the target image as described above at least before the face deformation unit 240 starts the process of S630. In S630, the face deforming unit 240 assumes that the target image is divided into a compressed area and an enlarged area, and the deformed area set in S610 is included in either the compressed area or the enlarged area. If it is included in the compression area, the amount of movement is determined in accordance with the compression rate used in the one-way deformation process in the compression area. The amount of movement is determined according to the enlargement factor used in the one-way deformation process for the region. Hereinafter, when simply expressed as “compression rate”, it means the compression rate applied to the compression area during the one-way deformation process, and when simply expressed as “enlargement rate”, the one-way deformation process. It means the enlargement rate applied to the enlargement area.

圧縮率および拡大率は、予め固定値として内部メモリー120等に記憶されていてもよいし、操作部140等を介してユーザーによって入力された数値であってもよい。或いは、プリンター100は、一方向変形処理後の対象画像のサイズが変わり過ぎることを防止するために、UIを介して圧縮率と拡大率のいずれか一方のみをユーザーに入力させ、入力された圧縮率または拡大率の一方の値に応じて、入力されていない圧縮率または拡大率の値を決定するとしてもよい。   The compression rate and the enlargement rate may be stored in advance as fixed values in the internal memory 120 or the like, or numerical values input by the user via the operation unit 140 or the like. Alternatively, the printer 100 allows the user to input only one of the compression rate and the enlargement rate via the UI in order to prevent the size of the target image after the unidirectional deformation process from changing too much, and the input compression Depending on one value of the rate or the enlargement rate, a value of the compression rate or enlargement rate that is not input may be determined.

顔変形部240は、上述したように予め内部メモリー120に記憶されていた圧縮率および拡大率または、ユーザーによって入力された(あるいはユーザーの入力に従って決定された)圧縮率および拡大率を取得することができる。
ここではまず、顔変形部240が、変形領域は圧縮領域に含まれていると判断し、圧縮領域に適用される圧縮率として「30%」という値を取得した場合について説明する。30%の圧縮率とは、言い換えれば、一方向変形処理前の圧縮領域の変形方向における長さを一方向変形処理後に0.7倍の長さにするための倍率である。
The face deforming unit 240 acquires the compression rate and enlargement rate stored in the internal memory 120 in advance as described above, or the compression rate and enlargement rate input by the user (or determined according to the user input). Can do.
Here, first, a case will be described in which the face deforming unit 240 determines that the deformation area is included in the compression area and acquires a value of “30%” as the compression rate applied to the compression area. In other words, the compression rate of 30% is a magnification for making the length in the deformation direction of the compression region before the unidirectional deformation process 0.7 times longer after the unidirectional deformation process.

顔変形部240は、変形領域が圧縮領域に含まれていると判断した場合、その変形領域にかかる顔画像の少なくとも一部が変形方向に拡大されるように、所定の分割点Dについて基準線RLから離れる向きへの移動量を圧縮率に応じて設定する。本実施形態では、顔変形部240は、各分割点Dのうち変形領域TAの枠よりも内側に存在する分割点D11,D12,D13,D21,D22,D23,D31,D32,D33,D41,D42,D43についての移動量を決定する。図8に示したように、基準線RLと直交する方向をH方向と呼び、基準線RLと平行な方向をV方向と呼ぶ。また、H方向については、向かって右側への移動量を正値(プラス)として表し、向かって左側への移動量を負値(マイナス)として表し、V方向については、上方への移動量を正値(プラス)として表し、下方への移動量を負値(マイナス)として表す。   When the face deformation unit 240 determines that the deformation area is included in the compression area, the reference line for the predetermined division point D is enlarged so that at least a part of the face image applied to the deformation area is enlarged in the deformation direction. The amount of movement in the direction away from the RL is set according to the compression rate. In the present embodiment, the face deforming unit 240 has divided points D11, D12, D13, D21, D22, D23, D31, D32, D33, D41, which are present inside the frame of the deformed area TA among the divided points D. The amount of movement for D42 and D43 is determined. As shown in FIG. 8, the direction orthogonal to the reference line RL is called the H direction, and the direction parallel to the reference line RL is called the V direction. For the H direction, the rightward movement amount is represented as a positive value (plus), the leftward movement amount is represented as a negative value (minus), and for the V direction, the upward movement amount is represented. Expressed as a positive value (plus), and the amount of downward movement as a negative value (minus).

ここでは、変形方向とH方向とがなす角度は変形方向とV方向とがなす角度よりも小さいと言える。従って、所定の分割点Dについて、基準線RLから離れる向きへの移動量を圧縮率に基づいて設定し、設定した移動量に従って分割点Dを移動させれば、顔画像の一部は少なくとも変形方向にも拡大される。一例として、顔変形部240は、H方向における移動量として、基準線RLよりも左側の分割点D11,D21,D12,D22,D13,D23についてはマイナス側(左側)への移動量を設定し、基準線RLよりも右側の分割点D31,D41,D32,D42,D33,D43についてはプラス側(右側)への移動量を設定する。   Here, it can be said that the angle formed by the deformation direction and the H direction is smaller than the angle formed by the deformation direction and the V direction. Therefore, if a moving amount in a direction away from the reference line RL is set for a predetermined dividing point D based on the compression rate, and the dividing point D is moved according to the set moving amount, at least a part of the face image is deformed. It is also expanded in the direction. As an example, the face deformation unit 240 sets the movement amount to the minus side (left side) for the division points D11, D21, D12, D22, D13, and D23 on the left side of the reference line RL as the movement amount in the H direction. For the division points D31, D41, D32, D42, D33, and D43 on the right side of the reference line RL, the amount of movement to the plus side (right side) is set.

また顔変形部240は、V方向における移動量として、水平分割線Lh1上の分割点D11,D21,D31,D41についてはプラス側(上側)への移動量を設定し、水平分割線Lh3上の分割点D13,D23,D33,D43についてはマイナス側(下側)への移動量を設定する。このように水平分割線Lh1上の所定の分割点Dおよび水平分割線Lh3上の所定の分割点Dについて移動量を設定し、設定した移動量に従って分割点Dを移動させれば、顔画像の一部は少なくとも変形方向と直交する方向にも圧縮される。   Further, the face deformation unit 240 sets the movement amount to the plus side (upper side) for the dividing points D11, D21, D31, and D41 on the horizontal dividing line Lh1 as the moving amount in the V direction, and on the horizontal dividing line Lh3. For the division points D13, D23, D33, and D43, a moving amount to the minus side (downside) is set. In this way, if the movement amount is set for the predetermined division point D on the horizontal division line Lh1 and the predetermined division point D on the horizontal division line Lh3, and the division point D is moved according to the set movement amount, A part is also compressed at least in the direction perpendicular to the deformation direction.

より具体的には、顔変形部240は、各分割点Dの移動量を設定する際、圧縮率が示す数値(30%)を、まず変形領域内の画像のH方向における変形量(拡大量)とV方向における変形量(圧縮量)とに所定割合で配分する。一例として、顔変形部240は、圧縮率が示す数値(30%)のうち7割(21%)をH方向における変形量(拡大量)に割り当て、圧縮率が示す数値(30%)から上記H方向における変形量(拡大量)を差し引いた残り(9%)を、V方向における変形量(圧縮量)に割り当てる。   More specifically, when the face deformation unit 240 sets the movement amount of each division point D, the face deformation unit 240 first calculates the numerical value (30%) indicated by the compression rate in the deformation amount (enlargement amount) of the image in the deformation region in the H direction. ) And the amount of deformation (compression amount) in the V direction. As an example, the face deformation unit 240 assigns 70% (21%) of the numerical value (30%) indicated by the compression rate to the deformation amount (enlargement amount) in the H direction, and the above value is obtained from the numerical value (30%) indicated by the compression rate. The remainder (9%) obtained by subtracting the deformation amount (enlargement amount) in the H direction is assigned to the deformation amount (compression amount) in the V direction.

顔変形部240は、H方向とV方向とに割り当てた変形量をさらに、各分割点Dへ移動量として配分する。一例として、顔変形部240は、H方向に割り当てた変形量(21%)の5割に当る数値(10.5%)を、各分割点D11,D12,D13,D21,D22,D23,D31,D32,D33,D41,D42,D43のH方向における移動量(基準線RLから離れる向きへの移動量)として設定し、V方向に割り当てた変形量(9%)の3割に当る数値(2.7%)を、水平分割線Lh1上の各分割点D11,D21,D31,D41のV方向プラス側への移動量として設定し、V方向に割り当てた変形量(9%)の7割に当る数値(6.3%)を、水平分割線Lh3上の各分割点D13,D23,D33,D43のV方向マイナス側への移動量として設定する。この結果、例えば、分割点D11については、H方向マイナス側への移動量として10.5%という数値が設定され、V方向プラス側への移動量として2.7%という数値が設定される。また、分割点D43については、H方向プラス側への移動量として10.5%という数値が設定され、V方向マイナス側への移動量として6.3%という数値が設定される。このように設定された分割点DのH方向、V方向への移動量は、変形領域TAのH方向、V方向の長さ(画素数)に対する割合を意味する。   The face deformation unit 240 further distributes the deformation amount assigned to the H direction and the V direction as a movement amount to each division point D. As an example, the face deforming unit 240 calculates a numerical value (10.5%) corresponding to 50% of the deformation amount (21%) assigned in the H direction to each dividing point D11, D12, D13, D21, D22, D23, D31. , D32, D33, D41, D42, D43 are set as movement amounts in the H direction (movement amounts away from the reference line RL), and are numerical values corresponding to 30% of the deformation amount (9%) assigned in the V direction ( 2.7%) is set as the movement amount of each dividing point D11, D21, D31, D41 on the horizontal dividing line Lh1 to the plus side in the V direction, and 70% of the deformation amount (9%) assigned in the V direction. Is set as the amount of movement of each division point D13, D23, D33, D43 on the horizontal division line Lh3 toward the minus side in the V direction. As a result, for the division point D11, for example, a numerical value of 10.5% is set as the moving amount in the H direction minus side, and a numerical value of 2.7% is set as the moving amount in the V direction plus side. For the division point D43, a numerical value of 10.5% is set as the movement amount in the H direction plus side, and a numerical value of 6.3% is set as the movement amount in the V direction minus side. The amount of movement of the dividing point D set in this way in the H direction and V direction means a ratio to the length (number of pixels) of the deformation area TA in the H direction and V direction.

上述したような、圧縮率が示す数値をH方向とV方向との変形量に配分する際の割合(配分比率)や、H方向の変形量やV方向の変形量を各分割点Dに配分する際の割合は、限られるものではない。また、顔変形部240は、分割点DのH方向、V方向の移動量について、分割点D毎に更なる変更を加えても良い。ただし、原則的には、各分割点Dの移動態様は、基準線RLを挟んで左右対称になるようにし、また、このように変形領域が圧縮領域に含まれている場合の顔変形処理においては、水平分割線Lh1上の各分割点D11,D21,D31,D41をV方向プラス側へ移動させる量よりも、水平分割線Lh3上の各分割点D13,D23,D33,D43をV方向マイナス側へ移動させる量を多くする。これは、水平分割線Lh1上の各分割点D11,D21,D31,D41をV方向プラス側へ大きく移動させることによって変形後の首の画像が長くなってしまうことを、防ぐためである。   As described above, the ratio (distribution ratio) when the numerical value indicated by the compression ratio is distributed to the deformation amount in the H direction and the V direction, the deformation amount in the H direction, and the deformation amount in the V direction are distributed to each division point D. The ratio when doing this is not limited. Further, the face deforming unit 240 may add further changes for each division point D with respect to the movement amount of the division point D in the H direction and the V direction. However, in principle, the movement mode of each division point D is made to be bilaterally symmetric with respect to the reference line RL, and in the face deformation process when the deformation area is included in the compression area in this way. Means that the dividing points D13, D23, D33, D43 on the horizontal dividing line Lh3 are minus in the V direction rather than the amount by which the dividing points D11, D21, D31, D41 on the horizontal dividing line Lh1 are moved to the plus side in the V direction. Increase the amount moved to the side. This is to prevent the deformed neck image from becoming long by largely moving the dividing points D11, D21, D31, D41 on the horizontal dividing line Lh1 to the plus side in the V direction.

図9は、顔変形部240が、上記のように圧縮率が示す数値をH方向とV方向との変形量に配分し、さらにH方向およびV方向の変形量を各分割点Dに配分して決定した移動量の一例を表によって示している。ただし図9では、上記のように圧縮率に応じて決定した各分割点Dの移動量を、さらに分割点Dの位置に応じて変更した後の移動量を示している。また図9では、各分割点Dの移動量を上記のようなn%といった表現ではなく、画素ピッチに換算した値によって示している。例えば、分割点D13については、H方向に沿って左側に画素ピッチの19倍の距離の移動量が設定され、V方向に沿って下方に画素ピッチの7倍の距離の移動量が設定されている。さらに、図9の例では、水平分割線Lh1上の分割点D11,D21,D31,D41および水平分割線Lh3上の分割点D13,D23,D33,D43に対してだけではなく、水平分割線Lh2上の分割点D12,D22,D32,D42に対しても、V方向における移動量を設定した例を示している。
S640では、顔変形部240は、S630で決定した分割点D毎の移動量に従い各分割点Dを移動して変形領域TA内で小領域を変形することによって、変形領域TA内の画像を変形させる。
In FIG. 9, the face deforming unit 240 distributes the numerical value indicated by the compression ratio to the deformation amounts in the H direction and the V direction as described above, and further distributes the deformation amounts in the H direction and the V direction to each division point D. An example of the movement amount determined in this way is shown in the table. However, FIG. 9 shows the movement amount after the movement amount of each division point D determined according to the compression ratio as described above is further changed according to the position of the division point D. In FIG. 9, the movement amount of each division point D is not represented by n% as described above, but by a value converted to a pixel pitch. For example, for the dividing point D13, a movement amount of 19 times the pixel pitch is set on the left side along the H direction, and a movement amount of a distance of 7 times the pixel pitch is set downward along the V direction. Yes. Furthermore, in the example of FIG. 9, not only the dividing points D11, D21, D31, D41 on the horizontal dividing line Lh1 and the dividing points D13, D23, D33, D43 on the horizontal dividing line Lh3, but also the horizontal dividing line Lh2 An example in which the movement amount in the V direction is also set for the upper division points D12, D22, D32, and D42 is shown.
In S640, the face deformation unit 240 deforms the image in the deformation area TA by moving each division point D according to the movement amount for each division point D determined in S630 and deforming the small area in the deformation area TA. Let

図10は、図9に例示した分割点D毎の移動量に従って、各分割点Dの位置を移動させて変形領域TA内の画像を変形する際の具体的態様を示している。顔変形部240は、変形領域TAを構成する各小領域について、分割点Dの位置移動前の状態における小領域の画像が分割点Dの位置移動により新たに定義された小領域の画像となるように、画像の変形処理を行う。図10では比較の便宜のため、変形前の人物P1の顔の輪郭を鎖線で示し、変形後の人物P1の顔の輪郭を実線で示している。また図10では、移動後の分割点Dの符号には「’」を付し、移動前の分割点D(白丸)の符号には括弧を付している。例えば、分割点D11,D21,D22,D12を頂点とする小領域(ハッチングを付して示す小領域)の画像は、分割点D’11,D’21,D’22,D’12を頂点とする小領域の画像に変形される。この小領域画像の変形処理の詳細については後述する。   FIG. 10 shows a specific mode when the image in the deformation area TA is deformed by moving the position of each division point D according to the movement amount for each division point D illustrated in FIG. For each small area constituting the deformation area TA, the face deforming unit 240 changes the image of the small area in the state before the position of the dividing point D is moved to an image of a newly defined small area by the position movement of the dividing point D. As described above, an image deformation process is performed. In FIG. 10, for the convenience of comparison, the contour of the face of the person P1 before deformation is indicated by a chain line, and the outline of the face of the person P1 after deformation is indicated by a solid line. In FIG. 10, “′” is attached to the code of the dividing point D after the movement, and parentheses are attached to the code of the dividing point D (white circle) before the movement. For example, an image of a small region (small region indicated by hatching) having vertices at the division points D11, D21, D22, and D12 is a vertex at the division points D′ 11, D′ 21, D′ 22, and D′ 12. Is transformed into an image of a small area. Details of the deformation process of the small area image will be described later.

図10に示すように、S640における分割点Dの移動の結果、基準線RLと平行な方向(V方向)に関し、水平分割線Lh1上に配置された分割点D11,D21,D31,D41の位置は上方に移動される一方、水平分割線Lh2,Lh3上に配置された分割点D12,D22,D32,D42,D13,D23,D33,D43の位置は下方に移動される。従って、水平分割線Lh1と水平分割線Lh3との間に位置する画像はV方向に関して圧縮され、その中でも特に水平分割線Lh1と水平分割線Lh2との間に位置する画像はV方向に関して強く圧縮される。   As shown in FIG. 10, as a result of the movement of the dividing point D in S640, the positions of the dividing points D11, D21, D31, D41 arranged on the horizontal dividing line Lh1 with respect to the direction (V direction) parallel to the reference line RL. Is moved upward, while the positions of the dividing points D12, D22, D32, D42, D13, D23, D33, D43 arranged on the horizontal dividing lines Lh2, Lh3 are moved downward. Therefore, an image located between the horizontal dividing line Lh1 and the horizontal dividing line Lh3 is compressed in the V direction, and among them, an image located between the horizontal dividing line Lh1 and the horizontal dividing line Lh2 is strongly compressed in the V direction. Is done.

基準線RLと直交する方向(H方向)に関しては、垂直分割線Lv1上に配置された分割点D11,D12,D13の位置は左方向に移動され、垂直分割線Lv4上に配置された分割点D41,D42,D43の位置は右方向に移動される。垂直分割線Lv2上に配置された分割点D21,D22,D23の位置は左方向に移動され、垂直分割線Lv3上に配置された分割点D31,D32,D33の位置は右方向に移動される。従って、垂直分割線Lv1より左側に位置する画像は、H方向に関して左側に圧縮され、垂直分割線Lv4より右側に位置する画像は、右側に圧縮される。また、垂直分割線Lv1と垂直分割線Lv2との間に位置する画像は、H方向に関して左側に移動しつつ拡大され、垂直分割線Lv3と垂直分割線Lv4との間に位置する画像は、H方向に関して右側に移動しつつ拡大される。さらに、垂直分割線Lv2と垂直分割線Lv3との間に位置する画像は、基準線RLを中心にH方向に関して拡大される。   With respect to the direction (H direction) orthogonal to the reference line RL, the positions of the dividing points D11, D12, D13 arranged on the vertical dividing line Lv1 are moved to the left, and the dividing points arranged on the vertical dividing line Lv4 The positions of D41, D42, and D43 are moved rightward. The positions of the dividing points D21, D22, D23 arranged on the vertical dividing line Lv2 are moved in the left direction, and the positions of the dividing points D31, D32, D33 arranged on the vertical dividing line Lv3 are moved in the right direction. . Accordingly, an image located on the left side of the vertical dividing line Lv1 is compressed to the left side in the H direction, and an image located on the right side of the vertical dividing line Lv4 is compressed to the right side. An image located between the vertical division line Lv1 and the vertical division line Lv2 is enlarged while moving to the left in the H direction, and an image located between the vertical division line Lv3 and the vertical division line Lv4 is H Enlarged while moving to the right with respect to direction. Further, the image located between the vertical dividing line Lv2 and the vertical dividing line Lv3 is enlarged with respect to the H direction around the reference line RL.

上述したように、水平分割線Lh1は顎の画像より下方に配置され、水平分割線Lh3は頭頂部の画像より上に配置され、垂直分割線Lv1およびLv4は、頬のラインの画像の外側に配置され、垂直分割線Lv2およびLv3は、目尻の画像の外側に配置される。そのため、このように変形領域が圧縮領域に含まれている場合の顔変形処理では、顔画像の内、顎から頭頂部にかけての部分の画像がV方向に縮小されるとともに、左右の頬と頬の間の顔画像が全体的にH方向に拡大される。以上のH方向およびV方向の変形態様を総合すると、かかる顔変形処理によって、変形領域TAに含まれる人物P1の顔の形状は、上下方向においてある程度押しつぶされ、幅方向に太った形状に変形される。   As described above, the horizontal dividing line Lh1 is arranged below the chin image, the horizontal dividing line Lh3 is arranged above the top image, and the vertical dividing lines Lv1 and Lv4 are outside the cheek line image. The vertical dividing lines Lv2 and Lv3 are arranged outside the image of the corner of the eye. Therefore, in the face deformation process when the deformation area is included in the compression area in this way, the image of the face image from the chin to the top of the head is reduced in the V direction, and the left and right cheeks and cheeks are also reduced. Is enlarged in the H direction as a whole. By combining the deformation modes in the H direction and the V direction, the face shape of the person P1 included in the deformation area TA is crushed to some extent in the vertical direction and deformed into a thick shape in the width direction by the face deformation process. .

なお顔変形部240は、S630において、圧縮率が示す数値を最終的に各分割点Dに配分して決定した各移動量に対して、さらに所定の補正係数を乗算し、当該補正係数を乗算して得られた各値を、各分割点Dの移動量としてもよい。ここで言う補正係数とは、例えば0以上1未満の数値であって、顔変形処理による顔の幅方向(H方向)における拡大の度合いおよび顔の高さ方向(V方向)における圧縮の度合いを抑制するための数値である。補正係数の具体値は、予め内部メモリー120に記憶されていてもよいし、ユーザーの入力に設定されてもよい。このような補正係数による変形度合いの抑制は、例えば、上記のように圧縮率に基づいて各分割点Dに配分した移動量を各分割点Dに適用して変形処理を施したときに、変形量が大きすぎて画像に破綻を生じさせる恐れがある場合等に行なう。   In step S630, the face deforming unit 240 further multiplies each movement amount determined by finally allocating the numerical value indicated by the compression ratio to each division point D by a predetermined correction coefficient, and multiplies the correction coefficient. Each value obtained in this way may be the amount of movement of each division point D. The correction coefficient here is a numerical value of 0 or more and less than 1, for example, and indicates the degree of enlargement in the face width direction (H direction) and the degree of compression in the face height direction (V direction) by face deformation processing. It is a numerical value for suppressing. The specific value of the correction coefficient may be stored in advance in the internal memory 120 or may be set as a user input. The suppression of the degree of deformation by such a correction coefficient is performed when, for example, the amount of movement allocated to each division point D based on the compression ratio is applied to each division point D and the deformation process is performed. This is performed when the amount is too large and the image may be broken.

図11は、S640において実行される小領域画像の変形処理を概念的に示す説明図である。図11では、分割点Dを黒丸で示している。また、説明を簡略化するために、4つの小領域について、左側に分割点Dの位置移動前の状態を、右側に分割点Dの位置移動後の状態を、それぞれ示している。図11の例では、中央の分割点Daが分割点Da’の位置に移動され、その他の分割点Dの位置は移動されない。これにより、例えば、分割点Dの移動前の分割点Da,Db,Dc,Ddを頂点とする矩形の小領域(以下「変形前注目小領域BSA」とも呼ぶ)の画像は、分割点Da’,Db,Dc,Ddを頂点とする矩形の小領域(以下「変形後注目小領域ASA」とも呼ぶ)の画像に変形される。   FIG. 11 is an explanatory diagram conceptually showing the small area image deformation process executed in S640. In FIG. 11, the dividing point D is indicated by a black circle. In order to simplify the description, for the four small regions, the state before the position movement of the dividing point D is shown on the left side, and the state after the position movement of the dividing point D is shown on the right side. In the example of FIG. 11, the central division point Da is moved to the position of the division point Da ′, and the positions of the other division points D are not moved. Thereby, for example, an image of a rectangular small area (hereinafter also referred to as “pre-deformation noticeable small area BSA”) having the vertices at the division points Da, Db, Dc, Dd before the movement of the division point D is obtained from the division point Da ′. , Db, Dc, and Dd are transformed into an image of a rectangular small area (hereinafter also referred to as “the noticed small area ASA after deformation”).

本実施形態では、矩形の小領域を小領域の重心CGを用いて4つの三角形領域に分割し、三角形領域単位で画像の変形処理を行っている。図11の例では、変形前注目小領域BSAが、変形前注目小領域BSAの重心CGを頂点の1つとする4つの三角形領域に分割される。同様に、変形後注目小領域ASAが、変形後注目小領域ASAの重心CG’を頂点の1つとする4つの三角形領域に分割される。そして、分割点Daの移動前後のそれぞれの状態において対応する三角形領域毎に、画像の変形処理が行われる。例えば、変形前注目小領域BSA中の分割点Da,Ddおよび重心CGを頂点とする三角形領域の画像が、変形後注目小領域ASA中の分割点Da’,Ddおよび重心CG’を頂点とする三角形領域の画像に変形される。   In the present embodiment, a rectangular small region is divided into four triangular regions using the center of gravity CG of the small region, and image deformation processing is performed in units of triangular regions. In the example of FIG. 11, the pre-deformation attention small area BSA is divided into four triangular areas having the centroid CG of the pre-deformation attention small area BSA as one vertex. Similarly, the post-deformation attention small area ASA is divided into four triangular areas having the centroid CG ′ of the post-deformation attention small area ASA as one vertex. Then, image deformation processing is performed for each corresponding triangular area in each state before and after the movement of the dividing point Da. For example, an image of a triangular area having vertices at the division points Da and Dd and the center of gravity CG in the attention small area BSA before deformation has a vertex at the division points Da ′ and Dd and the center of gravity CG ′ in the attention small area ASA after deformation. It is transformed into an image of a triangular area.

図12は、三角形領域における画像の変形処理方法の概念を示す説明図である。図12の例では、点s,t,uを頂点とする三角形領域stuの画像が、点s’,t’,u’を頂点とする三角形領域s’t’u’の画像に変形される。画像の変形は、変形後の三角形領域s’t’u’の画像中のある画素の位置が、変形前の三角形領域stuの画像中のどの位置に相当するかを算出し、算出された位置における変形前の画像における画素値を変形後の画像の画素値とすることにより行う。   FIG. 12 is an explanatory diagram showing the concept of an image deformation processing method in a triangular area. In the example of FIG. 12, the image of the triangular area stu with the points s, t, u as vertices is transformed into the image of the triangular area s′t′u ′ with the points s ′, t ′, u ′ as vertices. . For the deformation of the image, the position of a certain pixel in the image of the triangular area s't'u 'after the deformation corresponds to the position in the image of the triangular area stu before the deformation, and the calculated position This is performed by using the pixel value in the image before deformation in step S4 as the pixel value of the image after deformation.

例えば、図12において、変形後の三角形領域s’t’u’の画像中の注目画素p’の位置は、変形前の三角形領域stuの画像中の位置pに相当するものとする。位置pの算出は、以下のように行う。まず、注目画素p’の位置を、下記の式(1)のようにベクトルs’t’とベクトルs’u’との和で表現するための係数m1およびm2を算出する。   For example, in FIG. 12, the position of the pixel of interest p ′ in the image of the deformed triangular area s′t′u ′ corresponds to the position p in the image of the triangular area stu before deformation. The position p is calculated as follows. First, coefficients m1 and m2 for expressing the position of the target pixel p ′ by the sum of the vector s′t ′ and the vector s′u ′ as shown in the following equation (1) are calculated.

Figure 2010170219
Figure 2010170219


次に、算出された係数m1およびm2を用いて、下記の式(2)により、変形前の三角形領域stuにおけるベクトルstとベクトルsuとの和を算出することにより、位置pが求まる。   Next, by using the calculated coefficients m1 and m2, the position p is obtained by calculating the sum of the vector st and the vector su in the triangular area stu before deformation by the following equation (2).

Figure 2010170219
Figure 2010170219


変形前の三角形領域stuにおける位置pが、変形前の画像の画素中心位置に一致した場合には、当該画素の画素値が変形後の画像の画素値とされる。一方、変形前の三角形領域stuにおける位置pが、変形前の画像の画素中心位置からはずれた位置となった場合には、位置pの周囲の画素の画素値を用いたバイキュービック等の補間演算により、位置pにおける画素値を算出し、算出された画素値が変形後の画像の画素値とされる。   When the position p in the triangular area stu before deformation coincides with the pixel center position of the image before deformation, the pixel value of the pixel is set as the pixel value of the image after deformation. On the other hand, when the position p in the triangular area stu before deformation is shifted from the pixel center position of the image before deformation, an interpolation operation such as bicubic using the pixel values of the pixels around the position p. Thus, the pixel value at the position p is calculated, and the calculated pixel value is set as the pixel value of the image after deformation.

変形後の三角形領域s’t’u’の画像中の各画素について上述のように画素値を算出することにより、三角形領域stuの画像から三角形領域s’t’u’の画像への画像変形処理を行うことができる。このようにして、顔変形部240は、変形領域TAを構成する各小領域について、上述したように三角形領域を定義して変形処理を行う。   Image deformation from the image of the triangular area stu to the image of the triangular area s't'u 'by calculating the pixel value for each pixel in the image of the triangular area s't'u' after the deformation as described above Processing can be performed. In this way, the face deformation unit 240 performs a deformation process by defining a triangular area as described above for each small area constituting the deformation area TA.

次に、顔変形部240が、変形領域は拡大領域に含まれていると判断し、拡大領域に適用される拡大率を取得した場合について説明する。顔変形部240は、変形領域が拡大領域に含まれていると判断した場合には、変形領域にかかる顔画像の少なくとも一部が変形方向に圧縮されるように、所定の分割点Dについて基準線RLへ近づく向きへの移動量を拡大率に応じて設定する。この場合、変形領域が圧縮領域に含まれていたときと同様に、顔変形部240は、各分割点Dのうち変形領域TAの枠よりも内側に存在する分割点D11,D12,D13,D21,D22,D23,D31,D32,D33,D41,D42,D43についての移動量を決定する。これら所定の分割点Dについて、基準線RLに近づく向きへの移動量を拡大率に基づいて設定し、設定した移動量に従って分割点Dを移動させれば、顔画像の一部は少なくとも変形方向にも圧縮される。   Next, a case will be described in which the face deforming unit 240 determines that the deformation area is included in the enlargement area and acquires an enlargement ratio applied to the enlargement area. When the face deforming unit 240 determines that the deformed area is included in the enlarged area, the face deforming unit 240 uses the reference for the predetermined division point D so that at least a part of the face image in the deformed area is compressed in the deforming direction. The amount of movement in the direction approaching the line RL is set according to the enlargement ratio. In this case, as in the case where the deformation area is included in the compression area, the face deformation unit 240 has the division points D11, D12, D13, D21 existing inside the frame of the deformation area TA among the division points D. , D22, D23, D31, D32, D33, D41, D42, and D43 are determined. With respect to these predetermined division points D, a movement amount in a direction approaching the reference line RL is set based on the enlargement ratio, and if the division point D is moved according to the set movement amount, at least a part of the face image is deformed. Also compressed.

また顔変形部240は、変形領域が拡大領域に含まれていると判断した場合、V方向における移動量として、水平分割線Lh1上の分割点D11,D21,D31,D41についてはマイナス側(下側)への移動量を設定し、水平分割線Lh3上の分割点D13,D23,D33,D43についてはプラス側(上側)への移動量を設定してもよい。このように水平分割線Lh1上の所定の分割点Dおよび水平分割線Lh3上の所定の分割点Dについて移動量を設定し、設定した移動量に従って分割点Dを移動させれば、顔画像の一部は少なくとも変形方向と直交する方向にも拡大される。   Further, when the face deforming unit 240 determines that the deformed area is included in the enlarged area, as the amount of movement in the V direction, the dividing points D11, D21, D31, and D41 on the horizontal dividing line Lh1 are on the minus side (lower A movement amount to the positive side (upper side) may be set for the dividing points D13, D23, D33, and D43 on the horizontal dividing line Lh3. In this way, if the movement amount is set for the predetermined division point D on the horizontal division line Lh1 and the predetermined division point D on the horizontal division line Lh3, and the division point D is moved according to the set movement amount, A part is enlarged also at least in the direction orthogonal to the deformation direction.

なお、顔変形部240は、変形領域が圧縮領域に含まれている場合と同様に、変形領域が拡大領域に含まれている場合の各分割点Dの移動量設定においても、拡大率が示す数値のうちの所定割合(例えば7割)の数値をH方向における変形量(圧縮量)に割り当てるとともに、拡大率が示す数値からこのH方向における変形量(圧縮量)を差し引いた残り(例えば3割)の数値を、V方向における変形量(拡大量)に割り当てる。さらに、顔変形部240は、変形領域が拡大領域に含まれている場合に上記のようにH方向とV方向とに割り当てた変形量を、変形領域が圧縮領域に含まれている場合と同様に、分割点D11,D12,D13,D21,D22,D23,D31,D32,D33,D41,D42,D43に対して所定の割合で分配して設定する。   Note that the face deformation unit 240 indicates the enlargement ratio in the movement amount setting of each division point D when the deformation area is included in the enlargement area, as in the case where the deformation area is included in the compression area. A numerical value of a predetermined ratio (for example, 70%) of the numerical values is assigned to the deformation amount (compression amount) in the H direction, and the remainder obtained by subtracting the deformation amount (compression amount) in the H direction from the numerical value indicated by the enlargement ratio (for example, 3 Is assigned to the deformation amount (enlargement amount) in the V direction. Further, the face deformation unit 240 uses the deformation amount assigned to the H direction and the V direction as described above when the deformation area is included in the enlarged area, as in the case where the deformation area is included in the compression area. In addition, the division points D11, D12, D13, D21, D22, D23, D31, D32, D33, D41, D42, and D43 are distributed and set at a predetermined ratio.

図17は、顔変形部240が、上記のように拡大率が示す数値をH方向とV方向との変形量に配分し、さらにH方向およびV方向の変形量を各分割点Dに配分して決定した移動量の一例を表によって示している。ただし図17では、上記のように拡大率に応じて決定した各分割点Dの移動量を、さらに分割点Dの位置に応じて変更した後の移動量を示している。また図17では図9と同様に、各分割点Dの移動量を画素ピッチに換算した値によって示している。図17の例では、水平分割線Lh1上の分割点D11,D21,D31,D41および水平分割線Lh3上の分割点D13,D23,D33,D43に対してだけではなく、水平分割線Lh2上の分割点D12,D22,D32,D42に対しても、V方向における移動量を設定した例を示している。   In FIG. 17, the face deformation unit 240 distributes the numerical value indicated by the enlargement ratio as described above to the deformation amounts in the H direction and the V direction, and further distributes the deformation amounts in the H direction and the V direction to the respective division points D. An example of the movement amount determined in this way is shown in the table. However, FIG. 17 shows the movement amount after the movement amount of each division point D determined according to the enlargement ratio as described above is further changed according to the position of the division point D. Further, in FIG. 17, similarly to FIG. 9, the amount of movement of each division point D is indicated by a value converted into a pixel pitch. In the example of FIG. 17, not only on the dividing points D11, D21, D31, D41 on the horizontal dividing line Lh1 and the dividing points D13, D23, D33, D43 on the horizontal dividing line Lh3, but on the horizontal dividing line Lh2. An example in which the movement amount in the V direction is also set for the dividing points D12, D22, D32, and D42 is shown.

図18は、図17に例示した分割点D毎の移動量に従って、顔変形部240がS640において各分割点Dを移動して変形領域TA内の画像を変形する際の具体的態様を示している。図18でも図10と同様に、比較の便宜のため、変形前の人物P2の顔の輪郭を鎖線で示し、変形後の人物P2の顔の輪郭を実線で示している。また図18でも、移動後の分割点Dの符号に「’」を付し、移動前の分割点D(白丸)の符号には括弧を付している。   FIG. 18 shows a specific mode when the face deformation unit 240 moves each division point D in S640 and deforms the image in the deformation area TA according to the movement amount for each division point D illustrated in FIG. Yes. In FIG. 18, as in FIG. 10, the contour of the face of the person P <b> 2 before the deformation is indicated by a chain line and the outline of the face of the person P <b> 2 after the deformation is indicated by a solid line for convenience of comparison. Also in FIG. 18, “′” is added to the code of the dividing point D after the movement, and parentheses are added to the code of the dividing point D (white circle) before the movement.

図18に示すように、S640における分割点Dの移動の結果、V方向に関し、水平分割線Lh1上に配置された分割点D11,D21,D31,D41の位置は下方に移動される一方、水平分割線Lh2,Lh3上に配置された分割点D12,D22,D32,D42,D13,D23,D33,D43の位置は上方に移動される。従って、水平分割線Lh1と水平分割線Lh3との間に位置する画像はV方向に関して拡大され、その中でも特に水平分割線Lh1と水平分割線Lh2との間に位置する画像はV方向に関して強く拡大される。   As shown in FIG. 18, as a result of the movement of the dividing point D in S640, the positions of the dividing points D11, D21, D31, and D41 arranged on the horizontal dividing line Lh1 are moved downward with respect to the V direction. The positions of the dividing points D12, D22, D32, D42, D13, D23, D33, D43 arranged on the dividing lines Lh2, Lh3 are moved upward. Therefore, an image located between the horizontal dividing line Lh1 and the horizontal dividing line Lh3 is enlarged in the V direction, and among them, an image located between the horizontal dividing line Lh1 and the horizontal dividing line Lh2 is strongly enlarged in the V direction. Is done.

また図18では、H方向に関しては、垂直分割線Lv1,Lv2上に配置された分割点D11,D12,D13,D21,D22,D23の位置は右方向に移動され、垂直分割線Lv3,Lv4上に配置された分割点D31,D32,D33,D41,D42,D43の位置は左方向に移動される。従って、垂直分割線Lv1より左側に位置する画像は、H方向に関して右側に拡大され、垂直分割線Lv4より右側に位置する画像は、左側に拡大される。また、垂直分割線Lv1と垂直分割線Lv2との間に位置する画像は、H方向に関して右側に移動しつつ圧縮され、垂直分割線Lv3と垂直分割線Lv4との間に位置する画像は、H方向に関して左側に移動しつつ圧縮される。さらに、垂直分割線Lv2と垂直分割線Lv3との間に位置する画像は、基準線RLを中心にH方向に関して圧縮される。   In FIG. 18, with respect to the H direction, the positions of the dividing points D11, D12, D13, D21, D22, and D23 arranged on the vertical dividing lines Lv1 and Lv2 are moved to the right and on the vertical dividing lines Lv3 and Lv4. The positions of the division points D31, D32, D33, D41, D42, and D43 arranged at are moved to the left. Therefore, the image located on the left side of the vertical dividing line Lv1 is enlarged on the right side in the H direction, and the image located on the right side of the vertical dividing line Lv4 is enlarged on the left side. An image located between the vertical division line Lv1 and the vertical division line Lv2 is compressed while moving to the right in the H direction, and an image located between the vertical division line Lv3 and the vertical division line Lv4 is H Compressed while moving to the left with respect to direction. Furthermore, the image located between the vertical division line Lv2 and the vertical division line Lv3 is compressed in the H direction around the reference line RL.

上述したように、水平分割線Lh1は顎の画像より下方に配置され、水平分割線Lh3は頭頂部の画像より上に配置され、垂直分割線Lv1およびLv4は、頬のラインの画像の外側に配置され、垂直分割線Lv2およびLv3は、目尻の画像の外側に配置される。そのため、このように変形領域が拡大領域に含まれている場合の顔変形処理では、顔画像の内、顎から頭頂部にかけての部分の画像がV方向に拡大されるとともに、左右の頬と頬の間の顔画像が全体的にH方向において圧縮される。つまり変形領域が拡大領域に含まれている場合の顔変形処理では、変形領域TAに含まれる人物P2の顔の形状は、上下方向においてある程度伸長され、幅方向において細い形状に変形される。なお顔変形部240は、S630において、拡大率が示す数値を最終的に各分割点Dに配分して決定した各移動量に対してもさらに所定の補正係数を乗算し、この乗算によって得た各値を各分割点Dの移動量としてもよい。この場合の補正係数とは、例えば0以上1未満の数値であって、顔変形処理による顔の幅方向(H方向)における圧縮の度合いおよび顔の高さ方向(V方向)における拡大の度合いを抑制するための数値である。   As described above, the horizontal dividing line Lh1 is arranged below the chin image, the horizontal dividing line Lh3 is arranged above the top image, and the vertical dividing lines Lv1 and Lv4 are outside the cheek line image. The vertical dividing lines Lv2 and Lv3 are arranged outside the image of the corner of the eye. Therefore, in the face deformation process when the deformation area is included in the enlargement area in this way, the image of the face image from the chin to the top of the head is enlarged in the V direction, and the left and right cheeks and cheeks Are generally compressed in the H direction. That is, in the face deformation process when the deformation area is included in the enlarged area, the shape of the face of the person P2 included in the deformation area TA is elongated to some extent in the vertical direction and deformed into a narrow shape in the width direction. The face deforming unit 240 further multiplies each movement amount determined by finally allocating the numerical value indicated by the enlargement ratio to each division point D in S630 by a predetermined correction coefficient, and obtained by this multiplication. Each value may be the amount of movement of each division point D. The correction coefficient in this case is a numerical value of 0 or more and less than 1, for example, and indicates the degree of compression in the face width direction (H direction) and the degree of enlargement in the face height direction (V direction) by face deformation processing. It is a numerical value for suppressing.

S800では、一方向変形部230が対象画像について一方向変形処理を実行する。上述したように、一方向変形部230は、一方向変形処理を行なうに際して変形方向に直交する分割線によって対象画像を圧縮領域と拡大領域とに分けている。   In S800, the unidirectional deformation unit 230 performs a unidirectional deformation process on the target image. As described above, the unidirectional deformation unit 230 divides the target image into the compression region and the enlargement region by the dividing line orthogonal to the deformation direction when performing the unidirectional deformation process.

図13Aは、対象画像TIを圧縮領域ACと拡大領域AEとに分けた様子を例示している。図13Aでは、対象画像TIの中心を含む領域に圧縮領域ACが設定され、圧縮領域ACの左右両側に同一面積の拡大領域AE,AEが設定された例を示しており、圧縮領域ACには人物P1が、向かって左側の拡大領域AEには人物P2が含まれている。   FIG. 13A illustrates a state in which the target image TI is divided into a compressed area AC and an enlarged area AE. FIG. 13A shows an example in which a compression area AC is set in an area including the center of the target image TI, and enlarged areas AE and AE having the same area are set on both the left and right sides of the compression area AC. The person P1 is included in the enlarged area AE on the left side of the person P1.

図13Bは、対象画像TIに対して一方向変形処理を施した後の画像(変形済画像TI’と呼ぶ。)を例示している。つまり、一方向変形部230は、一方向変形処理を実行することにより、図13Bに示すように、圧縮領域ACを変形方向の長さが短縮された圧縮領域AC’に変形し、拡大領域AEを変形方向の長さが延長された拡大領域AE’に変形する。   FIG. 13B illustrates an image (referred to as a modified image TI ′) after the one-direction deformation process is performed on the target image TI. That is, the unidirectional deformation unit 230 performs the unidirectional deformation process to transform the compression area AC into a compression area AC ′ whose length in the deformation direction is shortened as shown in FIG. Is transformed into an enlarged region AE ′ having an extended length in the deformation direction.

図14は、S800において実行される一方向変形処理をフローチャートにより示している。
図15は、変形方向が横方向である場合の、一方向変形処理を模式的に示した説明図である。図15Aは、一方向変形処理が施される前の対象画像における画素の配置を示している。図15Bは、対応画素数テーブル410の一例を示している。図15Cは、一方向変形処理が施された画像(変形済画像)の画素の配置を示している。
FIG. 14 is a flowchart showing the unidirectional deformation process executed in S800.
FIG. 15 is an explanatory diagram schematically showing the unidirectional deformation process when the deformation direction is the horizontal direction. FIG. 15A shows an arrangement of pixels in the target image before the one-way deformation process is performed. FIG. 15B shows an example of the corresponding pixel number table 410. FIG. 15C illustrates an arrangement of pixels of an image (deformed image) that has been subjected to the unidirectional deformation process.

S810では、一方向変形部230は、S400において変形方向設定部220が設定した変形方向が横方向と縦方向とのいずれであるかを判断する。変形方向が横方向である場合、処理はS820に進む。一方、変形方向が縦方向である場合、処理はS850に進む。上述したように、本実施形態では横方向が変形方向であるため、S820に進む。   In S810, the unidirectional deformation unit 230 determines whether the deformation direction set by the deformation direction setting unit 220 in S400 is the horizontal direction or the vertical direction. If the deformation direction is the horizontal direction, the process proceeds to S820. On the other hand, if the deformation direction is the vertical direction, the process proceeds to S850. As described above, in this embodiment, since the horizontal direction is the deformation direction, the process proceeds to S820.

S820では、一方向変形部230は、対応画素数テーブル410を生成する。対応画素数テーブル410とは、対象画像の変形方向における各画素に対応する変形済画像の画素数を表すテーブルである。一方向変形部230は、圧縮領域および拡大領域それぞれについて既に設定されている倍率(圧縮率および拡大率)に基づいて、変形済画像の画素数(対応画素数)を決定する。そして、決定された対応画素数を対応画素数テーブル410に格納することにより、対応画素数テーブル410が生成される。   In S820, the unidirectional deformation unit 230 generates the corresponding pixel number table 410. The corresponding pixel number table 410 is a table representing the number of pixels of the deformed image corresponding to each pixel in the deformation direction of the target image. The unidirectional deformation unit 230 determines the number of pixels (corresponding number of pixels) of the deformed image based on the magnification (compression rate and enlargement rate) already set for each of the compression region and the enlargement region. Then, by storing the determined corresponding pixel number in the corresponding pixel number table 410, the corresponding pixel number table 410 is generated.

一方向変形部230は、対応画素数テーブル410の生成にあたっては、圧縮率や拡大率を倍率に変換する。例えば、上述したように圧縮率として「30%」という数値が設定されている場合には、この圧縮率を0.7倍という数値(倍率)に変換する。また、例えば、拡大率として30%という数値が設定されている場合には、この拡大率を1.3倍という数値(倍率)に変換する。一方向変形部230は、例えば、このような倍率の小数部についてハーフトーン処理による二値化を行って0と1との配列パターンを決定し、配列パターンの0または1の値に倍率の整数部を加えることによって、対象画像の画素毎の対応画素数を決定することができる。一方向変形部230は、対応画素数テーブル410の生成に当っては、ハーフトーン処理としては、ディザや誤差拡散などの周知の方法を用いることができる。また、倍率の小数部ごとに予め格納された配列パターンを用いてもよい。なおS820において、対応画素数テーブル410を生成するのに代えて、予め作成された対応画素数テーブルを用いてもよい。   In generating the corresponding pixel number table 410, the unidirectional deformation unit 230 converts the compression rate and the enlargement rate into a magnification. For example, when the numerical value “30%” is set as the compression rate as described above, the compression rate is converted to a numerical value (magnification) of 0.7 times. For example, when a numerical value of 30% is set as the enlargement ratio, this enlargement ratio is converted to a numerical value (magnification) of 1.3 times. For example, the unidirectional deformation unit 230 performs binarization by halftone processing on the fractional part of such a magnification to determine an array pattern of 0 and 1, and an integer of the magnification to the value of 0 or 1 of the array pattern By adding a portion, the number of corresponding pixels for each pixel of the target image can be determined. In generating the corresponding pixel number table 410, the unidirectional deformation unit 230 can use a known method such as dithering or error diffusion as the halftone process. Alternatively, an array pattern stored in advance for each fractional part of the magnification may be used. In S820, a corresponding pixel number table created in advance may be used instead of generating the corresponding pixel number table 410.

図15Aでは、説明をごく簡単にするために、画像の横方向にそれぞれ5画素からなる領域1,2,3が存在し、領域1および領域3が拡大領域であり、領域2が圧縮領域である場合を想定して説明を行なう。ここでは、領域1の倍率が1.2倍、領域2の倍率が0.6倍、領域3の倍率が1.2倍であるとする。そのため、対応画素数テーブル(図15B)においては、領域1の5画素Px1〜Px5のうち、4つの画素Px1,Px2,Px3,Px5については、対応画素数が1に設定され、残り1つの画素Px4については、対応画素数が2に設定されている。また、領域2の5画素Px6〜Px10のうち、3つの画素Px6,Px8,Px10については、対応画素数が1に設定され、残り2つの画素Px7,Px9については、対応画素数が0に設定されている。また、領域3の5画素Px11〜Px15のうち、4つの画素Px11,Px12,Px13,Px15については、対応画素数が1に設定され、残り1つの画素Px14については、対応画素数が2に設定されている。   In FIG. 15A, for the sake of simplicity, there are regions 1, 2, and 3 each consisting of 5 pixels in the horizontal direction of the image, region 1 and region 3 are enlarged regions, and region 2 is a compressed region. The description will be made assuming a certain case. Here, it is assumed that the magnification of region 1 is 1.2 times, the magnification of region 2 is 0.6 times, and the magnification of region 3 is 1.2 times. Therefore, in the corresponding pixel number table (FIG. 15B), among the five pixels Px1 to Px5 in the region 1, the corresponding pixel number is set to 1 for four pixels Px1, Px2, Px3, and Px5, and the remaining one pixel For Px4, the number of corresponding pixels is set to two. Of the five pixels Px6 to Px10 in the region 2, the corresponding number of pixels is set to 1 for the three pixels Px6, Px8, and Px10, and the corresponding number of pixels is set to 0 for the remaining two pixels Px7 and Px9. Has been. Of the five pixels Px11 to Px15 in the region 3, the number of corresponding pixels is set to 1 for four pixels Px11, Px12, Px13, and Px15, and the number of corresponding pixels is set to 2 for the remaining one pixel Px14. Has been.

S830では、一方向変形部230は、対応画素数テーブルを参照し、内部メモリー120内のバッファ領域を用いて対象画像の1ライン分の画素の再配置を行なう。ここで、ラインとは、一方向変形処理における処理単位であり、長さが対象画像の横方向における全画素数分で、幅が1画素分の画像領域をいう。図15の例では、図15Cに示すように、領域1を構成する画素として、順次、対応画素数が1の画素Px1,Px2,Px3が1つずつ配置され、次に対応画素数が2の画素Px4が2つ配置され、次に対応画素数が1の画素Px5が1つ配置される。次いで、領域2を構成する画素として、対応画素数が1の画素Px6,Px8,Px10が順に1つずつ配置され、次に、領域3を構成する画素として、対応画素数が1の画素Px11,Px12,Px13が1つずつ配置され、対応画素数が2の画素Px14が2つ配置され、対応画素数が1の画素Px15が1つ配置される。このような1ライン分の画素の再配置を全ラインについて行なうことにより、対象画像の拡大領域はそれぞれ1.2倍に拡大され、圧縮領域は0.6倍に圧縮される。   In S830, the unidirectional deformation unit 230 refers to the corresponding pixel number table and rearranges pixels for one line of the target image using the buffer area in the internal memory 120. Here, a line is a processing unit in the unidirectional deformation process, and refers to an image area whose length is the number of all pixels in the horizontal direction of the target image and whose width is one pixel. In the example of FIG. 15, as shown in FIG. 15C, pixels Px1, Px2, and Px3 having a corresponding pixel number of 1 are sequentially arranged one by one as the pixels constituting the region 1, and then the corresponding pixel number of 2 Two pixels Px4 are arranged, and then one pixel Px5 having a corresponding number of pixels of one is arranged. Next, the pixels Px6, Px8, and Px10 having a corresponding pixel number of 1 are sequentially arranged as the pixels that configure the region 2, and then the pixels Px11, Px12 and Px13 are arranged one by one, two pixels Px14 with the corresponding number of pixels 2 are arranged, and one pixel Px15 with the number of corresponding pixels 1 is arranged. By performing such rearrangement of pixels for one line for all lines, the enlargement area of the target image is enlarged 1.2 times, and the compression area is compressed 0.6 times.

S840では、一方向変形処理実行部230は、対象画像の全てのラインについて、画素の再配置が完了したか否かを判断する。全てのラインについて画素の再配置が完了している場合、一方向変形処理を終了し、その結果、図2のフローチャートが終了する。一方、画素の再配置が完了していない場合、処理はS830に戻され、全てのラインについて画素の再配置が完了するまで、S830,S840が繰り返し実行される。   In S840, the unidirectional deformation process execution unit 230 determines whether or not pixel rearrangement has been completed for all lines of the target image. When the pixel rearrangement has been completed for all lines, the unidirectional deformation process is terminated, and as a result, the flowchart of FIG. 2 is terminated. On the other hand, when the pixel rearrangement is not completed, the process returns to S830, and S830 and S840 are repeatedly executed until the pixel rearrangement is completed for all lines.

一方向変形部230は、S850では、S820と同様に圧縮領域、拡大領域の各倍率を用いて対応画素数テーブル410を生成する。変形方向が縦方向の場合、対象画像の縦方向に並ぶ各画素についての対応画素数を規定した対応画素数テーブル410が生成される。対応画素数の決定方法はS820と同様であるので説明を省略する。   In S850, the unidirectional deformation unit 230 generates the corresponding pixel number table 410 by using the respective magnifications of the compression area and the enlargement area as in S820. When the deformation direction is the vertical direction, a corresponding pixel number table 410 that defines the number of corresponding pixels for each pixel arranged in the vertical direction of the target image is generated. Since the method for determining the number of corresponding pixels is the same as that in S820, description thereof is omitted.

S860において、一方向変形部230は、対応画素数テーブルを参照して、上記バッファ領域に設けられた変形済画像の格納領域に、対象画像のラインを配置する。変形方向が横方向である場合には、画素単位でその画素に対応する対応画素数(0や1や2等)に応じた再配置を行なうが、変形方向が縦方向である場合には、ライン単位で、そのラインに対応する対応画素数に応じた配置を行なう。具体的には、上記バッファ領域の変形済画像の格納領域に、バッファ領域に格納された対象画像の1ラインを、当該1ラインに対応する対応画素数分のラインとして追加する。   In S860, the one-way deformation unit 230 refers to the corresponding pixel number table and arranges the line of the target image in the storage area of the deformed image provided in the buffer area. When the deformation direction is the horizontal direction, rearrangement is performed according to the number of corresponding pixels (0, 1, 2 or the like) corresponding to the pixel in units of pixels, but when the deformation direction is the vertical direction, Arrangement is performed in line units according to the number of corresponding pixels corresponding to the line. Specifically, one line of the target image stored in the buffer area is added to the storage area of the deformed image in the buffer area as a line corresponding to the number of corresponding pixels corresponding to the one line.

S870では、一方向変形部230は、対象画像の全てのラインを対象としてS860の処理を完了したか否かを判断し、完了している場合は、一方向変形処理を終了し、その結果、図2のフローチャートが終了する。一方、完了していない場合は、処理はS860に戻され、対象画像の全てのラインを対象としてS860が行なわれるまで、S860,S870が繰り返し実行される。   In S870, the unidirectional deformation unit 230 determines whether or not the process of S860 has been completed for all the lines of the target image, and if complete, ends the unidirectional deformation process, and as a result, The flowchart of FIG. 2 ends. On the other hand, if it is not completed, the process returns to S860, and S860 and S870 are repeatedly executed until S860 is performed for all the lines of the target image.

3.まとめ
このように、S800の一方向変形処理により、対象画像において設定された圧縮領域は変形方向に圧縮され、拡大領域は変形方向に拡大される。そのため、図13Bに示したように、変形済画像TI’中の人物P1は、変形前の対象画像TI中の人物P1よりも全体的に細くなり(スリム化)、変形済画像TI’中の人物P2は、変形前の対象画像TI中の人物P2よりも全体的に太くなる。上述したように、S600の顔変形処理によって、圧縮領域に含まれていた顔の形状は上下方向に押しつぶされ幅方向に太った形状となっており、拡大領域に含まれていた顔の形状は、上下方向に伸長され幅方向にやせ細った形状となっている。そのため、顔変形処理および一方向変形処理が施された対象画像においては、圧縮領域に含まれていた人物画像は全体的にスリムな体型に変形し、かつ圧縮領域と拡大領域のいずれに含まれていた人物画像の顔も、縦横のバランスが違和感の無いものとなる。人間の体の中でも顔はユーザーにとって特に注意を引く部分であり、画像補正処理によって顔の縦横比が著しく変形していると、ユーザーは大きな違和感を覚えてしまう。本実施形態によれば、顔の縦横比については、処理前と比較して著しく変化することが抑制されるため、ユーザーは、見た目に違和感の無い画像を得ることができる。
3. Summary As described above, the compression area set in the target image is compressed in the deformation direction and the enlargement area is expanded in the deformation direction by the one-way deformation process in S800. Therefore, as shown in FIG. 13B, the person P1 in the transformed image TI ′ is generally thinner (slimmed) than the person P1 in the target image TI before transformation, and the person P1 in the transformed image TI ′ The person P2 is generally thicker than the person P2 in the target image TI before deformation. As described above, the face shape included in the compressed region is crushed in the vertical direction and thickened in the width direction by the face deformation process in S600, and the face shape included in the enlarged region is It is elongated in the vertical direction and thinned in the width direction. Therefore, in the target image that has undergone the face deformation process and the unidirectional deformation process, the human image included in the compressed area is deformed into a slim body as a whole and is included in either the compressed area or the enlarged area. The face of the person image that has been displayed also has no sense of incongruity between the vertical and horizontal balance. The face of the human body is a part that attracts particular attention to the user. If the aspect ratio of the face is significantly deformed by the image correction process, the user will feel a great sense of discomfort. According to the present embodiment, since the aspect ratio of the face is suppressed from being significantly changed as compared to before processing, the user can obtain an image that does not feel strange to the eye.

上記では、顔変形処理(S600)の後に一方向変形処理(S800)を実行する場合を例に説明を行なったが、これら2つの処理を行なう場合の処理の順序は問わず、一方向変形処理の後に顔変形処理を行なう(例えば、図2のフローチャートにおいて、S400とS500の間にS800を行なう)構成としてもよい。   In the above description, the case where the unidirectional deformation process (S800) is executed after the face deformation process (S600) has been described as an example. However, the unidirectional deformation process is performed regardless of the order of the processes when these two processes are performed. The face deformation process may be performed after (for example, S800 is performed between S400 and S500 in the flowchart of FIG. 2).

また、本実施形態では、対象画像中の顔の縦横比が変化し過ぎることを防止しつつも、全体的にバランスの良い画像を得るための種々の工夫をしている。上述したように、顔変形処理では、変形領域の画像のH方向における変形量として、一方向変形処理における圧縮率あるいは拡大率が示す数値をそのまま適用するのではなく、圧縮率あるいは拡大率が示す数値のうち所定割合分の数値を適用する。つまり、圧縮領域での圧縮をほぼ全て打ち消す程の拡大や、拡大領域での拡大をほぼ全て打ち消す程の圧縮を、顔変形処理で行なうと、顔と顔以外の体とのバランスが非常に悪い人物画像が得られてしまう恐れがある。そのため、あくまで顔変形処理における顔の幅方向の変形は、一方向変形処理による変形の効果がある程度勝るような度合いで行なうようにしている。   In the present embodiment, various measures are taken to obtain an image with a good overall balance while preventing the aspect ratio of the face in the target image from changing too much. As described above, in the face deformation process, the numerical value indicated by the compression ratio or enlargement ratio in the one-way deformation process is not applied as the deformation amount in the H direction of the image of the deformation area, but indicates the compression ratio or enlargement ratio. A numerical value corresponding to a predetermined ratio is applied. In other words, if the face deformation process is performed to enlarge enough to cancel almost all the compression in the compression area or almost all enlargement in the enlarged area, the balance between the face and the body other than the face is very poor. A person image may be obtained. For this reason, the deformation in the width direction of the face in the face deformation process is performed to such an extent that the effect of the deformation by the one-way deformation process is better to some extent.

上記の顔変形処理では、変形領域の全体が圧縮領域に含まれている場合(人物P1)、および変形領域の全体が拡大領域に含まれている場合(人物P2)の2つのケースについて説明を行なった。しかし、対象画像内での人物画像の位置や、圧縮領域および拡大領域の設定態様によっては、一つの変形領域が圧縮画像と拡大画像との境界を跨ぐ位置に設定されることもある。   In the face deformation process described above, two cases will be described: the case where the entire deformation area is included in the compression area (person P1) and the case where the entire deformation area is included in the enlargement area (person P2). I did it. However, depending on the position of the person image in the target image and the setting mode of the compression area and the enlargement area, one deformation area may be set at a position straddling the boundary between the compression image and the enlargement image.

図19Aは、ある人物の顔画像についての変形領域TAが、対象画像内の圧縮画像と拡大画像との境界(鎖線)を跨ぐ位置に設定された場合を例示している。このような場合、S630で顔変形部240は、変形領域TA内に上述したように配置した各分割点Dのうち圧縮領域に属する分割点Dに対しては、圧縮領域の圧縮率に基づいて(変形領域TA全体が圧縮領域に含まれていると想定して)上述のように算出した移動量を設定する。一方、変形領域TAの各分割点Dのうち拡大領域に属する分割点Dに対しては、拡大領域の拡大率に基づいて(変形領域TA全体が拡大領域に含まれていると想定して)上述のように算出した移動量を設定する。   FIG. 19A illustrates a case where the deformation area TA for a face image of a person is set at a position straddling the boundary (chain line) between the compressed image and the enlarged image in the target image. In such a case, in S630, the face deformation unit 240 determines, based on the compression ratio of the compression area, for the division points D belonging to the compression area among the division points D arranged as described above in the deformation area TA. The movement amount calculated as described above is set (assuming that the entire deformation area TA is included in the compression area). On the other hand, among the division points D of the deformation area TA, the division points D belonging to the expansion area are based on the enlargement ratio of the expansion area (assuming that the entire deformation area TA is included in the expansion area). The movement amount calculated as described above is set.

このように各分割点Dの移動量を設定した後、S640において顔変形部240は、図19Bに示すように、変形領域TAを圧縮領域に属する変形領域TA1と拡大領域に属する変形領域TA2に分け、変形領域TA1内の画像については変形領域TA1内の分割点Dに設定した移動量に応じた変形を行ない、変形領域TA2内の画像については変形領域TA2内の分割点Dに設定した移動量に応じた変形を行なう。このような顔変形処理の結果、変形領域TA内の顔のうち、圧縮領域に属していた部分については変形方向において拡大され、拡大領域に属していた部分については変形方向において圧縮される。   After setting the movement amount of each division point D in this way, in S640, the face deformation unit 240 converts the deformation area TA into a deformation area TA1 belonging to the compression area and a deformation area TA2 belonging to the enlargement area, as shown in FIG. 19B. The image in the deformation area TA1 is deformed according to the amount of movement set at the dividing point D in the deformation area TA1, and the image in the deformation area TA2 is moved at the division point D in the deformation area TA2. Perform deformation according to the amount. As a result of such face deformation processing, of the faces in the deformation area TA, the part belonging to the compression area is enlarged in the deformation direction, and the part belonging to the expansion area is compressed in the deformation direction.

100…プリンター、110…CPU、120…内部メモリー、140…操作部、150…表示部、160…プリンターエンジン、170…カードI/F、172…カードスロット、200…画像補正処理部、210…顔領域検出部、220…変形方向設定部、230…一方向変形部、240…顔変形部、310…表示処理部、320…印刷処理部、410…対応画素数テーブル、420…分割点配置パターンテーブル DESCRIPTION OF SYMBOLS 100 ... Printer, 110 ... CPU, 120 ... Internal memory, 140 ... Operation part, 150 ... Display part, 160 ... Printer engine, 170 ... Card I / F, 172 ... Card slot, 200 ... Image correction process part, 210 ... Face Area detection unit, 220 ... Deformation direction setting unit, 230 ... Unidirectional deformation unit, 240 ... Face deformation unit, 310 ... Display processing unit, 320 ... Print processing unit, 410 ... Corresponding pixel number table, 420 ... Division point arrangement pattern table

Claims (8)

顔画像が含まれる対象画像において、対象画像内に圧縮領域と拡大領域とを設定する領域設定部と、
所定の拡大率によって、上記拡大領域を特定方向に拡大する画像変形部と、
上記顔画像の少なくとも一部が上記拡大領域に含まれている場合に、当該拡大領域に含まれている顔画像が上記特定方向に圧縮されるように、上記拡大率に応じて決定した圧縮量によって上記顔画像を変形する顔変形部とを備えることを特徴とする画像処理装置。
In a target image including a face image, an area setting unit that sets a compression area and an enlargement area in the target image;
An image deformation unit that enlarges the enlargement area in a specific direction with a predetermined enlargement ratio;
When at least a part of the face image is included in the enlargement area, the compression amount determined according to the enlargement ratio so that the face image included in the enlargement area is compressed in the specific direction. An image processing apparatus comprising: a face deforming unit that deforms the face image.
上記画像変形部は、所定の圧縮率によって上記圧縮領域を上記特定方向に圧縮し、
上記顔変形部は、上記顔画像の少なくとも一部が上記圧縮領域に含まれている場合に、当該圧縮領域に含まれている顔画像が上記特定方向に拡大されるように、上記圧縮率に応じて決定した拡大量によって上記顔画像を変形することを特徴とする請求項1に記載の画像処理装置。
The image transformation unit compresses the compression area in the specific direction by a predetermined compression rate,
The face deforming unit adjusts the compression rate so that the face image included in the compression area is enlarged in the specific direction when at least a part of the face image is included in the compression area. The image processing apparatus according to claim 1, wherein the face image is deformed by an enlargement amount determined accordingly.
上記顔変形部は、上記顔画像の上下方向と上記特定方向とがなす角度が所定の基準角度より大きい場合に、上記顔画像の変形を実行することを特徴とする請求項1または請求項2に記載の画像処理装置。   3. The face deformation unit, wherein the face image is deformed when an angle formed by the vertical direction of the face image and the specific direction is larger than a predetermined reference angle. An image processing apparatus according to 1. 上記顔変形部は、上記対象画像内に複数の顔画像が存在する場合に、少なくとも一部が互いに重なっている各顔画像を除いた顔画像に対して変形を実行することを特徴とする請求項1〜請求項3のいずれかに記載の画像処理装置。   The face deformation unit performs deformation on a face image excluding face images at least partially overlapping each other when a plurality of face images exist in the target image. The image processing apparatus according to claim 1. 上記顔変形部は、上記拡大率が示す数値のうちの所定割合の数値に基づいて上記圧縮量を決定することを特徴とする請求項1〜請求項4のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the face deforming unit determines the compression amount based on a numerical value of a predetermined ratio among the numerical values indicated by the enlargement ratio. 顔画像が含まれる対象画像において、対象画像内に圧縮領域と拡大領域とを設定する領域設定工程と、
所定の拡大率によって、上記拡大領域を特定方向に拡大する画像変形工程と、
上記顔画像の少なくとも一部が上記拡大領域に含まれている場合に、当該拡大領域に含まれている顔画像が上記特定方向に圧縮されるように、上記拡大率に応じて決定した圧縮量によって上記顔画像を変形する顔変形工程とを備えることを特徴とする画像処理方法。
In a target image including a face image, an area setting step for setting a compression area and an enlarged area in the target image;
An image transformation step of enlarging the enlargement area in a specific direction with a predetermined enlargement ratio;
When at least a part of the face image is included in the enlargement area, the compression amount determined according to the enlargement ratio so that the face image included in the enlargement area is compressed in the specific direction. And a face deformation step for deforming the face image.
顔画像が含まれる対象画像において、対象画像内に圧縮領域と拡大領域とを設定する領域設定機能と、
所定の拡大率によって、上記拡大領域を特定方向に拡大する画像変形機能と、
上記顔画像の少なくとも一部が上記拡大領域に含まれている場合に、当該拡大領域に含まれている顔画像が上記特定方向に圧縮されるように、上記拡大率に応じて決定した圧縮量によって上記顔画像を変形する顔変形機能とをコンピューターに実行させることを特徴とする画像処理プログラム。
An area setting function for setting a compression area and an enlargement area in the target image in the target image including the face image;
An image transformation function for enlarging the enlargement area in a specific direction with a predetermined enlargement ratio;
When at least a part of the face image is included in the enlargement area, the compression amount determined according to the enlargement ratio so that the face image included in the enlargement area is compressed in the specific direction. An image processing program for causing a computer to execute a face deformation function for deforming the face image.
顔画像が含まれる対象画像において、対象画像内に圧縮領域と拡大領域とを設定する領域設定部と、
所定の拡大率によって、上記拡大領域を特定方向に拡大する画像変形部と、
上記顔画像の少なくとも一部が上記拡大領域に含まれている場合に、当該拡大領域に含まれている顔画像が上記特定方向に圧縮されるように、上記拡大率に応じて決定した圧縮量によって上記顔画像を変形する顔変形部とを備えることを特徴とする印刷装置。
In a target image including a face image, an area setting unit that sets a compression area and an enlargement area in the target image;
An image deformation unit that enlarges the enlargement area in a specific direction with a predetermined enlargement ratio;
When at least a part of the face image is included in the enlargement area, the compression amount determined according to the enlargement ratio so that the face image included in the enlargement area is compressed in the specific direction. A printing apparatus comprising: a face deformation unit that deforms the face image.
JP2009010328A 2009-01-20 2009-01-20 Apparatus, method and program for processing image, and printer Pending JP2010170219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009010328A JP2010170219A (en) 2009-01-20 2009-01-20 Apparatus, method and program for processing image, and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009010328A JP2010170219A (en) 2009-01-20 2009-01-20 Apparatus, method and program for processing image, and printer

Publications (1)

Publication Number Publication Date
JP2010170219A true JP2010170219A (en) 2010-08-05

Family

ID=42702335

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009010328A Pending JP2010170219A (en) 2009-01-20 2009-01-20 Apparatus, method and program for processing image, and printer

Country Status (1)

Country Link
JP (1) JP2010170219A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013162451A (en) * 2012-02-08 2013-08-19 Tatsumi Denshi Kogyo Kk Game photographing apparatus, game photographing method, and program
WO2018193674A1 (en) * 2017-04-20 2018-10-25 シャープ株式会社 Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program
WO2018193677A1 (en) * 2017-04-21 2018-10-25 シャープ株式会社 Image processing device, image capturing device, image printing device, control method of image processing device, and image processing program
CN111080544A (en) * 2019-12-09 2020-04-28 Oppo广东移动通信有限公司 Face distortion correction method and device based on image and electronic equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013162451A (en) * 2012-02-08 2013-08-19 Tatsumi Denshi Kogyo Kk Game photographing apparatus, game photographing method, and program
WO2018193674A1 (en) * 2017-04-20 2018-10-25 シャープ株式会社 Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program
WO2018193677A1 (en) * 2017-04-21 2018-10-25 シャープ株式会社 Image processing device, image capturing device, image printing device, control method of image processing device, and image processing program
CN110603565A (en) * 2017-04-21 2019-12-20 夏普株式会社 Image processing apparatus, imaging apparatus, image printing apparatus, control method for image processing apparatus, and image processing program
US11069039B2 (en) 2017-04-21 2021-07-20 Sharp Kabushiki Kaisha Image processing apparatus, imaging apparatus, image printing apparatus, method for controlling image processing apparatus, and image processing program
CN111080544A (en) * 2019-12-09 2020-04-28 Oppo广东移动通信有限公司 Face distortion correction method and device based on image and electronic equipment
CN111080544B (en) * 2019-12-09 2023-09-22 Oppo广东移动通信有限公司 Face distortion correction method and device based on image and electronic equipment

Similar Documents

Publication Publication Date Title
JP5115398B2 (en) Image processing apparatus, image processing method, and image processing program
JP5239625B2 (en) Image processing apparatus, image processing method, and image processing program
US8472751B2 (en) Image processing device, image processing method, and image processing program
JP4973393B2 (en) Image processing apparatus, image processing method, image processing program, and image processing system
US8224117B2 (en) Image processing device, image processing method, and image processing program
KR101335755B1 (en) Image transforming device, electronic device, image transforming method, image transforming program, and recording medium whereupon the program is recorded
JP5071162B2 (en) Image processing apparatus, image processing method, and computer program for image processing
US8249312B2 (en) Image processing device and image processing method
US20090028390A1 (en) Image Processing for Estimating Subject Distance
JP2010170219A (en) Apparatus, method and program for processing image, and printer
JP5256974B2 (en) Image processing apparatus, image processing method, and program
US8031915B2 (en) Image processing device and image processing method
JP6731073B2 (en) Image processing apparatus, imaging apparatus, image printing apparatus, image processing apparatus control method, and image processing program
JP4930298B2 (en) Specify image area
JP4501959B2 (en) Image processing apparatus and image processing method
JP5003790B2 (en) Image processing apparatus, image processing method, and computer program
JP2009217506A (en) Image processor and image processing method
JP4816540B2 (en) Image processing apparatus and image processing method
JP4946729B2 (en) Image processing device
JP2009223566A (en) Image processor, image processing method, and image processing program
JP2009110048A (en) Setting of face area
JP2009055305A (en) Image processing adding information to image
JP2009123101A (en) Estimation of face image direction
JP2011141889A (en) Image processing apparatus and method
JP2010003313A (en) Image processor and image processing method