JP5003790B2 - Image processing apparatus, image processing method, and computer program - Google Patents

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

Info

Publication number
JP5003790B2
JP5003790B2 JP2010104673A JP2010104673A JP5003790B2 JP 5003790 B2 JP5003790 B2 JP 5003790B2 JP 2010104673 A JP2010104673 A JP 2010104673A JP 2010104673 A JP2010104673 A JP 2010104673A JP 5003790 B2 JP5003790 B2 JP 5003790B2
Authority
JP
Japan
Prior art keywords
image
deformation
pixel
buffer
deformation process
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010104673A
Other languages
Japanese (ja)
Other versions
JP2010166624A (en
Inventor
明生 山▲崎▼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2010104673A priority Critical patent/JP5003790B2/en
Publication of JP2010166624A publication Critical patent/JP2010166624A/en
Application granted granted Critical
Publication of JP5003790B2 publication Critical patent/JP5003790B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像に変形処理を施す画像処理技術に関する。   The present invention relates to an image processing technique for performing deformation processing on an image.

画像を変形するための画像変形処理では、変形後の画像を構成する画素(参照元画素)を変形元の画像の画素(参照先画素)に対応付け(「マッピング」と呼ばれる)、参照元画素の画素値を参照先画素の画素値に設定することが行われる。   In the image transformation process for transforming an image, a pixel (reference source pixel) constituting the transformed image is associated with a pixel (reference destination pixel) of the transformation source image (referred to as “mapping”), and a reference source pixel Is set to the pixel value of the reference pixel.

このようにマッピングを用いた画像変形処理では、参照元画素と参照先画素との位置関係は、変形処理の内容によっては、変形後の画像中の参照元画素の位置によって変化する。そのため、マッピングを用いた画像変形処理では、従来、変形前後の画像全体を格納しうるメモリ領域を確保し、確保されたメモリ領域において変形処理が施されていた。   As described above, in the image transformation process using mapping, the positional relationship between the reference source pixel and the reference destination pixel varies depending on the position of the reference source pixel in the transformed image depending on the content of the transformation process. Therefore, in the image deformation process using mapping, conventionally, a memory area that can store the entire image before and after the deformation is secured, and the deformation process is performed in the secured memory area.

特開2004−318204JP 2004-318204 A

しかしながら、変形対象の画像の大きさや画像処理を行う画像処理装置のメモリ容量によっては、変形前後の画像全体を格納可能なメモリ領域を確保することができず、変形処理が行えない場合が発生する。   However, depending on the size of the image to be deformed and the memory capacity of the image processing apparatus that performs image processing, it may not be possible to secure a memory area that can store the entire image before and after deformation, and deformation processing may not be performed. .

本発明は、上述した従来の課題を解決するためになされたものであり、画像を変形するための画像変形処理に要するメモリ量を低減することを目的とする。   The present invention has been made to solve the above-described conventional problems, and an object thereof is to reduce the amount of memory required for image deformation processing for deforming an image.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態又は適用例として実現することが可能である。   SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.

[適用例1]
画像処理装置であって、変形前画像に変形処理を施して、変形後画像領域内に変形後画像を生成する画像変形処理部を備え、前記画像変形処理部は、前記変形後画像領域の一部を構成し、前記変形処理のデスティネーションとなる対象ブロックを設定する対象ブロック設定部と、前記対象ブロックに対応づけられ、前記変形処理のソースとなる前記変形前画像内の参照ブロックに含まれる画像を参照することにより、前記対象ブロック内に画像を生成するブロック変形処理部と、前記対象ブロックを前記変形後画像領域内の異なる位置に順次移動して、移動後の前記対象ブロック内の画像を前記ブロック変形処理部に生成させることにより、前記変形後画像の全体を生成するブロック走査部と、前記ブロック変形処理部による前記対象ブロックの画像の生成に先立って、前記対象ブロックが配置される全ての位置における前記参照ブロックの最大ブロックサイズを算出する最大ブロックサイズ算出部と、前記最大ブロックサイズ算出部により算出された最大ブロックサイズの大きさの画像を格納しうるように、ソースメモリ領域を確保するソースメモリ領域確保部と、を備え、前記ブロック変形処理部は、前記対象ブロックに対応づけられた前記参照ブロックに含まれる画像を前記ソースメモリ領域に格納するとともに、前記ソースメモリ領域に格納された前記参照ブロックに含まれる画像を参照して前記対象ブロックの画像を生成する、画像処理装置。
[Application Example 1]
An image processing apparatus, comprising: an image deformation processing unit that performs a deformation process on a pre-deformation image and generates a post-deformation image in the post-deformation image region, wherein the image deformation processing unit And a target block setting unit that sets a target block that is a destination of the transformation process, and is included in a reference block in the pre-transformation image that is associated with the target block and serves as a source of the transformation process A block deformation processing unit that generates an image in the target block by referring to the image, and sequentially moves the target block to a different position in the post-deformation image area, and the image in the target block after the movement Is generated by the block deformation processing unit, and a block scanning unit that generates the entire image after deformation, and the target block by the block deformation processing unit. Prior to the generation of the image, a maximum block size calculation unit that calculates a maximum block size of the reference block at all positions where the target block is arranged, and a maximum block size calculated by the maximum block size calculation unit A source memory area securing unit that secures a source memory area so that an image of a size can be stored, and the block transformation processing unit receives an image included in the reference block associated with the target block. An image processing apparatus that generates an image of the target block with reference to an image included in the reference block stored in the source memory area and stored in the source memory area.

この適用例では、ブロック変形処理部による対象ブロックの画像の生成に先立って、対象ブロックが配置される全ての位置における参照ブロックの最大ブロックサイズが算出される。そして、最大ブロックサイズの大きさの画像を格納しうるように、ソースメモリ領域が確保される。そのため、ソースメモリ領域には、対象ブロック内の画像の生成に要する変形前画像を格納することができるので、変形処理をブロック単位で行うことができる。変形処理をブロック単位で行うことにより、変形処理に使用されるメモリ領域を小さくすることができ、画像変形処理に要するメモリ量を低減することができる。   In this application example, prior to the generation of the image of the target block by the block deformation processing unit, the maximum block size of the reference block at all positions where the target block is arranged is calculated. Then, a source memory area is secured so that an image having the maximum block size can be stored. Therefore, since the pre-deformation image required for generating the image in the target block can be stored in the source memory area, the deformation process can be performed in units of blocks. By performing the deformation process in units of blocks, the memory area used for the deformation process can be reduced, and the amount of memory required for the image deformation process can be reduced.

[適用例2]
適用例1記載の画像処理装置であって、前記画像変形処理部は、元画像に前記変形処理をN回(Nは、2以上の整数)施すことによって、多重変形後画像を生成することが可能であり、前記最大ブロックサイズ算出部は、前記多重変形後画像の画像領域内に設定される個々の対象ブロックから参照される前記N回の変形処理におけるN個の参照ブロックの論理和をとった上限ブロックサイズを前記N回の変形処理に先立って算出する上限ブロックサイズ算出部を有し、前記メモリ領域確保部は、個々の変形処理に対応して前記上限ブロックサイズの大きさの画像を格納しうるN個のソースメモリ領域を確保し、前記N個のソースメモリ領域のうち、i(iは、1以上かつN以下の整数)番目のソースメモリ領域は、i回目の変形処理のソースとして使用され、i−1回目の変形処理のデスティネーションとして使用される、画像処理装置。
[Application Example 2]
In the image processing device according to application example 1, the image deformation processing unit may generate an image after multiple deformation by performing the deformation processing on the original image N times (N is an integer of 2 or more). The maximum block size calculation unit can calculate a logical sum of N reference blocks in the N deformation processes referenced from individual target blocks set in an image area of the multiple-deformed image. An upper limit block size calculating unit that calculates the upper limit block size prior to the N deformation processes, and the memory area securing unit generates an image of the upper limit block size corresponding to each deformation process. N source memory areas that can be stored are secured, and among the N source memory areas, the i-th source memory area (i is an integer of 1 or more and N or less) is the source of the i-th deformation process. To be used, it is used as the destination of the i-1 th transformation processing, the image processing apparatus.

この適用例では、個々の変形処理に対応して上限ブロックサイズの大きさの画像を格納しうるN個のソースメモリ領域が確保される。そのため、N回の変形処理のいずれにおいても、変形処理のデスティネーション画像の生成に要するソース画像をソースメモリ領域に格納することができる。そのため、複数回の変形処理を行う場合においても、変形処理をブロック単位で行うことができ、画像変形処理に要するメモリ量を低減することができる。   In this application example, N source memory areas capable of storing an image having an upper limit block size corresponding to each deformation process are secured. Therefore, in any of the N deformation processes, the source image required for generating the destination image of the deformation process can be stored in the source memory area. Therefore, even when the deformation process is performed a plurality of times, the deformation process can be performed in units of blocks, and the amount of memory required for the image deformation process can be reduced.

なお、本発明は、種々の態様で実現することが可能であり、例えば、画像処理方法および装置、画像変形方法および装置、画像補正方法および装置、これらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、そのコンピュータプログラムを含み搬送波内に具現化されたデータ信号、等の形態で実現することができる。   Note that the present invention can be realized in various modes, for example, an image processing method and apparatus, an image deformation method and apparatus, an image correction method and apparatus, and a function of these methods or apparatuses. The present invention can be realized in the form of a computer program, a recording medium recording the computer program, a data signal including the computer program and embodied in a carrier wave, and the like.

本発明の一実施例としての画像処理装置が適用されるプリンタの構成を概略的に示す説明図。1 is an explanatory diagram schematically showing a configuration of a printer to which an image processing apparatus as an embodiment of the present invention is applied. 画像の一覧表示を含むユーザインタフェースの一例を示す説明図である。It is explanatory drawing which shows an example of the user interface containing the list display of an image. プリンタにおいて顔形状補正印刷を行う際に実行される顔形状補正印刷ルーチンを示すフローチャート。7 is a flowchart illustrating a face shape correction printing routine executed when face shape correction printing is performed in a printer. 画像変形のタイプおよび度合いを設定するためのユーザインタフェースの一例を示す説明図。Explanatory drawing which shows an example of the user interface for setting the type and degree of image deformation. 変形領域の設定結果の一例を示す説明図。Explanatory drawing which shows an example of the setting result of a deformation | transformation area | region. 2つの変形領域のそれぞれが小領域に分割される様子を示す説明図。Explanatory drawing which shows a mode that each of two deformation | transformation area | regions is divided | segmented into a small area | region. 変形パラメータが設定される様子を示す説明図。Explanatory drawing which shows a mode that a deformation | transformation parameter is set. ステップS150において、2つの変形領域2のそれぞれについて変形パラメータが設定された様子を示す説明図。Explanatory drawing which shows a mode that the deformation | transformation parameter was set about each of the two deformation | transformation area | regions 2 in step S150. ステップS200において実行されるバンドバッファ確保処理の流れを示すフローチャート。The flowchart which shows the flow of the band buffer securing process performed in step S200. 画像を変形する際に必要なバンド幅を示す説明図。Explanatory drawing which shows the bandwidth required when transforming an image. 図9のステップS210において実行される最大バンド幅の算出処理の流れを示すフローチャート。10 is a flowchart showing the flow of a maximum bandwidth calculation process executed in step S210 of FIG. 複数の変形処理が行われる際に必要なバンド幅を示す説明図。Explanatory drawing which shows a bandwidth required when a some deformation | transformation process is performed. ステップS300において実行されるライン変形処理の流れを示すフローチャート。The flowchart which shows the flow of the line deformation | transformation process performed in step S300. ライン変形処理により変形済の画像が生成される様子を示す説明図。Explanatory drawing which shows a mode that the image already deform | transformed by the line deformation | transformation process is produced | generated. ステップS330において実行される参照範囲の変形済画像生成処理の流れを示すフローチャート。The flowchart which shows the flow of the transformed image generation process of the reference range performed in step S330. 画像の変形処理が行われる際のバンドバッファの状態を示す説明図。Explanatory drawing which shows the state of the band buffer at the time of the deformation | transformation process of an image.

次に、本発明の実施の形態を実施例に基づいて以下の順序で説明する。
A.実施例:
B.変形例:
Next, embodiments of the present invention will be described in the following order based on examples.
A. Example:
B. Variations:

A.実施例:
図1は、本発明の一実施例としての画像処理装置が適用されるプリンタ100の構成を概略的に示す説明図である。プリンタ100は、メモリカードMC等から取得した画像データに基づき画像を印刷する、いわゆるダイレクトプリントに対応したカラーインクジェットプリンタである。プリンタ100は、プリンタ100の各部を制御するCPU110と、例えばROMやRAMによって構成された内部メモリ120と、ボタンやタッチパネルにより構成された操作部140と、液晶ディスプレイにより構成された表示部150と、プリンタエンジン160と、カードインタフェース(カードI/F)170と、を備えている。プリンタ100は、さらに、他の機器(例えば、デジタルスチルカメラやパーソナルコンピュータ)とのデータ通信を行うためのインタフェースを備えているものとしてもよい。プリンタ100の各構成要素は、バスを介して互いに接続されている。
A. Example:
FIG. 1 is an explanatory diagram schematically showing the configuration of a printer 100 to which an image processing apparatus as an embodiment of the present invention is applied. The printer 100 is a color inkjet printer compatible with so-called direct printing, in which an image is printed based on image data acquired from a memory card MC or the like. The printer 100 includes a CPU 110 that controls each unit of the printer 100, an internal memory 120 configured by, for example, a ROM and a RAM, an operation unit 140 configured by buttons and a touch panel, a display unit 150 configured by a liquid crystal display, A printer engine 160 and a card interface (card I / F) 170 are provided. The printer 100 may further include an interface for performing data communication with other devices (for example, a digital still camera or a personal computer). Each component of the printer 100 is connected to each other via a bus.

プリンタエンジン160は、印刷データに基づき印刷を行う印刷機構である。カードインタフェース170は、カードスロット172に挿入されたメモリカードMCとの間でデータのやり取りを行うためのインタフェースである。なお、本実施例では、メモリカードMCにRGBデータとしての画像データが格納されており、プリンタ100は、カードインタフェース170を介してメモリカードMCに格納された画像データの取得を行う。   The printer engine 160 is a printing mechanism that performs printing based on print data. The card interface 170 is an interface for exchanging data with the memory card MC inserted in the card slot 172. In the present embodiment, image data as RGB data is stored in the memory card MC, and the printer 100 acquires the image data stored in the memory card MC via the card interface 170.

内部メモリ120には、顔形状補正部200と、表示処理部310と、印刷処理部320とが格納されている。顔形状補正部200は、所定のオペレーティングシステムの下で、後述する顔形状補正処理を実行するためのコンピュータプログラムである。表示処理部310は、表示部150を制御して、表示部150上に処理メニューやメッセージを表示させるディスプレイドライバである。印刷処理部320は、画像データから印刷データを生成し、プリンタエンジン160を制御して、印刷データに基づく画像の印刷を実行するためのコンピュータプログラムである。CPU110は、内部メモリ120から、これらのプログラムを読み出して実行することにより、これら各部の機能を実現する。   The internal memory 120 stores a face shape correction unit 200, a display processing unit 310, and a print processing unit 320. The face shape correction unit 200 is a computer program for executing a face shape correction process described later under a predetermined operating system. The display processing unit 310 is a display driver that controls the display unit 150 to display processing menus and messages on the display unit 150. The print processing unit 320 is a computer program for generating print data from image data, controlling the printer engine 160, and printing an image based on the print data. The CPU 110 implements the functions of these units by reading and executing these programs from the internal memory 120.

顔形状補正部200は、プログラムモジュールとして、変形態様設定部210と、変形領域設定部220と、変形領域分割部230と、変形パラメータ設定部240と、分割領域変形部250と、を含んでいる。分割領域変形部250は、最大バンド幅算出部252と、バンドバッファ割付部254と、変形処理部256と、を含んでいる。これらの各部の機能については、後述する。   The face shape correction unit 200 includes a deformation mode setting unit 210, a deformation region setting unit 220, a deformation region dividing unit 230, a deformation parameter setting unit 240, and a divided region deformation unit 250 as program modules. . The divided region transformation unit 250 includes a maximum bandwidth calculation unit 252, a band buffer allocation unit 254, and a transformation processing unit 256. The functions of these units will be described later.

内部メモリ120には、また、分割点配置パターンテーブル410と分割点移動テーブル420とが格納されている。バンドバッファ430は、後述するようにバンドバッファ割付部254により、内部メモリ120内に確保される記憶領域である。分割点配置パターンテーブル410および分割点移動テーブル420の内容ならびにバンドバッファ430の機能については、後述する。   The internal memory 120 also stores a dividing point arrangement pattern table 410 and a dividing point movement table 420. The band buffer 430 is a storage area secured in the internal memory 120 by the band buffer allocation unit 254 as will be described later. The contents of the dividing point arrangement pattern table 410 and the dividing point movement table 420 and the function of the band buffer 430 will be described later.

プリンタ100は、メモリカードMCに格納された画像データに基づき、画像の印刷を行う。カードスロット172にメモリカードMCが挿入されると、表示処理部310により、メモリカードMCに格納された画像の一覧表示を含むユーザインタフェースが表示部150に表示される。図2は、画像の一覧表示を含むユーザインタフェースの一例を示す説明図である。なお、本実施例では、画像の一覧表示は、メモリカードMCに格納された画像データ(画像ファイル)に含まれるサムネイル画像を用いて実現される。図2に示すユーザインタフェースには、8つのサムネイル画像TN1〜TN8と、5つのボタンBN1〜BN5が表示されている。   The printer 100 prints an image based on the image data stored in the memory card MC. When the memory card MC is inserted into the card slot 172, the display processing unit 310 displays a user interface including a list display of images stored in the memory card MC on the display unit 150. FIG. 2 is an explanatory diagram illustrating an example of a user interface including a list display of images. In this embodiment, the list display of images is realized using thumbnail images included in image data (image files) stored in the memory card MC. In the user interface shown in FIG. 2, eight thumbnail images TN1 to TN8 and five buttons BN1 to BN5 are displayed.

ユーザが、図2に示すユーザインタフェース上で画像を選択し、通常印刷ボタンBN3を操作すると、プリンタ100は、選択された画像を通常通り印刷する通常印刷処理を実行する。一方、ユーザがユーザインタフェース上で、画像を選択し、顔形状補正印刷ボタンBN4を操作すると、プリンタ100は、選択された画像について、画像中の顔の形状を補正して補正後の画像を印刷する顔形状補正印刷処理を実行する。図2の例では、サムネイル画像TN1が選択され、顔形状補正印刷ボタンBN4が操作されている。そのため、プリンタ100は、サムネイル画像TN1に対応する画像について顔の形状を補正して補正後の画像を印刷する。   When the user selects an image on the user interface shown in FIG. 2 and operates the normal print button BN3, the printer 100 executes normal print processing for printing the selected image normally. On the other hand, when the user selects an image on the user interface and operates the face shape correction print button BN4, the printer 100 corrects the shape of the face in the image and prints the corrected image for the selected image. The face shape correction printing process is executed. In the example of FIG. 2, the thumbnail image TN1 is selected, and the face shape correction print button BN4 is operated. Therefore, the printer 100 corrects the face shape of the image corresponding to the thumbnail image TN1, and prints the corrected image.

図3は、プリンタ100が顔形状補正印刷を行う際に実行される顔形状補正印刷処理の流れを示すフローチャートである。この顔形状補正印刷処理は、上述のように、図2に示すユーザインタフェース上でのユーザの顔形状補正印刷ボタンBN4の操作に応じて、プリンタ100により実行される。   FIG. 3 is a flowchart illustrating a flow of face shape correction printing processing executed when the printer 100 performs face shape correction printing. As described above, the face shape correction printing process is executed by the printer 100 in accordance with the user's operation of the face shape correction print button BN4 on the user interface shown in FIG.

ステップS110において、顔形状補正部200(図1)は、顔形状補正処理の対象となる対象画像を設定する。顔形状補正部200は、図2に示したユーザインタフェースにおいてユーザにより選択されたサムネイル画像TN1に対応する画像を対象画像として設定する。なお、以下では、顔形状の補正の対象となる元の画像を「元画像」とも呼び、元画像を表す画像データを「元画像データ」とも呼ぶ。   In step S110, the face shape correction unit 200 (FIG. 1) sets a target image to be subjected to face shape correction processing. The face shape correction unit 200 sets an image corresponding to the thumbnail image TN1 selected by the user in the user interface shown in FIG. 2 as a target image. In the following, the original image that is the target of face shape correction is also referred to as “original image”, and the image data representing the original image is also referred to as “original image data”.

ステップS120では、変形態様設定部210(図1)が、顔形状補正のための画像変形のタイプと画像変形の度合いとを設定する。変形態様設定部210は、画像変形のタイプおよび度合いを設定するためのユーザインタフェースを表示部150に表示するように表示処理部310に指示し、当該ユーザインタフェースを通じてユーザにより指定された画像変形のタイプおよび度合いを選択し、処理に使用する画像変形タイプおよび度合いとして設定する。   In step S120, the deformation mode setting unit 210 (FIG. 1) sets the image deformation type and the degree of image deformation for face shape correction. The deformation mode setting unit 210 instructs the display processing unit 310 to display a user interface for setting the type and degree of image deformation on the display unit 150, and the image deformation type designated by the user through the user interface. And the degree are selected and set as the image deformation type and degree used for processing.

図4は、画像変形のタイプおよび度合いを設定するためのユーザインタフェースの一例を示す説明図である。図4に示すように、このユーザインタフェースには、画像変形タイプを設定するためのインタフェースと、補正結果のプレビュー画像と、が含まれている。画像変形タイプとしては、顔の形状をシャープにする変形タイプ「タイプA」や、目の形状を大きくする変形タイプ「タイプB」等の複数の選択肢が予め設定されている。ユーザは、このインタフェースを操作することにより、画像変形のタイプを複数の選択肢から選択する。変形態様設定部210は、ユーザにより選択された画像変形タイプを、実際の処理に使用する画像変形タイプとして設定する。   FIG. 4 is an explanatory diagram showing an example of a user interface for setting the type and degree of image deformation. As shown in FIG. 4, the user interface includes an interface for setting the image deformation type and a preview image of the correction result. As the image deformation type, a plurality of options such as a deformation type “type A” that sharpens the shape of the face and a deformation type “type B” that increases the shape of the eyes are set in advance. The user operates the interface to select the image deformation type from a plurality of options. The deformation mode setting unit 210 sets the image deformation type selected by the user as an image deformation type used for actual processing.

また、図4に示すユーザインタフェースには、画像変形の度合い(程度)を設定するためのインタフェースが含まれている。画像変形の度合いとしては、例えば、強(S)、中(M)、弱(W)の3段階の選択肢が予め設定されている。ユーザは、このインタフェースを操作して画像変形の度合いを指定する。変形態様設定部210は、ユーザにより指定された画像変形の度合いを、実際の処理に使用する画像変形の度合いとして設定する。ユーザインタフェースに設けられたチェックボックスは、ユーザが変形態様の詳細指定を希望する場合にチェックされる。   The user interface shown in FIG. 4 includes an interface for setting the degree (degree) of image deformation. As the degree of image deformation, for example, three levels of options of strong (S), medium (M), and weak (W) are set in advance. The user operates this interface to specify the degree of image deformation. The deformation mode setting unit 210 sets the degree of image deformation designated by the user as the degree of image deformation used for actual processing. A check box provided in the user interface is checked when the user desires detailed designation of the deformation mode.

ユーザが、図4に示すユーザインタフェースに設けられた種々のインタフェースを操作すると、顔形状補正部は元画像を縮小した縮小画像に変形処理を施し、変形処理が施された画像がサムネイル画像として表示される。但し、サムネイル画像の表示を省略することも可能である。   When the user operates various interfaces provided in the user interface shown in FIG. 4, the face shape correction unit performs a deformation process on the reduced image obtained by reducing the original image, and the deformed image is displayed as a thumbnail image. Is done. However, it is also possible to omit the display of thumbnail images.

なお、以下では、画像変形のタイプとして顔の形状をシャープにするための変形タイプ「タイプA」が設定され、画像変形の度合いとして程度「中」の度合いが設定され、ユーザによる詳細指定の希望はなかったものとして説明を行う。   In the following, the deformation type “type A” for sharpening the shape of the face is set as the image deformation type, the degree of “medium” is set as the degree of image deformation, and the user desires detailed designation The explanation will be given assuming that there was no.

ステップS130(図3)において、変形領域設定部220は、顔形状補正のための画像変形処理を施す領域(変形領域)を設定する。変形領域の設定では、まず、顔領域の検出が行われる。検出された顔領域は、位置や方向が調整される。そして、位置や方向が調整された結果を基に変形領域が設定される。なお、顔領域は、例えばテンプレートを利用したパターンマッチングによる方法(特開2004−318204参照)といった公知の顔検出方法により検出される。   In step S130 (FIG. 3), the deformation area setting unit 220 sets an area (deformation area) on which image deformation processing for face shape correction is performed. In setting the deformation area, first, the face area is detected. The position and direction of the detected face area are adjusted. And a deformation | transformation area | region is set based on the result in which the position and direction were adjusted. The face area is detected by a known face detection method such as a pattern matching method using a template (see Japanese Patent Application Laid-Open No. 2004-318204).

図5は、変形領域の設定結果の一例を示す説明図である。図5(a)は、顔領域の検出結果を示しており、図5(b)は、検出された顔領域に基づいて設定される変形領域を示している。図5の例では、対象画像TIには2人の人物が含まれている。そのため、図5(a)の太線で示すように、対象画像TIから2人の人物に対応して2つの顔領域FA1,FA2が検出される。これらの顔領域FA1,FA2は、それぞれの目と鼻と口の画像を含む矩形の領域となっている。図5(b)の破線は、2つの顔領域FA1,FA2を示しており、太線は、2つの顔領域FA1,FA2のそれぞれについて設定された2つの変形領域TA1,TA2を示している。   FIG. 5 is an explanatory diagram showing an example of the result of setting the deformation area. 5A shows the detection result of the face area, and FIG. 5B shows the deformation area set based on the detected face area. In the example of FIG. 5, the target image TI includes two persons. Therefore, as indicated by the thick line in FIG. 5A, two face areas FA1 and FA2 corresponding to two persons are detected from the target image TI. These face areas FA1 and FA2 are rectangular areas each including an image of each eye, nose and mouth. The broken line in FIG. 5B indicates two face areas FA1 and FA2, and the thick line indicates two deformation areas TA1 and TA2 set for each of the two face areas FA1 and FA2.

図3のステップS140において、変形領域分割部230は、ステップS130において設定された変形領域を複数の小領域に分割する。具体的には、変形領域分割部230は、ステップS130において設定された変形領域に対して分割点を配置する。そして、分割点を結ぶ直線を用いて、変形領域を複数の小領域に分割する。なお、変形領域内における分割点の配置態様(分割点の個数および位置)は、分割点配置パターンテーブル410(図1)により、ステップS120(図3)において設定される変形タイプと対応付けて定義されている。図4に示すように、変形タイプとして顔をシャープにするための変形「タイプA」が選択されている場合には、変形領域は15個の矩形の小領域に分割される。   In step S140 of FIG. 3, the deformation area dividing unit 230 divides the deformation area set in step S130 into a plurality of small areas. Specifically, the deformation area dividing unit 230 arranges dividing points with respect to the deformation area set in step S130. And a deformation | transformation area | region is divided | segmented into a several small area | region using the straight line which ties a dividing point. Note that the arrangement mode (number and position of division points) of the division points in the deformation area is defined in association with the deformation type set in step S120 (FIG. 3) by the division point arrangement pattern table 410 (FIG. 1). Has been. As shown in FIG. 4, when the deformation “type A” for sharpening the face is selected as the deformation type, the deformation area is divided into 15 rectangular small areas.

図6は、図3のステップS130において設定された2つの変形領域TA1,TA2のそれぞれが、小領域に分割される様子を示す説明図である。図6(a)は、図3のステップS130において設定された2つの変形領域TA1,TA2の配置を示している。図6(b)は、ステップS140において、2つの変形領域TA1,TA2のそれぞれが小領域に分割された様子を示している。本実施例では、変形タイプとして変形「タイプA」が選択されている。そのため、図6(b)に示すように、2つの変形領域TA1,TA2は、それぞれ、15個の矩形の小領域に分割される。   FIG. 6 is an explanatory diagram showing how each of the two deformation areas TA1, TA2 set in step S130 of FIG. 3 is divided into small areas. FIG. 6A shows the arrangement of the two deformation areas TA1 and TA2 set in step S130 of FIG. FIG. 6B shows how each of the two deformation areas TA1 and TA2 is divided into small areas in step S140. In this embodiment, the deformation “type A” is selected as the deformation type. Therefore, as shown in FIG. 6B, the two deformation areas TA1 and TA2 are each divided into 15 rectangular small areas.

図3のステップS150において、変形パラメータ設定部240は、変形領域に変形処理を施す際の種々のパラメータを設定する。具体的には、変形領域の小領域への分割に使用された分割点の移動態様(移動方向および移動距離)を設定する。分割点の移動態様は、分割点移動テーブル420(図1)により、ステップS120(図3)において設定される変形タイプと変形の度合いとの組み合わせに対応付けて、予め定められている。上述したように、変形タイプとして顔をシャープにするための変形「タイプA」(図4参照)が設定され、変形度合いとして程度「中」の度合いが設定されている場合には、分割点の移動態様は、これらの変形タイプおよび変形度合いの組み合わせに対応付けられた移動方向および移動距離に設定される。   In step S150 of FIG. 3, the deformation parameter setting unit 240 sets various parameters when performing deformation processing on the deformation area. Specifically, the movement mode (movement direction and movement distance) of the dividing points used for dividing the deformation area into small areas is set. The movement mode of the dividing points is determined in advance by the dividing point movement table 420 (FIG. 1) in association with the combination of the deformation type and the degree of deformation set in step S120 (FIG. 3). As described above, when the deformation “type A” (see FIG. 4) for sharpening the face is set as the deformation type and the degree of “medium” is set as the deformation degree, The movement mode is set to a movement direction and a movement distance associated with a combination of these deformation types and deformation degrees.

図7は、変形パラメータが設定される様子を示す説明図である。図7(a)は、変形パラメータ設定部240により参照される分割点移動テーブル420の内容の一例を示している。図7(b)は、図7(a)に示す分割点移動テーブル420に従った分割点の移動態様を示している。   FIG. 7 is an explanatory diagram showing how the deformation parameters are set. FIG. 7A shows an example of the contents of the dividing point movement table 420 referred to by the deformation parameter setting unit 240. FIG. 7B shows how the division points move according to the division point movement table 420 shown in FIG.

分割点移動テーブル420には、各分割点D11〜D42について、基準線RLと直交する方向(H方向)および基準線RLと平行な方向(V方向)に沿った移動量が示されている。ここで基準線RLとは、変形領域TAを垂直に二分する方向であり、顔の上下方向に相当する方向である。分割点移動テーブル420に示された移動量の単位は、画像上の画素ピッチPPである。また、H方向については、向かって右側への移動量が正の値として表され、向かって左側への移動量が負の値として表され、V方向については、上方への移動量が正の値として表され、下方への移動量が負の値として表される。例えば、分割点D11は、H方向に沿って右側に画素ピッチPPの7倍の距離だけ移動され、V方向に沿って上方に画素ピッチPPの14倍の距離だけ移動される。また、例えば分割点D22は、H方向およびV方向共に移動量がゼロであるため、移動されない。   The dividing point movement table 420 shows the amount of movement along the direction (H direction) orthogonal to the reference line RL and the direction parallel to the reference line RL (V direction) for each of the dividing points D11 to D42. Here, the reference line RL is a direction that bisects the deformation area TA, and is a direction that corresponds to the vertical direction of the face. The unit of the movement amount shown in the dividing point movement table 420 is the pixel pitch PP on the image. For the H direction, the amount of movement to the right side is represented as a positive value, the amount of movement to the left side is represented as a negative value, and for the V direction, the amount of movement upward is positive. It is expressed as a value, and the downward movement amount is expressed as a negative value. For example, the dividing point D11 is moved to the right along the H direction by a distance that is seven times the pixel pitch PP, and is moved upward along the V direction by a distance that is 14 times the pixel pitch PP. For example, the division point D22 is not moved because the movement amount is zero in both the H direction and the V direction.

このように、分割点の移動態様が設定されることにより、変形領域TA内の分割点は、図7(b)に示すように、白丸で示す位置から黒丸で示す位置に移動する。なお、図7(b)において、移動されない分割点の位置も黒丸で示している。このように、変形パラメータを設定することにより、変形処理において、変形領域TA内の破線で示す小領域内の画像は、実線で示す小領域内の画像に変形される。例えば、分割点D11,D21,D22,D12を頂点とする小領域(ハッチングを付して示す小領域)内の画像は、分割点D'11,D'21,D22,D'12を頂点とする小領域内の画像に変形される。   Thus, by setting the movement mode of the dividing points, the dividing points in the deformation area TA move from the positions indicated by white circles to the positions indicated by black circles as shown in FIG. 7B. In FIG. 7B, the positions of the division points that are not moved are also indicated by black circles. As described above, by setting the deformation parameter, in the deformation process, the image in the small area indicated by the broken line in the deformation area TA is deformed to the image in the small area indicated by the solid line. For example, an image in a small area (small area shown with hatching) having the divide points D11, D21, D22, and D12 as vertices has the divide points D′ 11, D′ 21, D22, and D′ 12 as vertices. It is transformed into an image in a small area.

小領域内の画像の変形は、変形後の小領域中の点を変形前の小領域中の点に対応づけること(マッピング)により行われる。マッピングによる変形では、変形後の小領域中の画素(対象画素)の位置(対象画素位置)から、変形前の小領域中の対応する画素(参照画素)の位置(参照位置)が算出される。そして、変形前の小領域における参照画素の画素値が、対象画素の画素値に設定されることにより、小領域内の画像の変形が行われる。なお、参照位置が変形前の小領域の画素の位置からずれている場合、対象画素の画素値には、参照位置の近傍の画素から補間処理(例えば、バイリニア法やバイキュービック法)により算出された画素値が設定される。なお、以下では、このように補間処理により画素値が算出される仮想的な画素も参照画素と呼ぶ。   The deformation of the image in the small area is performed by mapping (mapping) a point in the small area after the deformation to a point in the small area before the deformation. In the deformation by mapping, the position (reference position) of the corresponding pixel (reference pixel) in the small area before deformation is calculated from the position (target pixel position) of the pixel (target pixel) in the small area after deformation. . Then, by setting the pixel value of the reference pixel in the small area before the deformation to the pixel value of the target pixel, the image in the small area is deformed. When the reference position is shifted from the position of the pixel in the small area before the deformation, the pixel value of the target pixel is calculated from the pixels near the reference position by interpolation processing (for example, bilinear method or bicubic method). Set pixel values. In the following, a virtual pixel whose pixel value is calculated by interpolation processing in this way is also referred to as a reference pixel.

なお、図6(a)に示すように、ステップS130において設定された2つの変形領域TA1,TA2は、互いに重複した状態となっている。このように変形領域が重複する場合、変形パラメータ設定部240は、ステップS140において、重複する変形領域の変形の優先順位を決定する。変形の優先順位は、変形領域の位置等により設定される。この場合、例えば、変形領域の上端位置がより上方の変形領域TA2が優先される。但し、変形の優先順位は、変形領域の大きさ等の他のパラメータに基づいて設定するものとしてもよい。なお、以下では、より優先順位の高い変形領域を「上位の」変形領域とも呼び、上位の変形領域を変形する処理を「上位の」変形処理とも呼ぶ。また、より優先順位の低い変形領域を「下位の」変形領域とも呼び、下位の変形領域を変形する処理を「下位の」変形処理とも呼ぶ。   As shown in FIG. 6A, the two deformation areas TA1 and TA2 set in step S130 are in an overlapping state. When the deformation areas overlap in this way, the deformation parameter setting unit 240 determines the priority of deformation of the overlapping deformation areas in step S140. The priority of deformation is set by the position of the deformation area and the like. In this case, for example, the deformation area TA2 in which the upper end position of the deformation area is higher is given priority. However, the priority order of deformation may be set based on other parameters such as the size of the deformation area. In the following description, a deformation area having a higher priority is also referred to as an “upper” deformation area, and a process for deforming an upper deformation area is also referred to as an “upper” deformation process. In addition, a deformation area having a lower priority is also referred to as a “lower” deformation area, and a process for deforming a lower deformation area is also referred to as a “lower” deformation process.

図8は、ステップS150において、2つの変形領域TA1,TA2のそれぞれについて変形パラメータが設定された様子を示す説明図である。図8に示すように、2つの変形領域TA1,TA2がそれぞれ有する白丸で示す分割点は、黒丸で示す位置に移動される。そのため、点線で示す2つの変形領域TA1,TA2中の小領域は、それぞれ実線で示す小領域に変形される。   FIG. 8 is an explanatory diagram showing how the deformation parameters are set for each of the two deformation areas TA1 and TA2 in step S150. As shown in FIG. 8, the dividing points indicated by the white circles of the two deformation areas TA1 and TA2 are moved to the positions indicated by the black circles. For this reason, the small areas in the two deformation areas TA1 and TA2 indicated by the dotted lines are respectively transformed into small areas indicated by the solid lines.

図3のステップS200において、バンドバッファ割付部254(図1)は、内部メモリ120(図1)内にバンドバッファを確保する。図9は、ステップS200において実行されるバンドバッファ確保処理の流れを示すフローチャートである。   In step S200 of FIG. 3, the band buffer allocating unit 254 (FIG. 1) secures a band buffer in the internal memory 120 (FIG. 1). FIG. 9 is a flowchart showing the flow of the band buffer securing process executed in step S200.

ステップS210において、バンドバッファ割付部254は、最大バンド幅を算出する。ここで、バンドとは、後述する変形処理において使用される画像の横方向に延びた帯状の領域であり、バンド幅とは、バンドに含まれる縦方向の画素数をいう。   In step S210, the band buffer allocation unit 254 calculates the maximum bandwidth. Here, the band is a band-like region extending in the horizontal direction of an image used in a deformation process described later, and the band width refers to the number of pixels in the vertical direction included in the band.

図10は、画像を変形する際に必要なバンド幅を示す説明図である。図10の例では、図10(a)に示す図形(矢印)の下方の2個の頂点が、図10(b)に示すように移動されるように、画像が変形されている。図10(b)の四角は、移動されない頂点V1〜V3,V6,V7を示している。図10(b)の白丸は、変形前の頂点V4,V5の位置を示しており、黒丸は変形後の頂点V4’,V5’の位置を示している。   FIG. 10 is an explanatory diagram showing a bandwidth necessary for deforming an image. In the example of FIG. 10, the image is deformed so that the two vertices below the figure (arrow) shown in FIG. 10A are moved as shown in FIG. The squares in FIG. 10B indicate vertices V1 to V3, V6, and V7 that are not moved. The white circles in FIG. 10B indicate the positions of the vertices V4 and V5 before the deformation, and the black circles indicate the positions of the vertices V4 'and V5' after the deformation.

変形後の頂点V4’を対象画素とした場合には、参照画素は、頂点V4となる。そのため、図10(a)から図10(b)のように変形を行う場合において、対象画素V4’の画素値を決定するために、参照画素V4の画素値が参照される。従って、図10に示すように画像を変形する場合には、対象画素V4’と、対象画素V4’よりも下方に距離dd(以下、「下側変位」とも呼ぶ)離れた参照画素V4がバンドに含まれるようにバンド幅が設定される。同様に、対象画素V5’の画素値を決定するために、参照画素V5の画素値が参照される。従って、図10に示すように画像を変形する場合には、対象画素V5’と、対象画素V5’から上方に距離du(以下、「上側変位」とも呼ぶ)離れた参照画素V5がバンドに含まれるようにバンド幅が設定される。   When the transformed vertex V4 'is the target pixel, the reference pixel is the vertex V4. Therefore, in the case of performing the transformation as shown in FIG. 10A to FIG. 10B, the pixel value of the reference pixel V4 is referred to in order to determine the pixel value of the target pixel V4 '. Therefore, when the image is deformed as shown in FIG. 10, the target pixel V4 ′ and the reference pixel V4 that is a distance dd (hereinafter also referred to as “lower displacement”) below the target pixel V4 ′ are banded. The bandwidth is set to be included in. Similarly, the pixel value of the reference pixel V5 is referred to in order to determine the pixel value of the target pixel V5 '. Therefore, when the image is deformed as shown in FIG. 10, the target pixel V5 ′ and the reference pixel V5 that is away from the target pixel V5 ′ by a distance du (hereinafter also referred to as “upper displacement”) are included in the band. The bandwidth is set so that

図11は、図9のステップS210において実行される最大バンド幅の算出処理の流れを示すフローチャートである。ステップS211では、最大バンド幅算出部252(図1)が、上側変位と下側変位の最大値をいずれもゼロに設定する。次いで、最大バンド幅算出部252は、対象画素の左上端の画素を対象画素に設定する(ステップS212)。   FIG. 11 is a flowchart showing the flow of the maximum bandwidth calculation process executed in step S210 of FIG. In step S211, the maximum bandwidth calculation unit 252 (FIG. 1) sets both the maximum values of the upper side displacement and the lower side displacement to zero. Next, the maximum bandwidth calculation unit 252 sets the upper left pixel of the target pixel as the target pixel (step S212).

ステップS213において、最大バンド幅算出部252は、対象画素の参照位置を取得する。そして、ステップS214において、参照位置と対象画素位置の上側変位あるいは下側変位(以下、上側変位と下側変位とを併せて、単に「変位」とも呼ぶ)を取得する。取得された変位は、最大バンド幅算出部252により変位の最大値と比較されて変位の最大値が更新される(ステップS215)。   In step S213, the maximum bandwidth calculation unit 252 acquires the reference position of the target pixel. In step S214, an upper displacement or a lower displacement (hereinafter, the upper displacement and the lower displacement are simply referred to as “displacement”) between the reference position and the target pixel position is acquired. The acquired displacement is compared with the maximum displacement value by the maximum bandwidth calculation unit 252 and the maximum displacement value is updated (step S215).

ステップS216において、最大バンド幅算出部252は、上位の変形処理があるか否かを判断する。上位の変形処理があると判断された場合には、制御はステップS217に移される。一方、上位の変形処理がないと判断された場合には、制御はステップS218に移される。   In step S216, the maximum bandwidth calculation unit 252 determines whether there is a higher-order deformation process. If it is determined that there is a higher-order transformation process, control is transferred to step S217. On the other hand, if it is determined that there is no higher-order deformation process, control is transferred to step S218.

ステップS217において、最大バンド幅算出部252は、上位の変形処理による参照画素の参照位置を取得する。参照画素の参照位置の取得後、制御はステップS214に戻され、参照位置の取得の対象となる上位の変形処理が無くなるまで、ステップS214〜S217が繰り返し実行される。   In step S217, the maximum bandwidth calculation unit 252 acquires the reference position of the reference pixel by the higher-order deformation process. After obtaining the reference position of the reference pixel, the control is returned to step S214, and steps S214 to S217 are repeatedly executed until there is no higher-order deformation process for which the reference position is to be obtained.

図12は、複数の変形処理が行われる際に必要なバンド幅を示す説明図である。図12の例では、第1の変形処理と第2の変形処理との2回の変形処理が行われる。図12(a)は、上位の変形処理である第1の変形処理が行われる様子を示し、図12(b)は、下位の変形処理である第2の変形処理が行われる様子を示している。図12(c)は、第1の変形処理の後第2の変形処理が行われた状態を示している。なお、図12(a)〜図12(c)において、破線は変形処理前の小領域の形状を表しており、実線は変形処理後の小領域の形状を表している。   FIG. 12 is an explanatory diagram showing a bandwidth required when a plurality of deformation processes are performed. In the example of FIG. 12, two deformation processes, a first deformation process and a second deformation process, are performed. FIG. 12A shows a state in which the first deformation process, which is a higher-order deformation process, is performed, and FIG. 12B shows a state in which a second deformation process, which is a lower-order deformation process, is performed. Yes. FIG. 12C shows a state in which the second deformation process is performed after the first deformation process. In FIGS. 12A to 12C, a broken line represents the shape of the small area before the deformation process, and a solid line represents the shape of the small area after the deformation process.

図12(a)に示すように、第1の変形処理では、白四角を頂点とする矩形の小領域は、黒四角を頂点とする四角形の小領域に変形される。そのため、白丸で示す変形前の小領域中の画素P0は、第1の変形処理により、距離d1上方の画素P1に移動される。同様に、図12(b)に示すように、第2の変形処理では、白三角を頂点とする矩形の小領域は、黒三角を頂点とする四角形の小領域に変形され、白丸で示す変形前の小領域中の画素P1は距離d2上方の画素P2に移動される。   As shown in FIG. 12A, in the first deformation process, a small rectangular area having a white square as a vertex is transformed into a rectangular small area having a black square as a vertex. Therefore, the pixel P0 in the small region before deformation indicated by a white circle is moved to the pixel P1 above the distance d1 by the first deformation processing. Similarly, as shown in FIG. 12B, in the second deformation process, a small rectangular area having a white triangle as a vertex is transformed into a rectangular small area having a black triangle as a vertex, and is represented by a white circle. The pixel P1 in the previous small area is moved to the pixel P2 above the distance d2.

このように、第1の変形処理と第2の変形処理を順次行うことにより、図12(c)に示すように、画素P0の位置は、画素P2の位置に移動される。図11のステップS213において、対象画素が画素P2に設定された場合、ステップS214において、まず下側変位d2が取得される。そして、上位の変形処理(第1の変形処理)があるため、ステップS217において、参照画素(画素P1)の参照位置、すなわち、画素P0の位置が取得される。そのため、ステップS214において、距離d1と距離d2の和が対象画素P2の下側変位として取得され、ステップS215において変位の最大値が更新される。このように、ステップS214〜S217を繰り返し実行することにより、複数の変形処理を順次行う場合においても、上側変位と、下側変位と、対象画素の幅(すなわち、1)を足しあわせた幅のバンドを使用することにより、対象画素P2の変形処理を行うことができる。   Thus, by sequentially performing the first deformation process and the second deformation process, the position of the pixel P0 is moved to the position of the pixel P2, as shown in FIG. If the target pixel is set to the pixel P2 in step S213 in FIG. 11, first, the lower displacement d2 is acquired in step S214. Since there is a higher-order deformation process (first deformation process), in step S217, the reference position of the reference pixel (pixel P1), that is, the position of the pixel P0 is acquired. Therefore, in step S214, the sum of the distance d1 and the distance d2 is acquired as the lower displacement of the target pixel P2, and the maximum value of the displacement is updated in step S215. As described above, by repeatedly executing Steps S214 to S217, even when a plurality of deformation processes are performed sequentially, the upper displacement, the lower displacement, and the width of the target pixel (that is, 1) are added. By using the band, the deformation process of the target pixel P2 can be performed.

図11のステップS218において、最大バンド幅算出部252は、バンド幅の算出が対象画像の全ての画素について行われたか否かを判断する。対象画像の全ての画素についてバンド幅の算出が行われた場合、制御は図9のバンドバッファ確保処理に戻される。一方、バンド幅の算出が行われていない画素がある場合、制御はステップS219に移される。   In step S218 of FIG. 11, the maximum bandwidth calculation unit 252 determines whether the bandwidth calculation has been performed for all the pixels of the target image. When the bandwidth is calculated for all the pixels of the target image, the control is returned to the band buffer securing process in FIG. On the other hand, if there is a pixel whose bandwidth has not been calculated, control is transferred to step S219.

ステップS219において、最大バンド幅算出部252は、対象画素の次の画素を新たな対象画素に設定する。具体的には、対象画素が画像の右端の画素でない場合、対象画素の右側の画素が新たな対象画素に設定される。一方、対象画素が対象画像の右端の画素である場合、対象画素の直下の列の左端の画素が新たな対象画素に設定される。そして、ステップS218において、対象画像の全ての画素についてバンド幅の算出が行われたと判断されるまで、ステップS213〜S219が繰り返し実行される。   In step S219, the maximum bandwidth calculation unit 252 sets a pixel next to the target pixel as a new target pixel. Specifically, when the target pixel is not the rightmost pixel of the image, the pixel on the right side of the target pixel is set as a new target pixel. On the other hand, when the target pixel is the rightmost pixel of the target image, the leftmost pixel in the column immediately below the target pixel is set as a new target pixel. In step S218, steps S213 to S219 are repeatedly executed until it is determined that the bandwidth has been calculated for all the pixels of the target image.

このようにして、最大バンド幅算出部252は、全ての画素について必要となるバンド幅の最大値(最大バンド幅)を算出する。最大バンド幅の算出の後、図9のステップS220において、バンドバッファ割付部254(図1)は、変形前の画像である元画像を格納するための最大バンド幅のバンドバッファ(元画像バッファ)を確保する。次いで、ステップS230において、バンドバッファ割付部254は、変形処理後の画像を格納するための最大バンド幅のバンドバッファ(変形画像バッファ)を変形処理毎に確保する。変形画像バッファの確保の後、制御は図3の顔形状補正印刷処理に戻される。なお、変形画像バッファは、変形処理が行われた画像が生成される領域であるので、「変形後画像領域」とも呼ぶことができる。   In this way, the maximum bandwidth calculation unit 252 calculates the maximum bandwidth value (maximum bandwidth) required for all pixels. After the calculation of the maximum bandwidth, in step S220 of FIG. 9, the band buffer allocating unit 254 (FIG. 1) uses the maximum bandwidth band buffer (original image buffer) for storing the original image that is the image before the transformation. Secure. Next, in step S230, the band buffer allocating unit 254 secures a band buffer (deformed image buffer) having the maximum bandwidth for storing the image after the deformation process for each deformation process. After securing the deformed image buffer, control is returned to the face shape correction printing process of FIG. Note that the deformed image buffer is an area where an image subjected to the deformation process is generated, and thus can also be referred to as a “deformed image area”.

図3のステップS300において、変形処理部256(図1)は、1ライン中の個々の画素の画素値を設定することにより画像を変形するライン変形処理を行う。ここで、ラインとは、画像の横方向全体に延びた縦1画素分の画素列をいう。   In step S300 of FIG. 3, the deformation processing unit 256 (FIG. 1) performs line deformation processing for deforming an image by setting pixel values of individual pixels in one line. Here, the line refers to a pixel column of one vertical pixel extending in the entire horizontal direction of the image.

図13は、ステップS300において実行されるライン変形処理の流れを示すフローチャートである。図14は、ライン変形処理により変形済の画像が生成される様子を示す説明図である。なお、図14の左側の列は、それぞれ変形前の画像を表している。また、図14の中央の列は、それぞれ第1の変形処理後の画像を表し、右側の列は、それぞれ第2の変形処理後の画像を表している。   FIG. 13 is a flowchart showing the flow of the line deformation process executed in step S300. FIG. 14 is an explanatory diagram showing a state where a deformed image is generated by the line deformation process. Note that the left column in FIG. 14 represents an image before deformation. Further, the middle column in FIG. 14 represents the image after the first deformation process, and the right column represents the image after the second deformation process.

図14(a)は、最初のライン変形処理が行われる前の状態を示している。最初のライン変形処理は、画像の上端のラインに対して行われる。そのため、図14(a)に示すように、生成ライン(ハッチング部)は、画像の上端のラインに設定される。なお、図14(a)に示す状態においては、画素値を設定するライン変形処理が行われていないため、第1の変形処理後の画像と第2の変形処理後の画像は、いずれも生成されていない状態となっている。   FIG. 14A shows a state before the first line deformation process is performed. The first line transformation process is performed on the top line of the image. Therefore, as shown in FIG. 14A, the generation line (hatched portion) is set to the uppermost line of the image. In the state shown in FIG. 14A, since the line deformation process for setting pixel values is not performed, both the image after the first deformation process and the image after the second deformation process are generated. It has not been done.

ステップS310において、変形処理部256は、変形処理の対象(変形処理の「デスティネーション」)となるラインの参照範囲(変形処理の「ソース」)を特定する。なお、変形処理の対象となるラインは、変形済画像が生成されるラインであるので、以下では「生成ライン」とも呼ぶ。変形処理部256は、具体的には、生成ライン中の画素のそれぞれについて、参照画素の位置を算出する。そして、縦方向が参照画素の上下端にわたり、横方向が画像全体に延びた範囲が参照範囲として特定される。図14(b)は、生成ラインの参照範囲が特定された状態を示しており、矢印で示すように、第1の変形処理後の画像中の生成ラインの参照範囲が特定される。   In step S <b> 310, the deformation processing unit 256 identifies a reference range (“source” of deformation processing) of a line that is a target of deformation processing (“destination” of deformation processing). Note that the line that is the target of the deformation process is a line where a deformed image is generated, and is also referred to as a “generation line” below. Specifically, the deformation processing unit 256 calculates the position of the reference pixel for each pixel in the generation line. A range in which the vertical direction extends over the upper and lower ends of the reference pixel and the horizontal direction extends to the entire image is specified as the reference range. FIG. 14B shows a state where the reference range of the generation line is specified, and the reference range of the generation line in the image after the first deformation process is specified as indicated by an arrow.

ステップS320において、変形処理部256は、参照範囲が上位の変形処理において変形済であるか否か、すなわち、上位の変形処理により画像が生成されているか否かを判断する。参照範囲が上位の変形処理において変形済であると判断された場合には、制御はステップS340に移される。一方、参照範囲が上位の変形処理において変形済でないと判断された場合には、制御はステップS330に移される。なお、参照範囲が変形済であるか否かは、上位の変形済画像を構成する複数のラインそれぞれについて、ライン上の画像が生成済か否かを表すフラグを設けることにより判断することができる。図14の例では、図14(b)に示すように、参照範囲には、第1の変形処理による変形済画像が生成されていない。そのため、ハッチングを付して示す参照範囲は変形済でないと判断され、制御はステップS330に移される。   In step S320, the deformation processing unit 256 determines whether or not the reference range has been deformed in the upper deformation process, that is, whether or not an image has been generated by the upper deformation process. If it is determined that the reference range has been transformed in the upper transformation process, control is transferred to step S340. On the other hand, if it is determined that the reference range has not been transformed in the higher-order transformation process, control is transferred to step S330. Note that whether or not the reference range has been modified can be determined by providing a flag indicating whether or not an image on the line has been generated for each of a plurality of lines constituting the upper transformed image. . In the example of FIG. 14, as shown in FIG. 14B, a deformed image by the first deformation process is not generated in the reference range. Therefore, it is determined that the reference range indicated by hatching has not been transformed, and the control is transferred to step S330.

ステップS330において、変形処理部256は、上位の変形処理により参照範囲内に変形済画像を生成する。図14の例では、図14(c)に示すようにハッチングで示す参照範囲から、矢印で示すように、元画像中の参照先が特定される。そして、図14(d)の矢印で示すように、元画像中の参照先の画像に第1の変形処理が施された画像が参照範囲内に生成される。なお、参照範囲内に上位の変形処理により変形済画像を生成する処理(参照範囲画像生成処理)の具体的内容については、後述する。なお、上述の説明から判るように、下位の変形処理におけるソースは、上位の変形処理におけるデスティネーションとなる。   In step S330, the deformation processing unit 256 generates a deformed image within the reference range by the upper deformation process. In the example of FIG. 14, the reference destination in the original image is specified as indicated by an arrow from the reference range indicated by hatching as shown in FIG. Then, as indicated by an arrow in FIG. 14D, an image in which the first deformation process is performed on the reference destination image in the original image is generated within the reference range. The specific content of the process of generating a deformed image by the upper deformation process within the reference range (reference range image generation process) will be described later. As can be seen from the above description, the source in the lower deformation process is the destination in the upper deformation process.

ステップS340において、変形処理部256は、生成ライン上に変形済画像を生成する。具体的には、図14(e)に示すように、参照範囲に生成された画像に第2の変形処理を施すことにより、生成ライン上に第2の変形処理が施された画像を生成する。これにより、生成ラインには第1の変形処理と第2の変形処理とがそれぞれ順に施された画像(多重変形後画像)が生成される。   In step S340, the deformation processing unit 256 generates a deformed image on the generation line. Specifically, as shown in FIG. 14E, the second deformation process is performed on the image generated in the reference range, thereby generating the image subjected to the second deformation process on the generation line. . As a result, an image (multi-deformed image) in which the first deformation process and the second deformation process are sequentially performed on the generation line is generated.

図15は、ステップS330において実行される参照範囲画像生成処理の流れを示すフローチャートである。図16は、画像の変形処理が行われる際のバンドバッファの状態を示す説明図である。図16の左側の列は、それぞれ元画像バッファの状態を示している。図16の中央の列は、第1の変形処理のための第1の変形画像バッファの状態を示し、図16の右側の列は、第2の変形処理のための第2の変形画像バッファの状態を示している。   FIG. 15 is a flowchart showing the flow of the reference range image generation process executed in step S330. FIG. 16 is an explanatory diagram showing the state of the band buffer when the image deformation process is performed. Each column on the left side of FIG. 16 indicates the state of the original image buffer. The center column in FIG. 16 shows the state of the first modified image buffer for the first transformation process, and the right column in FIG. 16 shows the second transformed image buffer for the second transformation process. Indicates the state.

図16(a)は、上側の生成ライン上に変形済画像が生成された状態を示している。上述のように、生成ライン上に変形済画像を生成するため、第1の変形画像バッファ中の生成ラインの参照範囲には、第1の変形処理後の画像が生成されている。生成ライン上への変形済画像の生成が完了すると、図16(b)に示すように、ラインは下方に1画素分移動される。このとき、元画像バッファには、メモリカードMC(図1)から1ライン分の画像が取り込まれる。そして、破線で示すバンドバッファの上端のラインは破棄される。   FIG. 16A shows a state where a deformed image is generated on the upper generation line. As described above, in order to generate a deformed image on the generation line, an image after the first deformation process is generated in the reference range of the generation line in the first deformed image buffer. When the generation of the deformed image on the generation line is completed, the line is moved downward by one pixel as shown in FIG. At this time, an image for one line is taken into the original image buffer from the memory card MC (FIG. 1). Then, the upper end line of the band buffer indicated by a broken line is discarded.

図16(b)の第2の変形画像バッファのハッチング部は、ライン移動後の生成ラインを示している。そして、この生成ラインの参照範囲は、図13のステップS310において、第1の変形画像バッファの太枠内の範囲と特定される。図16(b)に示すように、生成ラインの参照範囲のうち、下端の1ラインは変形済画像が生成されていない。そのため、図13のステップS320において、参照範囲が変形済でないと判断され、ステップS330において、図15に示す参照範囲画像生成処理が実行される。   The hatched portion of the second modified image buffer in FIG. 16B shows the generated line after the line movement. Then, the reference range of this generation line is specified as the range within the thick frame of the first modified image buffer in step S310 of FIG. As shown in FIG. 16B, a deformed image has not been generated for one line at the lower end of the reference range of the generation line. Therefore, in step S320 in FIG. 13, it is determined that the reference range has not been transformed, and in step S330, the reference range image generation process shown in FIG. 15 is executed.

ステップS331において、変形処理部256は、参照範囲の上端のラインを対象ラインに設定する。そして、ステップS332において、対象ラインが変形済、すなわち、変形済画像が生成済であるか否かを判断する。対象ラインが変形済と判断された場合には、制御はステップS338に移される。一方、対象ラインが変形済でないと判断された場合には、制御はステップS333に移される。   In step S331, the transformation processing unit 256 sets the uppermost line of the reference range as the target line. In step S332, it is determined whether the target line has been deformed, that is, whether a deformed image has been generated. If it is determined that the target line has been transformed, control is transferred to step S338. On the other hand, if it is determined that the target line has not been deformed, control is transferred to step S333.

図16の例では、図16(a)に示すように、上側の生成ラインに変形済画像が生成する際に第1の変形画像バッファには、第1の変形処理後の画像が生成されている。そのため、ステップS332において、対象ラインが変形済であると判断され、制御はステップS337に移される。   In the example of FIG. 16, as shown in FIG. 16A, when a deformed image is generated on the upper generation line, an image after the first deformation process is generated in the first deformed image buffer. Yes. Therefore, in step S332, it is determined that the target line has been deformed, and control is transferred to step S337.

ステップS337において、変形処理部256は、対象ラインが参照範囲の下端か否かを判断する。対象ラインが参照範囲の下端と判断された場合、図16の処理は終了して制御は戻される。一方、対象ラインが参照範囲の下端でないと判断された場合、制御はステップS338に移される。そして、ステップS338において、変形処理部256は、対象ラインの次(下側)のラインを新たな対象ラインに設定する。   In step S337, the deformation processing unit 256 determines whether the target line is at the lower end of the reference range. When it is determined that the target line is the lower end of the reference range, the processing in FIG. 16 is finished and the control is returned. On the other hand, when it is determined that the target line is not the lower end of the reference range, the control is moved to step S338. In step S338, the deformation processing unit 256 sets the next (lower) line of the target line as a new target line.

このようにして、対象ラインは、参照範囲の上端から下方に向かって順次移動され、対象ラインが図16(b)の太枠で示す参照範囲の上部内にある間、2つのステップS332,S338が繰り返し実行される。対象ラインが下方に向かって順次移動されて、参照範囲の下端の1ラインが対象ラインに設定されると。ステップS332では、対象ラインが変形済でないと判断される。そして、ステップS332から制御はステップS333に移される。   In this way, the target line is sequentially moved downward from the upper end of the reference range, and the two steps S332 and S338 are performed while the target line is within the upper part of the reference range indicated by the thick frame in FIG. Is repeatedly executed. When the target line is sequentially moved downward and one line at the lower end of the reference range is set as the target line. In step S332, it is determined that the target line has not been deformed. Then, control proceeds from step S332 to step S333.

ステップS333において、変形処理部256は、対象ライン上の画像を生成するための変形処理が最上位の変形処理であるか否かを判断する。変形処理が最上位であると判断された場合には、制御はステップS336に移され、対象ライン上に変形済画像が生成される。一方、変形処理が最上位でないと判断された場合には、制御はステップS334に移される。   In step S333, the deformation processing unit 256 determines whether or not the deformation process for generating an image on the target line is the highest-level deformation process. If it is determined that the deformation process is the highest order, control is transferred to step S336, and a deformed image is generated on the target line. On the other hand, if it is determined that the deformation process is not the highest order, the control is moved to step S334.

ステップS334において、変形処理部256は、図13のステップS310と同様に、対象ラインの参照範囲を特定する。次いで、ステップS335において、変形処理部256は、図13のステップS310とどうように、対象ラインの参照範囲が上位の変形処理において変形済であるか否かを判断する。参照範囲が上位の変形処理において変形済であると判断された場合には、制御はステップS336に移される。一方、参照範囲が上位の変形処理において変形済でないと判断された場合には、制御はステップS330に移され参照範囲画像生成処理は再帰的に実行される。このように、参照範囲画像生成処理を再帰的に実行することにより、複数の変形処理が行われる場合においても、対象ライン上には上位の変形処理により変形済画像が生成される。   In step S334, the transformation processing unit 256 identifies the reference range of the target line, similarly to step S310 in FIG. Next, in step S335, the deformation processing unit 256 determines whether or not the reference range of the target line has been deformed in the higher-level deformation processing, similar to step S310 in FIG. If it is determined that the reference range has been transformed in the higher-order transformation process, control is transferred to step S336. On the other hand, if it is determined that the reference range has not been transformed in the higher-order transformation process, control is transferred to step S330, and the reference range image generation process is recursively executed. As described above, by executing the reference range image generation process recursively, even when a plurality of deformation processes are performed, a deformed image is generated on the target line by a higher-order deformation process.

図16の例では、第1の変形処理が最上位の変形処理となっている。そのため、ステップS333では、変形処理が最上位の変形処理であると判断される。次いで、ステップS336において、図16(d)に示すように、参照範囲の下端の1ライン上に元画像に第1の変形処理を施した画像が生成される。このように、参照範囲画像生成処理により、第1の変形画像バッファ中の参照範囲には、第1の変形処理が施された画像が生成される。そして、第2の変形画像バッファ中の生成ライン上には、図16(e)に示すように、第1の変形画像バッファ中の参照範囲の画像に第2の変形処理を施すことにより、変形済の画像が生成される。   In the example of FIG. 16, the first deformation process is the highest deformation process. Therefore, in step S333, it is determined that the deformation process is the highest-order deformation process. Next, in step S336, as shown in FIG. 16D, an image obtained by performing the first deformation process on the original image is generated on one line at the lower end of the reference range. As described above, an image subjected to the first deformation process is generated in the reference range in the first deformed image buffer by the reference range image generating process. Then, on the generation line in the second deformed image buffer, as shown in FIG. 16 (e), the second deforming process is performed on the image in the reference range in the first deformed image buffer. A completed image is generated.

このようにして、生成ライン上に変形済画像が生成されると、図13に示すライン変形処理は終了し、制御は、図3に示す顔形状補正印刷処理に戻される。   When the deformed image is generated on the generation line in this way, the line deformation process shown in FIG. 13 is finished, and the control is returned to the face shape correction printing process shown in FIG.

図3のステップS410では、変形済の画像が生成された生成ラインの印刷処理が行われる。具体的には、生成ラインの画像を表すデータ(ラインデータ)が印刷処理部320に供給される。印刷処理部320では、供給されたラインデータを必要に応じて蓄積し、解像度変換やハーフトーン処理などの処理を施して印刷データを生成する。生成された印刷データは、印刷処理部320からプリンタエンジン160に供給される。   In step S410 in FIG. 3, a print process of a generation line in which a deformed image is generated is performed. Specifically, data representing the image of the generated line (line data) is supplied to the print processing unit 320. The print processing unit 320 accumulates the supplied line data as necessary, and performs processing such as resolution conversion and halftone processing to generate print data. The generated print data is supplied from the print processing unit 320 to the printer engine 160.

ステップS420では、対象画像の全ラインについてライン変形処理(ステップS300)とライン印刷処理(ステップS410)が行われたか否かが判断される。これらの処理が全ラインについて終了したと判断された場合には、図3の顔形状補正印刷処理は終了する。一方、未処理のラインが存在すると判断された場合には、制御はステップS430に移される。   In step S420, it is determined whether the line transformation process (step S300) and the line printing process (step S410) have been performed for all lines of the target image. If it is determined that these processes have been completed for all lines, the face shape correction printing process of FIG. 3 ends. On the other hand, if it is determined that there is an unprocessed line, control is transferred to step S430.

ステップS430では、変形処理の対象となる生成ラインが上述のように次のラインに移動する。そして、ステップS420において、ライン変形処理(ステップS300)とライン印刷処理(ステップS410)が全ラインについて終了したと判断されるまで、ステップS300〜S430が繰り返し実行される。これにより、プリンタエンジン160において対象画像に変形処理を施した画像が印刷される。   In step S430, the generation line to be deformed is moved to the next line as described above. In step S420, steps S300 to S430 are repeatedly executed until it is determined that the line transformation process (step S300) and the line printing process (step S410) have been completed for all lines. As a result, the printer engine 160 prints an image obtained by subjecting the target image to deformation processing.

このように、本実施例では、対象画像を変形する際、変形済画像を構成する全ての画素の画素値を決定するために必要な最大バンド幅が予め算出される。そして、算出された最大バンド幅のバンドバッファを確保することにより、バンドバッファに格納された画像を用いて対象画像を変形することができる。そのため、対象画像の変形処理に要するメモリ量を低減することができる。   As described above, in this embodiment, when the target image is deformed, the maximum bandwidth necessary for determining the pixel values of all the pixels constituting the deformed image is calculated in advance. Then, by securing a band buffer with the calculated maximum bandwidth, the target image can be transformed using the image stored in the band buffer. Therefore, the amount of memory required for the deformation process of the target image can be reduced.

また、本実施例では、1つの対象画像を変形する場合、バンドバッファのバンド幅は最大バンド幅に固定的に定められている。そのため、ライン毎に必要なバンド幅を決定し、決定されたバンド幅のバンドバッファを確保する場合よりも、バンドバッファ確保を行う処理の回数を低減することができる。そのため、対象画像を変形するための処理時間を短縮することができる。   In this embodiment, when one target image is deformed, the bandwidth of the band buffer is fixedly set to the maximum bandwidth. Therefore, it is possible to reduce the number of times of performing band buffer securing, compared to the case where the necessary bandwidth is determined for each line and the band buffer having the determined bandwidth is secured. Therefore, the processing time for deforming the target image can be shortened.

さらに、本実施例では、予め算出された最大バンド幅でバンドバッファを確保することにより、変形済画像を生成するラインが移動した場合にも、ライン移動前にバンドバッファに格納された画像やバンドバッファ中に生成された画像の一部をそのまま利用することができる。そのため、バンドバッファへの画像の格納や、バンドバッファ中への画像の再生成が省略できるので、対象画像を変形するための処理時間を短縮することができる。   Furthermore, in this embodiment, by securing the band buffer with the maximum bandwidth calculated in advance, even when the line for generating the deformed image moves, the image or band stored in the band buffer before the line movement is moved. A part of the image generated in the buffer can be used as it is. Therefore, storing an image in the band buffer and regenerating the image in the band buffer can be omitted, so that the processing time for deforming the target image can be shortened.

B.変形例:
なお、この発明は上記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
B. Variations:
The present invention is not limited to the above-described examples and embodiments, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.

B1.変形例1:
上記実施例では、ライン毎に変形画像を生成しているが、変形画像は、変形画像の一部となるブロック毎であれば、任意形態のブロック毎に生成するものとしてもよい。ブロックとしては、例えば、変形済画像の一部の矩形領域や、ラインの一部分となる画素ブロックを使用することもできる。
B1. Modification 1:
In the above embodiment, the deformed image is generated for each line. However, the deformed image may be generated for each block in any form as long as it is for each block that is a part of the deformed image. As the block, for example, a rectangular area that is a part of the deformed image or a pixel block that is a part of a line can be used.

B2.変形例2:
上記実施例では、本発明を顔形状の変形処理に適用しているが、本発明は、顔形状の変形処理とは異なる変形処理に適用することができる。本発明は、画像に含まれる物体(オブジェクト)の変形処理一般に適用できる。
B2. Modification 2:
In the above embodiment, the present invention is applied to the face shape deformation process, but the present invention can be applied to a deformation process different from the face shape deformation process. The present invention can be generally applied to deformation processing of an object (object) included in an image.

B3.変形例3:
上記実施例では、変形領域を小領域に分割し、分割された小領域を変形することにより変形領域全体の変形を行っているが、変形領域の分割を省略することも可能である。一般に、本発明は、マッピングによる変形処理であれば、任意の形態の変形処理に適用できる。
B3. Modification 3:
In the above embodiment, the deformation area is divided into small areas, and the entire deformation area is deformed by deforming the divided small areas. However, the division of the deformation area may be omitted. In general, the present invention can be applied to any form of deformation processing as long as it is a deformation processing by mapping.

B4.変形例4:
上記実施例では、第2の変形画像バッファを確保して、変形済画像のバンドを格納しているが、生成ラインが格納しうる領域が確保されていれば、変形済画像のバンドを格納するバンドバッファを省略することも可能である。このようにしても、生成ライン上に変形済画像を生成することが可能である。
B4. Modification 4:
In the above embodiment, the second deformed image buffer is secured and the band of the deformed image is stored. However, if the area that can be stored by the generation line is secured, the band of the deformed image is stored. It is also possible to omit the band buffer. Even in this way, it is possible to generate a deformed image on the generation line.

B5.変形例5:
上記実施例では、複数の変形領域の変形処理を別個に行っているが、複数の変形領域の変形を1回の変形処理で行うこともできる。この場合、最終的に生成される変形済画像の対象画素に対応づけられる画素の元画像上の位置が求められる。そして、対象画素に対応づけられる画素の画素値から、対象画素の画素値が設定される。
B5. Modification 5:
In the above-described embodiment, the deformation processes of the plurality of deformation areas are performed separately, but the deformation of the plurality of deformation areas can also be performed by a single deformation process. In this case, the position on the original image of the pixel associated with the target pixel of the finally generated deformed image is obtained. Then, the pixel value of the target pixel is set from the pixel value of the pixel associated with the target pixel.

B6.変形例6:
上記実施例では、生成したライン毎に印刷処理を行っているが、印刷処理は必ずしもライン毎に行う必要はない。たとえば、最終的に生成される変形済画像全体を格納する領域を確保して、その領域に生成されたライン毎に画像を格納していくものとしてもよい。
B6. Modification 6:
In the above embodiment, the printing process is performed for each generated line, but the printing process is not necessarily performed for each line. For example, an area for storing the entire deformed image finally generated may be secured, and an image may be stored for each line generated in the area.

B7.変形例7:
上記実施例では、本発明をプリンタ100に適用しているが、本発明は、元画像から変形済画像を生成する変形処理を行う装置であれば、画像の変形処理を行う機能をする任意の装置に適用することができる。本発明は、画像の変形処理を行う機能を有していれば、例えば、パーソナルコンピュータや、デジタルカメラにも適用することができる。
B7. Modification 7:
In the above embodiment, the present invention is applied to the printer 100. However, the present invention is an apparatus that performs a deformation process for generating a deformed image from an original image. It can be applied to the device. The present invention can be applied to, for example, a personal computer or a digital camera as long as it has a function of performing image deformation processing.

B8.変形例8:
上記各実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。
B8. Modification 8:
In each of the above embodiments, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced by hardware. .

100…プリンタ
110…CPU
120…内部メモリ
140…操作部
150…表示部
160…プリンタエンジン
170…カードインタフェース
172…カードスロット
200…顔形状補正部
210…変形態様設定部
220…変形領域設定部
230…変形領域分割部
240…変形パラメータ設定部
250…分割領域変形部
252…最大バンド幅算出部
254…バンドバッファ割付部
256…変形処理部
310…表示処理部
320…印刷処理部
410…分割点配置パターンテーブル
420…分割点移動テーブル
430…バンドバッファ
100 ... Printer 110 ... CPU
DESCRIPTION OF SYMBOLS 120 ... Internal memory 140 ... Operation part 150 ... Display part 160 ... Printer engine 170 ... Card interface 172 ... Card slot 200 ... Face shape correction part 210 ... Deformation mode setting part 220 ... Deformation area setting part 230 ... Deformation area division part 240 ... Deformation parameter setting unit 250 ... Divided area transforming unit 252 ... Maximum bandwidth calculating unit 254 ... Band buffer allocating unit 256 ... Deformation processing unit 310 ... Display processing unit 320 ... Print processing unit 410 ... Dividing point arrangement pattern table 420 ... Dividing point movement Table 430 ... Band buffer

Claims (3)

画像に含まれるオブジェクトの形状を変化させる変形処理を実行する画像処理装置であって、
記憶手段と、
変形処理前に、前記記憶手段に画素値の記憶のための記憶領域であるバッファを確保するバンドバッファ割付部と、
前記確保されたバッファを前記変形処理の実行に伴う画素値の記憶領域として使用することにより、前記変形処理後の画像における前記オブジェクトを構成する参照元画素のそれぞれの画素値を前記変形処理前の画像における各参照元画素に対応する画素である参照先画素のそれぞれの画素値に設定することにより前記変形処理を実行する変形処理部と、
前記変形処理の実行されたオブジェクトが含まれる画像を出力する出力処理部と、を備え、
前記バンドバッファ割付部は、前記オブジェクト全体ではなく、前記オブジェクトにおける一部分に含まれる前記参照元画素と前記参照先画素との画素値が記憶可能なように前記バッファを確保する、画像処理装置。
An image processing apparatus that executes a deformation process for changing the shape of an object included in an image,
Storage means;
A band buffer allocating unit for securing a buffer which is a storage area for storing pixel values in the storage unit before the transformation process;
By using the reserved buffer as a storage area for pixel values associated with the execution of the deformation process , each pixel value of the reference source pixel constituting the object in the image after the deformation process is converted to a value before the deformation process. A deformation processing unit that executes the deformation processing by setting each pixel value of a reference pixel that is a pixel corresponding to each reference source pixel in the image;
An output processing unit that outputs an image including the object subjected to the deformation process,
The image processing apparatus, wherein the band buffer allocating unit secures the buffer so that pixel values of the reference source pixel and the reference destination pixel included in a part of the object , not the entire object , can be stored .
画像に含まれるオブジェクトの形状を変化させる変形処理を実行する画像処理方法であって、
(a)変形処理前に、コンピュータの記憶手段に画素値の記憶のための記憶領域であるバッファを確保する工程と、
(b)前記確保されたバッファを前記変形処理の実行に伴う画素値の記憶領域として使用することにより、前記変形処理後の画像における前記オブジェクトを構成する参照元画素のそれぞれの画素値を前記変形処理前の画像における各参照元画素に対応する画素である参照先画素のそれぞれの画素値に設定することにより前記変形処理を実行する工程と、
(c)前記変形処理の実行されたオブジェクトが含まれる画像を出力する工程と、を備え、
前記バッファを確保する工程(a)は、前記オブジェクト全体ではなく、前記オブジェクトにおける一部分に含まれる前記参照元画素と前記参照先画素との画素値が記憶可能なように前記バッファを確保する工程である、画像処理方法。
An image processing method for executing deformation processing for changing the shape of an object included in an image,
(A) securing a buffer which is a storage area for storing pixel values in the storage means of the computer before the deformation process;
(B) By using the reserved buffer as a storage area for pixel values associated with the execution of the deformation process, the respective pixel values of the reference source pixels constituting the object in the image after the deformation process are deformed. Executing the deformation process by setting each pixel value of a reference destination pixel that is a pixel corresponding to each reference source pixel in the image before processing;
(C) outputting an image including the object subjected to the deformation process,
The step (a) of securing the buffer is a step of securing the buffer so that pixel values of the reference source pixel and the reference destination pixel included in a part of the object , not the entire object , can be stored. There is an image processing method.
画像に含まれるオブジェクトの形状を変化させる変形処理を実行するためのコンピュータープログラムであって、
変形処理前に、コンピュータの記憶手段に画素値の記憶のための記憶領域であるバッファを確保するバンドバッファ割付機能と、
前記確保されたバッファを前記変形処理の実行に伴う画素値の記憶領域として使用することにより、前記変形処理後の画像における前記オブジェクトを構成する参照元画素のそれぞれの画素値を前記変形処理前の画像における各参照元画素に対応する画素である参照先画素のそれぞれの画素値に設定することにより前記変形処理を実行する変形処理機能と、
前記変形処理の実行されたオブジェクトが含まれる画像を出力する出力処理機能と、を前記コンピュータに実現させ、
前記バンドバッファ割付機能は、前記オブジェクト全体ではなく、前記オブジェクトにおける一部分に含まれる前記参照元画素と前記参照先画素との画素値が記憶可能なように前記バッファを確保する機能である、コンピュータープログラム。
A computer program for executing a deformation process for changing the shape of an object included in an image,
A band buffer allocation function for securing a buffer that is a storage area for storing pixel values in the storage means of the computer before the transformation process;
By using the reserved buffer as a storage area for pixel values associated with the execution of the deformation process , each pixel value of the reference source pixel constituting the object in the image after the deformation process is converted to a value before the deformation process. A deformation processing function for executing the deformation processing by setting each pixel value of a reference pixel that is a pixel corresponding to each reference source pixel in the image;
And an output processing function of outputting an image including an object that is executed in the modification process is implemented in the computer,
The band buffer allocation function is a function of securing the buffer so that pixel values of the reference source pixel and the reference destination pixel included in a part of the object , not the entire object , can be stored. .
JP2010104673A 2010-04-30 2010-04-30 Image processing apparatus, image processing method, and computer program Expired - Fee Related JP5003790B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010104673A JP5003790B2 (en) 2010-04-30 2010-04-30 Image processing apparatus, image processing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010104673A JP5003790B2 (en) 2010-04-30 2010-04-30 Image processing apparatus, image processing method, and computer program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007125635A Division JP4501959B2 (en) 2007-05-10 2007-05-10 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2010166624A JP2010166624A (en) 2010-07-29
JP5003790B2 true JP5003790B2 (en) 2012-08-15

Family

ID=42582359

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010104673A Expired - Fee Related JP5003790B2 (en) 2010-04-30 2010-04-30 Image processing apparatus, image processing method, and computer program

Country Status (1)

Country Link
JP (1) JP5003790B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10722594B2 (en) 2012-10-12 2020-07-28 Adc Therapeutics S.A. Pyrrolobenzodiazepine-anti-CD22 antibody conjugates

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110537200A (en) * 2017-04-20 2019-12-03 夏普株式会社 Image processing apparatus, filming apparatus, image printer, the control method of image processing apparatus 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006285574A (en) * 2005-03-31 2006-10-19 Fuji Photo Film Co Ltd Image processing method, image processor, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10722594B2 (en) 2012-10-12 2020-07-28 Adc Therapeutics S.A. Pyrrolobenzodiazepine-anti-CD22 antibody conjugates
US11690918B2 (en) 2012-10-12 2023-07-04 Medimmune Limited Pyrrolobenzodiazepine-anti-CD22 antibody conjugates

Also Published As

Publication number Publication date
JP2010166624A (en) 2010-07-29

Similar Documents

Publication Publication Date Title
JP5115398B2 (en) Image processing apparatus, image processing method, and image processing program
US8355602B2 (en) Image processing apparatus, image processing method and image processing program
JP4957463B2 (en) Image processing device
JP4289414B2 (en) Image processing for image transformation
JP2009060300A (en) Image processing device, image processing method, and image processing program
JP4289415B2 (en) Image processing for image transformation
JP2009053914A (en) Image processor and image processing method
JP4501959B2 (en) Image processing apparatus and image processing method
JP2009031870A (en) Image processing for estimation of photographic object distance
JP5003790B2 (en) Image processing apparatus, image processing method, and computer program
JP2000123162A (en) Image data interpolating method, image data interpolating device and medium in which image data interpolation program is recorded
JP4389954B2 (en) Image processing apparatus, image processing method, computer program, recording medium, and printer
JP4930298B2 (en) Specify image area
JP2008282205A (en) Image processor and image processing method
JP5338887B2 (en) Image processing device
JP2010170219A (en) Apparatus, method and program for processing image, and printer
JP2004054898A (en) Printing data generating device, printing data generating method and program
JP2010263441A (en) Image processing apparatus, image processing method and program
JP4816540B2 (en) Image processing apparatus and image processing method
US20090237680A1 (en) Image processing apparatus, image processing method, and computer program for image processing
JP2005080070A (en) Determination of recommended trimming size
JP4946729B2 (en) Image processing device
JP2004188883A (en) Two-dimensional code printing apparatus
JP2009151825A (en) Image processor and image processing method
JP4737324B2 (en) Image processing apparatus, image processing method, and computer program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100527

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100527

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120405

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120424

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120507

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

Free format text: PAYMENT UNTIL: 20150601

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5003790

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees