JP2011170541A - Image deformation method, image processor, and computer program - Google Patents

Image deformation method, image processor, and computer program Download PDF

Info

Publication number
JP2011170541A
JP2011170541A JP2010032680A JP2010032680A JP2011170541A JP 2011170541 A JP2011170541 A JP 2011170541A JP 2010032680 A JP2010032680 A JP 2010032680A JP 2010032680 A JP2010032680 A JP 2010032680A JP 2011170541 A JP2011170541 A JP 2011170541A
Authority
JP
Japan
Prior art keywords
lattice
deformation
image
interval
grid
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.)
Granted
Application number
JP2010032680A
Other languages
Japanese (ja)
Other versions
JP5565671B2 (en
Inventor
Masataka Seo
昌孝 瀬尾
Eni Chin
延偉 陳
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.)
Ritsumeikan Trust
Original Assignee
Ritsumeikan Trust
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 Ritsumeikan Trust filed Critical Ritsumeikan Trust
Priority to JP2010032680A priority Critical patent/JP5565671B2/en
Publication of JP2011170541A publication Critical patent/JP2011170541A/en
Application granted granted Critical
Publication of JP5565671B2 publication Critical patent/JP5565671B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve the accuracy of deformation, and to reduce the amount of calculation more than that of a conventional image deformation method. <P>SOLUTION: In an image deformation method, a movement amount of each apex in a control grid for deforming an image is acquired by a reference point set in an original image before deformation and a target point indicating a movement destination of the reference point, and the control grid in which the movement amount of each apex has been acquired is used to deform the original image. The method includes: a part setting step (step S1) of setting a plurality of parts in the original image; and a grid interval setting step (step S3) of setting a grid interval of the control grid with respect to each of the plurality of parts. The image deformation of each of the plurality of parts is performed using the control grid having the grid interval set in the grid interval setting step. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像変形法、画像処理装置、及びコンピュータプログラムに関するものである。   The present invention relates to an image deformation method, an image processing apparatus, and a computer program.

近年、多くの映像作品や幅広い研究分野において画像変形に対するニーズは増加傾向にあり、これに関してメッシュワープやフィールドモーフィング、放射基底関数やB−spline変換(free−form deformation法)等、多くの手法が提案されている。   In recent years, the need for image transformation has been increasing in many video works and a wide range of research fields. In this regard, many methods such as mesh warp, field morphing, radial basis function, and B-spline transformation (free-form deformation method) are used. Proposed.

この中で、B−spline変換を基にしたfree−form deformation法は多少の変形誤差は発生するものの、自然で滑らかな変形を可能とする非常に有用な変形手法である。また、この変形誤差を低減させるための手法としてmulti−level B−spline変換という手法が提案されている(非特許文献1参照)。   Among them, the free-form deformation method based on the B-spline transformation is a very useful deformation method that enables natural and smooth deformation, although some deformation errors occur. Further, a technique called multi-level B-spline conversion has been proposed as a technique for reducing the deformation error (see Non-Patent Document 1).

S. Lee、G. Wolberg、 S.Y. Shin、 “Scattered Data Interpolation with Multilevel B-spline”、 IEEE Transaction on Visualization and Computer Graphics、 Vol. 3、 PP.228-244、1997S. Lee, G. Wolberg, S.Y. Shin, “Scattered Data Interpolation with Multilevel B-spline”, IEEE Transaction on Visualization and Computer Graphics, Vol. 3, PP.228-244, 1997

本発明は、従来の画像変形法よりも、変形精度を向上させることを目的とする。
また、本発明の他の目的は、従来の画像変形法よりも、計算量を削減することである。
An object of the present invention is to improve the deformation accuracy over the conventional image deformation method.
Another object of the present invention is to reduce the amount of calculation compared to the conventional image deformation method.

(1)本発明は、変形前の原画像において設定された基準点及び当該基準点の移動先を示す目標点から、画像を変形させるための制御格子における各頂点の移動量を取得し、各頂点の移動量が取得された制御格子を用いて、前記原画像の変形を行う画像変形方法であって、前記原画像中における複数のパーツを設定するパーツ設定ステップと、前記複数のパーツそれぞれについて、制御格子の格子間隔を設定する格子間隔設定ステップと、を含み、複数のパーツそれぞれの画像変形を、前記格子間隔設定ステップにて設定された格子間隔の制御格子を用いて行うことを特徴とする画像変形方法である。 (1) The present invention acquires a movement amount of each vertex in a control grid for deforming an image from a reference point set in an original image before deformation and a target point indicating a movement destination of the reference point, An image deformation method for deforming the original image using a control grid from which the amount of movement of the vertex is acquired, a part setting step for setting a plurality of parts in the original image, and each of the plurality of parts A lattice interval setting step for setting a lattice interval of the control lattice, and performing image deformation of each of the plurality of parts using the control lattice of the lattice interval set in the lattice interval setting step, This is an image transformation method.

上記本発明によれば、パーツ毎に格子間隔が設定された制御格子を用いて画像変形を行うことができる。   According to the present invention, image deformation can be performed using a control grid in which a grid interval is set for each part.

(2)前記格子間隔設定ステップでは、格子間隔の設定対象となっているパーツに含まれる基準点の間隔に応じて、格子間隔を決定するのが好ましい。 (2) In the lattice interval setting step, it is preferable to determine the lattice interval according to the interval of the reference points included in the part for which the lattice interval is to be set.

(3)前記格子間隔設定ステップでは、前記パーツ内において隣り合う基準点の格子方向における最大間隔に応じて、当該格子方向における格子間隔を決定するのが好ましい。 (3) In the lattice interval setting step, it is preferable to determine the lattice interval in the lattice direction according to the maximum interval in the lattice direction of adjacent reference points in the part.

(4)前記格子間隔設定ステップでは、前記最大間隔にほぼ等しい値を、当該格子方向における格子間隔として決定するのが好ましい。 (4) In the lattice interval setting step, it is preferable to determine a value substantially equal to the maximum interval as the lattice interval in the lattice direction.

(5)設定された格子間隔の制御格子を用いた前記画像変形によって移動した後の基準点の位置と前記目標点の位置との誤差が、所定の閾値よりも大きい箇所については、設定された前記格子間隔よりも小さい格子間隔の制御格子を用いて、再度の画像変形を行うことができる。
この場合、誤差が小さい箇所の計算を省略できるため、再度の画像変形を行っても処理時間の増大を抑えることができる。
(5) For locations where the error between the position of the reference point and the position of the target point after moving by the image deformation using the control grid of the set grid spacing is greater than a predetermined threshold, Image deformation can be performed again using a control lattice having a lattice interval smaller than the lattice interval.
In this case, since calculation of a portion with a small error can be omitted, an increase in processing time can be suppressed even if image deformation is performed again.

(6)他の観点からみた本発明は、変形前の原画像において設定された基準点及び当該基準点の移動先を示す目標点から、画像を変形させるための制御格子における各頂点の移動量を取得し、各頂点の移動量が取得された制御格子を用いて、前記原画像の変形を行う画像処理装置であって、前記原画像中における複数のパーツを設定するパーツ設定手段と、前記複数のパーツそれぞれについて、制御格子の格子間隔を設定する格子間隔設定手段と、を含み、複数のパーツそれぞれの画像変形が、前記格子間隔設定手段にて設定された格子間隔の制御格子を用いて行われるよう構成されていることを特徴とする画像処理装置である。 (6) Viewed from another viewpoint, the present invention provides a moving amount of each vertex in a control grid for deforming an image from a reference point set in the original image before deformation and a target point indicating the movement destination of the reference point. And an image processing device that transforms the original image using the control grid from which the movement amount of each vertex is acquired, and a part setting unit that sets a plurality of parts in the original image; Grid interval setting means for setting a grid interval of a control grid for each of a plurality of parts, and image deformation of each of the plurality of parts is performed using the control grid of the grid interval set by the grid interval setting means An image processing apparatus configured to be performed.

(7)他の観点からみた本発明は、コンピュータを、上記画像処理装置として機能させるためのコンピュータプログラムである。 (7) The present invention from another viewpoint is a computer program for causing a computer to function as the image processing apparatus.

本発明によれば、複数のパーツそれぞれの格子間隔を異ならせて、パーツごとに画像変形ができるため、変形精度を向上させることが可能である。   According to the present invention, the lattice spacing of each of the plurality of parts can be made different so that the image can be deformed for each part. Therefore, the deformation accuracy can be improved.

制御格子を示す図である。It is a figure which shows a control grid. 画像変形処理の概念図である。It is a conceptual diagram of an image deformation process. 従来のmulti−level B−spline変換に用いられる制御格子を示す図である。It is a figure which shows the control grid used for the conventional multi-level B-spline conversion. 画像処理装置の機能ブロック図である。It is a functional block diagram of an image processing apparatus. パーツを示す図である。It is a figure which shows parts. 画像変形処理のフローチャートである。It is a flowchart of an image deformation process. 制御格子の格子間隔決定方法を示す図である。It is a figure which shows the lattice spacing determination method of a control lattice. 制御格子の格子間隔決定方法を示す図である。It is a figure which shows the lattice spacing determination method of a control lattice. 基準点の移動と誤差の説明図である。It is explanatory drawing of the movement of a reference point, and an error. 適応的格子法における格子分割の例を示す図である。It is a figure which shows the example of the lattice division | segmentation in an adaptive lattice method. 基準点の影響領域と実際の変形領域を示す図である。It is a figure which shows the influence area | region of a reference | standard point, and an actual deformation | transformation area | region. 形状の不自然率を示すチャートである。It is a chart which shows the unnatural rate of a shape.

以下、本発明の好ましい実施形態について添付図面を参照しながら説明する。
以下では、まず、基本的なB−spline変換及び非特許文献1記載のmulti−level B−spline変換について説明し、その後、本実施形態に係る画像処理装置の構成とその処理方法について説明する。
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
Hereinafter, first, basic B-spline conversion and multi-level B-spline conversion described in Non-Patent Document 1 will be described, and then the configuration and processing method of the image processing apparatus according to the present embodiment will be described.

[1.基本的なB−spline変換]
原画像の形状変形を行うにあたり、変形元となる点p(x,y)から変形先となる点p’(x’,y’)へ一意に座標変換する必要がある。この座標変換はx,yの座標軸毎にx’=f(x,y),y’=f(x,y)という二つの変形関数で表すことが出来る。
B−spline変換ではこの変換関数にB−spline基底関数を用いて画像の変形を実現する。
[1. Basic B-spline conversion]
When deforming the shape of the original image, it is necessary to perform coordinate transformation uniquely from the point p (x, y) as the deformation source to the point p ′ (x ′, y ′) as the deformation destination. This coordinate transformation can be expressed by two deformation functions x ′ = f x (x, y) and y ′ = f y (x, y) for each of the x and y coordinate axes.
In the B-spline conversion, image transformation is realized using a B-spline basis function as the conversion function.

オーソドックスなB−spline変換では、図1の様な制御格子を用いて変形を行う。具体的には、格子中の各頂点(以下、「制御点」という)にそれぞれ移動量を付与し、これを用いて原画像全体において一意の形状変形を実現する。
図1では原画像をm×nに分割し、その周囲に擬似的に局所領域を一列配置している。原画像全体において、制御点の数は(m+3)×(n+3)個となる。
In the orthodox B-spline transformation, deformation is performed using a control grid as shown in FIG. Specifically, a movement amount is assigned to each vertex (hereinafter referred to as “control point”) in the grid, and a unique shape deformation is realized in the entire original image using this.
In FIG. 1, the original image is divided into m × n, and a pseudo local region is arranged around the original image. In the entire original image, the number of control points is (m + 3) × (n + 3).

画像変形は、図2(b)に示すように原画像上に設定された基準点が、目標点の位置に移動するように行われる。
また、制御格子における各制御点の移動量は、基準点及び目標点の位置に基づいて決定される。
Image deformation is performed so that the reference point set on the original image moves to the position of the target point as shown in FIG.
The amount of movement of each control point in the control grid is determined based on the positions of the reference point and the target point.

B−spline変換では、まず、ある1個の局所領域の近傍に存在する16個の制御点の移動量を用いて、その中央に存在する当該局所領域の変形を行う。図1に示す制御格子において、m=0〜1,n=0〜1の範囲にある局所領域Aの変形を行う場合、この局所領域Aの近傍領域(図1の斜線部分)に存在する16個の制御点の移動量を用いて、局所領域Aの変形処理を行う。   In the B-spline transformation, first, the movement amount of 16 control points existing in the vicinity of a certain local region is used to deform the local region existing in the center. In the control lattice shown in FIG. 1, when the deformation of the local region A in the range of m = 0 to 1 and n = 0 to 1 is performed, 16 exists in the region near the local region A (shaded portion in FIG. 1). The deformation process of the local region A is performed using the movement amount of each control point.

そして、上記の変形処理を、原画像中のすべての局所領域に対して繰り返し行うことで原画像全体として一意の形状変形を実現する。   Then, by repeating the above deformation processing for all local regions in the original image, unique shape deformation is realized for the entire original image.

Ω={(x,y)|−1≦x≦m+1,−1≦y≦n+1}をxy座標空間に配置した格子平面とする。そしてxyz三次元空間に散らばる点の集合P={(x,y,z)}を用いて変形を行う。ここで、{(x,y)}はΩ上の点、{z}はこの点における注目画素の移動量を表す。
画像中のすべての座標においてこの点群Pの補間を実現するためにΩ上に存在する制御点群Φにより定義されるB−spline変換を変形関数fとして用いる。
Let Ω = {(x, y) | −1 ≦ x ≦ m + 1, −1 ≦ y ≦ n + 1} be a lattice plane arranged in the xy coordinate space. Then, transformation is performed using a set P = {(x, y, z)} of points scattered in the xyz three-dimensional space. Here, {(x, y)} represents a point on Ω, and {z} represents the amount of movement of the pixel of interest at this point.
In order to realize the interpolation of the point group P at all coordinates in the image, the B-spline transformation defined by the control point group Φ existing on Ω is used as the deformation function f.

ここで、φijを、Φ中のij番目の制御点の重みパラメータとする。変形関数fは、この制御点の重みパラメータを用いることで以下の様に表すことが出来る。

Figure 2011170541
Here, φ ij is a weight parameter of the ij-th control point in Φ. The deformation function f can be expressed as follows by using the weight parameter of the control point.
Figure 2011170541

そしてBとBは、以下のようなB−spline基底関数を表すものである。

Figure 2011170541
B k and B l represent the following B-spline basis functions.
Figure 2011170541

画像変形を行うにあたり、変形元の基準点群{(x,y),(x,y),・・・,(x,y)}と変形先の目標点群{(x’,y’),(x’,y’),・・・,(x’,y’)}の座標は、事前に取得しておく。
各制御点へパラメータとして付与するx,yの各座標軸方向の重みパラメータ(φ klとφ kl)は以下に示すコスト関数を最小化することによって取得できる。

Figure 2011170541
In performing image deformation, a reference point group {(x 1 , y 1 ), (x 2 , y 2 ),..., (X n , y n )} and a target point group {(x n , y n )} The coordinates of x 1 ', y 1 '), (x 2 ', y 2 '), ..., (x n ', y n ')} are acquired in advance.
The weight parameters (φ x kl and φ y kl ) in the direction of each coordinate axis of x and y given as parameters to each control point can be obtained by minimizing the cost function shown below.
Figure 2011170541

ここで、各基準点の移動により影響を受ける領域はその点の近傍の9個の局所領域である。もし複数の基準点から影響を受ける領域が重なり合ってしまった場合、その領域に存在する制御点は各基準点からの影響を重複して受けることとなり、この領域では自然な形状変化を行うことが出来なくなる。よって複数の基準点が近傍に存在する場合でも正確な形状変化を実現するため、この問題を解決する必要がある。   Here, the regions affected by the movement of each reference point are nine local regions near the point. If the areas affected by multiple reference points overlap, the control points that exist in those areas will be affected by the influence of each reference point, and this area may undergo natural shape changes. It becomes impossible. Therefore, in order to realize an accurate shape change even when a plurality of reference points exist in the vicinity, it is necessary to solve this problem.

φijをΦ上のij番目の制御点における求めるべき重みパラメータ(実際の変形に使用する重みパラメータ)、φ ijをij番目の制御点において基準点cから個別に与えられる重みパラメータとする。この求めるべき重みパラメータφijは、以下のコスト関数を最小化することにより得られる。

Figure 2011170541
Let φ ij be a weight parameter to be obtained at the ij-th control point on Φ (weight parameter used for actual deformation), and φ c ij be a weight parameter given individually from the reference point c at the ij-th control point. The weight parameter φ ij to be obtained can be obtained by minimizing the following cost function.
Figure 2011170541

以上の式により実現されるB−spline変換は、非常に滑らかで自然な変形を実現するが、その変形結果は多少の変形誤差を有する。   The B-spline transformation realized by the above formula realizes very smooth and natural deformation, but the deformation result has some deformation error.

[2.multi−level B−spline変換]
前述のB−spline変換は滑らかで自然な変形が可能であるが、その変形には多少の変形誤差(目標点に対する誤差)が含まれる。これはサイズの小さな格子を用いて変形を行うことにより低減することが可能であるが、その場合、局所的に急激な変形が発生してしまい、自然でスムーズな変形とは程遠いものとなる。従来のB−spline変換では変形の正確さと自然さ・スムーズさは両立しがたいものとなっている。
[2. multi-level B-spline conversion]
The B-spline transformation described above can be smoothly and naturally deformed, but the deformation includes some deformation error (error with respect to the target point). This can be reduced by performing deformation using a small-sized grid, but in that case, local rapid deformation occurs, which is far from natural and smooth deformation. In the conventional B-spline conversion, it is difficult to achieve both the accuracy of deformation and the naturalness / smoothness.

前掲の非特許文献1では、変形の自然さ・スムーズさを保ちつつ、変形誤差を低減させる手法としてmulti−level B−spline変換という手法が提案されている。   In the aforementioned Non-Patent Document 1, a technique called multi-level B-spline conversion is proposed as a technique for reducing deformation errors while maintaining the naturalness and smoothness of deformation.

この手法は複数の制御格子Φ,Φ,・・・,Φを用いて変形を行う。このうちΦは従来のB−spline変換で用いる制御格子であり、ΦはΦよりも小さな格子間隔の制御格子である。この格子間隔の縮小率は任意に決めることが出来るが、ここででは後の計算を簡略化する為に1/2倍の格子を使用する。
ここで、Φが(m+3)×(n+3)個の格子頂点(制御点)を持つ制御格子とする場合、Φk+1は(2m+3)×(2n+3)個の格子頂点を持つことになる。Φにおけるij番目の制御点の配置は、Φk+1中の(2i,2j)目の制御点の配置と一致する。
This approach deformation performed using a plurality of control grid Φ 1, Φ 2, ···, Φ h. Of these, Φ 1 is a control lattice used in the conventional B-spline transformation, and Φ 2 is a control lattice having a lattice interval smaller than Φ 1 . Although the reduction ratio of the lattice spacing can be determined arbitrarily, here, a 1 / 2-fold lattice is used in order to simplify later calculations.
Here, when Φ k is a control lattice having (m + 3) × (n + 3) lattice vertices (control points), Φ k + 1 has (2m + 3) × (2n + 3) lattice vertices. [Phi arrangement of ij-th control points in k is, [Phi k + 1 in the (2i, 2j) coincide with the arrangement of the first control point.

multi−level B−spline変換を行うには、はじめに図3(a)に示すように粗い制御格子Φを用いた通常のB−spline変換を行う。そしてここで発生した誤差を、図3(b)に示すようにΦよりも小さな格子間隔を持つ変形格子Φを用いて埋め合わせしてゆく。実際には粗い格子を用いた変形時の誤差を新たな移動量とし、一段階細かい格子を使用した変形を繰り返す。これにより変形を繰り返す度に誤差を低減することが可能となる。 In order to perform multi-level B-spline conversion, first, normal B-spline conversion using a coarse control lattice Φ 1 is performed as shown in FIG. Then, the error generated here is compensated by using a deformed lattice Φ 2 having a lattice interval smaller than Φ 1 as shown in FIG. Actually, an error at the time of deformation using a coarse grid is set as a new movement amount, and the deformation using a one-step fine grid is repeated. This makes it possible to reduce the error each time the deformation is repeated.

B−spline変換は移動量に引かれる様に滑らかに変形するので、変形を繰り返すことで前段階よりも誤差が増加することはない。ただし、変形回数に応じて計算時間は増加することになる。
multi−level B−spline変換は非常に有用な変形手法であるが、その反面多くの計算時間を必要とする。また、変形精度についても改善の余地がある。
Since the B-spline transformation is smoothly deformed so as to be drawn by the amount of movement, the error does not increase from the previous stage by repeating the deformation. However, the calculation time increases according to the number of deformations.
The multi-level B-spline transformation is a very useful deformation method, but requires a lot of calculation time. There is also room for improvement in deformation accuracy.

[3.画像処理装置の構成とその処理方法]
本実施形態に係る画像処理装置は、従来のmulti−level B−spline変換よりも変形精度をさらに向上し、変換の計算時間削減を達成したものである。
本実施形態に係る画像処理装置1は、以下に説明する画像変形処理を実行するコンピュータプログラムをコンピュータにインストールして構成されたものであり、画像処理装置1における各種の機能は、このコンピュータプログラムによって実現されている。
なお、前記コンピュータは、演算処理装置、記憶部、入出力デバイスなどを有している。
[3. Configuration of image processing apparatus and processing method thereof]
The image processing apparatus according to the present embodiment further improves the deformation accuracy over the conventional multi-level B-spline conversion and achieves a reduction in conversion calculation time.
The image processing apparatus 1 according to the present embodiment is configured by installing in a computer a computer program that executes image deformation processing described below. Various functions in the image processing apparatus 1 are performed by this computer program. It has been realized.
The computer includes an arithmetic processing unit, a storage unit, an input / output device, and the like.

図4は、画像処理装置1の機能ブロックを示している。この画像処理装置1は、基準点設定部11、目標点設定部12、パーツ設定部13、格子間隔設定部14、画像変形処理部15、誤差判定部16、及び格子間隔調整部17としての機能を有している。   FIG. 4 shows functional blocks of the image processing apparatus 1. The image processing apparatus 1 functions as a reference point setting unit 11, a target point setting unit 12, a parts setting unit 13, a lattice interval setting unit 14, an image deformation processing unit 15, an error determination unit 16, and a lattice interval adjustment unit 17. have.

基準点設定部11は、変形の対象となる画像(原画像)上において変形の基準となる複数の基準点(図2(b)参照)を設定するためのものである。基準点設定部11は、ユーザから基準点の位置を示す情報を受け付けて当該基準点の位置を記憶部に記憶するものであってもよいし、他のソフトウェアから与えられた基準点情報を受け付けて記憶部に記憶するものであってもよい。
なお、基準点は、画像中の変形対象物(例えば、人の顔)の任意の位置に設定することができる。
The reference point setting unit 11 is for setting a plurality of reference points (see FIG. 2B) that are deformation references on an image (original image) that is a deformation target. The reference point setting unit 11 may receive information indicating the position of the reference point from the user and store the position of the reference point in the storage unit, or may receive reference point information given from other software. May be stored in the storage unit.
Note that the reference point can be set at an arbitrary position of a deformation target (for example, a human face) in the image.

隣り合う基準点間の配置間隔は、一つのパーツ内において、ほぼ揃うように設定される。配置間隔は、完全に一致している必要はないが、ほぼ揃っていることで、当該パーツの適切な格子間隔を設定するのが容易となる。   Arrangement intervals between adjacent reference points are set so as to be substantially aligned within one part. Although it is not necessary for the arrangement intervals to be completely coincident with each other, it is easy to set an appropriate lattice interval of the parts by being substantially aligned.

目標点設定部12は、設定された複数の基準点それぞれについて、当該基準点の移動先を示す目標点(図2(b)参照 )を設定するためのものである。目標点設定部12も、ユーザから目標点の位置を示す情報を受け付けて当該目標点の位置を記憶部に記憶するものであってもよいし、他のソフトウェアから与えられた目標点情報を受け付けて記憶部に記憶するものであってもよい。   The target point setting unit 12 is for setting a target point (see FIG. 2B) indicating the destination of the reference point for each of the set reference points. The target point setting unit 12 may also receive information indicating the position of the target point from the user and store the position of the target point in the storage unit, or may receive target point information given from other software May be stored in the storage unit.

パーツ設定部13は、原画像において変形の対象となる領域を、複数のパーツ(領域)に分割して設定するためのものである。例えば、変形の対象となる領域が、人の顔である場合、複数のパーツとしては、例えば、図5中の各図において点線で囲まれた領域(目、眉毛、鼻、口、輪郭)を設定することができる。なお、一つのパーツが、互いに離れた複数の領域から構成されていてもよい。
パーツ設定部13は、パーツとなる領域をユーザからの入力によって設定するためのものであってもよいし、原画像に対する画像処理によって自動的にパーツを切り出すものであってもよい。
The parts setting unit 13 is for dividing and setting a region to be deformed in the original image into a plurality of parts (regions). For example, when the region to be deformed is a human face, the plurality of parts include, for example, regions (eyes, eyebrows, nose, mouth, contour) surrounded by dotted lines in each figure in FIG. Can be set. One part may be composed of a plurality of regions separated from each other.
The part setting unit 13 may be a part for setting a region to be a part by an input from a user, or may be a part that automatically cuts out a part by image processing on an original image.

格子間隔設定部14は、パーツ設定部13にて設定された各パーツの画像変形に用いられる制御格子の格子間隔を設定するためのものである。この格子間隔設定部14では、複数のパーツそれぞれについて適切な格子間隔を設定する。   The lattice interval setting unit 14 is for setting the lattice interval of the control lattice used for image deformation of each part set by the part setting unit 13. In the lattice interval setting unit 14, an appropriate lattice interval is set for each of a plurality of parts.

画像変形処理部15では、格子間隔設定部14で設定された格子間隔を有する制御格子を用いて原画像の画像変形処理を行うためのものである。この画像変形処理部15では、パーツ毎に異なる格子間隔の制御格子を用いて、B−spline変換により、パーツ毎の画像変形を行う。パーツ毎に異なる格子間隔の制御格子を用いるため、パーツ毎の適切な変形が実現できる。   The image deformation processing unit 15 performs image deformation processing of the original image using the control grid having the grid interval set by the grid interval setting unit 14. The image deformation processing unit 15 performs image deformation for each part by B-spline conversion using a control lattice having a different lattice interval for each part. Since a control lattice having a different lattice interval is used for each part, appropriate deformation for each part can be realized.

誤差判定部16は、パーツ毎に設定された制御格子を用いた画像変形によって移動した後の基準点の位置と前記目標点の位置との誤差を判定するためのものである。この誤差判定は、複数の基準点それぞれについて行われる。   The error determination unit 16 is for determining an error between the position of the reference point and the position of the target point after moving by image deformation using a control grid set for each part. This error determination is performed for each of a plurality of reference points.

格子間隔調整部17は、誤差判定部16によって算出された誤差が、所定の閾値よりも大きい基準点が存在する箇所については、先の画像変形で用いられた制御格子の格子間隔よりも小さい格子間隔(例えば、先の格子間隔の1/2の格子間隔)にするためのものである。格子間隔調整部17によって、格子間隔が小さくなるように調整された箇所(基準点)については、画像変形処理部15が、新たに設定された格子間隔の制御格子を用いて、再度の画像変形を行う。   The lattice interval adjustment unit 17 has a lattice smaller than the lattice interval of the control lattice used in the previous image deformation at a location where a reference point having an error calculated by the error determination unit 16 larger than a predetermined threshold exists. This is for setting the interval (for example, a lattice interval that is ½ of the previous lattice interval). For a portion (reference point) adjusted by the lattice interval adjustment unit 17 so that the lattice interval is reduced, the image deformation processing unit 15 uses the newly set lattice lattice control lattice to perform image deformation again. I do.

図6は、画像処理装置1による画像変形処理を示している。まず、変形を行いたいパーツの設定処理が行われる(ステップS1)。パーツ設定処理では、パーツ設定部13が、パーツとなる領域を指定する入力をユーザから受け付ける処理等を行う。後述の画像変形(ステップS4)では、パーツ毎に独立した画像変形の処理が行われる。   FIG. 6 shows image deformation processing by the image processing apparatus 1. First, a setting process for a part to be deformed is performed (step S1). In the part setting process, the part setting unit 13 performs a process of receiving an input for designating an area to be a part from the user. In the later-described image deformation (step S4), an independent image deformation process is performed for each part.

続いて、各パーツ内に、基準点及び基準点の移動先である目標点を設定する処理が行われる(ステップS2)。基準点及び目標点設定処理では、基準点設定部11及び目標点設定部12が、基準点及び目標点を指定する入力をユーザから受け付ける処理等を行う。なお、ステップS1,S2の実行順序は逆でもよい。   Subsequently, processing for setting a reference point and a target point to which the reference point is moved is performed in each part (step S2). In the reference point and target point setting process, the reference point setting unit 11 and the target point setting unit 12 perform a process of receiving an input for designating the reference point and the target point from the user. Note that the execution order of steps S1 and S2 may be reversed.

続いて、設定されたパーツ毎に適用される制御格子の格子間隔を設定する処理が行われる(ステップS3)。格子間隔設定処理では、格子間隔設定部14が、各パーツに含まれる基準点の間隔に応じて、格子間隔を決定する。つまり、パーツ内の基準点の配置が密であれば、格子間隔を小さくし、パーツ内の基準点の配置が疎であれば、格子間隔を大きくする。   Then, the process which sets the lattice space | interval of the control lattice applied for every set part is performed (step S3). In the lattice interval setting process, the lattice interval setting unit 14 determines the lattice interval according to the interval between the reference points included in each part. That is, if the arrangement of the reference points in the part is dense, the grid interval is reduced, and if the arrangement of the reference points in the part is sparse, the lattice interval is increased.

本実施形態では、格子間隔設定部14は、パーツ内において隣り合う基準点の格子方向における最大間隔を利用して、格子間隔を決定する。
ここで、あるパーツP内の複数の基準点Cが、図7(a)に示すように配置されているものとする。また、図7(a)に示すX軸方向、Y軸方向は、制御格子のそれぞれの格子方向(2次元の場合、縦方向及び横方向)と一致しているものとする。
この場合、格子間隔設定部14は、これらの複数の基準点Cのうち、X軸方向において最も離れて隣り合っている2つの基準点CX1,CX2を決定する(図7(b)参照)。これらの基準点CX1,CX2間の間隔Xは、このパーツP内において、隣り合う基準点のX軸方向間隔としては最大である。
In the present embodiment, the lattice interval setting unit 14 determines the lattice interval by using the maximum interval in the lattice direction of adjacent reference points in the part.
Here, it is assumed that a plurality of reference points C in a certain part P are arranged as shown in FIG. Further, it is assumed that the X-axis direction and the Y-axis direction shown in FIG. 7A coincide with the respective lattice directions of the control lattice (in the two-dimensional case, the vertical direction and the horizontal direction).
In this case, the lattice spacing setting unit 14 determines two reference points C X1 and C X2 which are adjacent to each other in the X-axis direction among the plurality of reference points C (see FIG. 7B). ). An interval X between these reference points C X1 and C X2 is the maximum interval in the X axis direction between adjacent reference points in the part P.

また、格子間隔設定部14は、複数の基準点Cのうち、Y軸方向において最も離れて隣り合っている2つの基準点CY1,CY2を決定する(図7(b)参照)。これらの基準点CY1,CY2間の間隔Yは、このパーツP内において、隣り合う基準点のY軸方向間隔としては最大である。 Further, the lattice interval setting unit 14 determines two reference points C Y1 and C Y2 that are adjacent to each other in the Y-axis direction among the plurality of reference points C (see FIG. 7B). The interval Y between these reference points C Y1 and C Y2 is the maximum as the Y-axis direction interval between adjacent reference points in this part P.

格子間隔設定部14は、X軸方向の最大間隔Xを、一方の格子方向(横方向)の格子間隔とし、Y軸方向の最大間隔Yを、他方の格子方向(縦方向)の格子間隔として設定する(図7(c)参照)。
以上のようにして、ある一つのパーツ用の制御格子の格子間隔が決定される。このようにして決定された格子間隔は、パーツ毎に適切なものとなっており、パーツ毎に適切な画像変形を行うのに好適である。
なお、上記のような格子間隔の決定の仕方が、好ましい理由については、後述する。
また、本実施形態では、最大間隔X,Yと格子間隔とを完全に一致させたが、多少は異なっていてもよい。
The lattice interval setting unit 14 uses the maximum interval X in the X-axis direction as the lattice interval in one lattice direction (lateral direction), and the maximum interval Y in the Y-axis direction as the lattice interval in the other lattice direction (vertical direction). Set (see FIG. 7C).
As described above, the lattice interval of the control lattice for a certain part is determined. The lattice spacing determined in this way is appropriate for each part, and is suitable for performing appropriate image deformation for each part.
The reason why the method of determining the lattice spacing as described above is preferable will be described later.
In the present embodiment, the maximum intervals X, Y and the lattice interval are completely matched, but may be slightly different.

以上のようなステップS3の格子間隔設定処理は、設定された複数のパーツそれぞれに対して行われる。したがって、パーツ毎に格子間隔が設定されることになる。   The lattice spacing setting process in step S3 as described above is performed for each of the set plurality of parts. Therefore, the grid interval is set for each part.

また、図8(a)に示すように、あるパーツP1の変形を担う第1の基準点群と、他のパーツP2の変形を担う第2の基準点群とが、近接して存在している場合には、それぞれのパーツに異なる格子間隔を設定して変形を行うことが困難である。
そこで、基準点群が近接している複数のパーツP1,P2については、これら複数のパーツP1,P2に共通の格子間隔を設定する。
つまり、両パーツP1,P2における基準点群のうち、X軸方向の最大間隔が、一方の格子方向(横方向)の格子間隔となり、Y軸方向の最大間隔が、他方の格子方向(縦方向)の格子間隔となる。
Further, as shown in FIG. 8 (a), a first reference point group responsible for deformation of a certain part P1 and a second reference point group responsible for deformation of another part P2 are present close to each other. In such a case, it is difficult to perform deformation by setting different lattice intervals for each part.
Therefore, for a plurality of parts P1 and P2 in which the reference point group is close, a grid interval common to the plurality of parts P1 and P2 is set.
That is, among the reference point groups in both parts P1, P2, the maximum interval in the X-axis direction is the lattice interval in one lattice direction (lateral direction), and the maximum interval in the Y-axis direction is the other lattice direction (vertical direction). ).

より具体的には、図8(b1)(b2)に示すように、まず、それぞれのパーツP1,P2について、図7に示した方法と同様の方法により、格子間隔を決定する。
その後、基準点群が近接しているパーツP1,P2については、図8(c)に示すように、それぞれの格子間隔を比較し、X軸方向及びY軸方向それぞれについて、より大きい格子間隔を、両パーツP1,P2共通の格子間隔として決定する(図8(d)参照)。
図8(d)の制御格子の場合、X軸方向の格子間隔は、パーツP2のX軸方向格子間隔が採用され、Y軸方向の格子間隔は、パーツP1のY軸方向格子間隔が採用されている。
More specifically, as shown in FIGS. 8B1 and 8B2, for each of the parts P1 and P2, the lattice spacing is determined by the same method as shown in FIG.
Thereafter, for the parts P1 and P2 in which the reference point groups are close to each other, as shown in FIG. 8C, the respective lattice intervals are compared, and a larger lattice interval is obtained in each of the X-axis direction and the Y-axis direction. , And determined as a grid interval common to both parts P1 and P2 (see FIG. 8D).
In the case of the control grid of FIG. 8D, the grid spacing in the X axis direction is the grid spacing in the X axis direction of the part P2, and the grid spacing in the Y axis direction is the grid spacing in the Y axis direction of the part P1. ing.

続いて、パーツ毎に設定された格子間隔の制御格子を用いて、各パーツ(目、眉毛、鼻、口、輪郭など)の画像変形が行われる(ステップS4)。本実施形態では、一つの画像であっても、パーツ毎の局所的な変形が独立して行われる(以下、パーツ毎に変形させる手法を、「部分変形法」という)。したがって、パーツ毎に異なる格子間隔の制御格子を用いることが可能である。なお、基準点群が近接するパーツについては、統合された共通の制御格子によって変形が一括して行われる。   Subsequently, image deformation of each part (eyes, eyebrows, nose, mouth, contour, etc.) is performed using a control grid having a grid interval set for each part (step S4). In the present embodiment, even for one image, local deformation for each part is performed independently (hereinafter, a method of deforming for each part is referred to as “partial deformation method”). Therefore, it is possible to use a control grid having a different grid interval for each part. In addition, about the part which a reference point group adjoins, a deformation | transformation is collectively performed by the integrated common control grid.

ステップS4の画像変形の後、画像変形に伴う各基準点の移動それぞれについて、誤差判定を行う(ステップS5)。誤差判定処理では、誤差判定部16が、図9に示すように、ある基準点が、制御格子を用いた画像変形によって移動した後の位置と、目標点と、の差分を求める。さらに、誤差判定部16は、その差分(誤差)を、所定の閾値と比較する。   After the image deformation in step S4, an error is determined for each movement of each reference point accompanying the image deformation (step S5). In the error determination process, as shown in FIG. 9, the error determination unit 16 obtains a difference between a position after a certain reference point is moved by image deformation using a control grid and a target point. Further, the error determination unit 16 compares the difference (error) with a predetermined threshold value.

そして、誤差が、所定の閾値よりも大きい箇所(基準点)については、設定された前記格子間隔よりも小さい格子間隔の制御格子を用いて、再度の画像変形を行う(ステップS6)。   For a portion (reference point) where the error is larger than a predetermined threshold value, image deformation is performed again using a control grid having a grid interval smaller than the set grid interval (step S6).

ここで、従来のmulit−level B−spline変換では、まず、図3(a)に示すように粗い制御格子を使用して変形を行った後、画像全体に対して、図3(b)に示すように細かい格子間隔を持つ制御格子をして再度の画像変形を行う。
mulit−level B−spline変換では、より細かい格子間隔を持つ制御格子による画像変形を繰り返すため、変形の誤差は小さくできるが、画像全体の画像変形を繰り返すため計算量が増大する。
Here, in the conventional multi-level B-spline transformation, first, deformation is performed using a coarse control grid as shown in FIG. 3A, and then the entire image is changed to FIG. 3B. As shown in the figure, a control grid having a fine grid interval is used to perform image deformation again.
In the multi-level B-spline conversion, image deformation by a control lattice having a finer lattice interval is repeated, so that the deformation error can be reduced, but the amount of calculation increases because image deformation of the entire image is repeated.

したがって、パーツ毎に画像変形を行う部分変形法において、単純に、従来のmulit−level B−spline変換を適用すると、パーツ全体について再度の画像変形が行われ、計算量が増大するという上記問題が残ったままとなる。   Therefore, in the partial deformation method in which image deformation is performed for each part, when the conventional multi-level B-spline conversion is simply applied, the above-described problem that the image deformation is performed again for the entire part and the amount of calculation increases. Will remain.

そこで、本実施形態では、変形誤差が、所定の閾値よりも大きい箇所(基準点)についてだけ、より細かい格子間隔を持つ制御格子による画像変形(以下、この画像変形の手法を、「適応的格子法」という)を行うことで、処理の高速化を図る(ステップS6)。   Therefore, in the present embodiment, image deformation using a control lattice having a finer lattice interval (hereinafter referred to as “adaptive lattice”) is applied only to a portion (reference point) where the deformation error is larger than a predetermined threshold. The process is speeded up (step S6).

適応的格子法では、変形誤差が少ない箇所では、比較的大きな格子間隔の制御格子による変換(低レベル変換)で済ませ、変形誤差が大きい箇所のみ、比較的小さな格子間隔の制御格子による変換(高レベル変換)を行う。これにより、再度の画像変形の際に、画像変形のための計算を行う領域を削減でき、不要な繰り返し計算を低減することができる。   In the adaptive grid method, conversion with a control grid with a relatively large grid spacing (low level conversion) can be performed at a location where deformation error is small, and conversion with a control grid with a relatively small grid spacing (high level) is performed only at a location with large deformation error. Level conversion). Thereby, in the case of the image deformation again, the area for calculation for the image deformation can be reduced, and unnecessary repeated calculation can be reduced.

図10は、適応的格子法における格子間隔の縮小の仕方を示している。あるパーツに対して、図10(a)に示すサイズの制御格子を用いて第1段階の画像変形(ステップS4)が行われた後、変形誤差の大きい箇所については、格子間隔調整部17が、格子間隔を小さく(例えば、1/2縮小)する。図10(b)は、第2段階の画像変形のために、部分的に格子間隔が小さくなった制御格子を示している。   FIG. 10 shows how to reduce the lattice spacing in the adaptive lattice method. After the first-stage image deformation (step S4) is performed on a certain part using the control lattice of the size shown in FIG. The lattice spacing is reduced (for example, reduced by 1/2). FIG. 10B shows a control lattice in which the lattice spacing is partially reduced due to the second stage image deformation.

そして、画像変形処理部15は、変形誤差の大きい箇所について、第1段階の画像変形(ステップS4)による移動後の基準点の位置を新たな基準点とし、当該新たな基準点を目標点まで移動させる画像変形を行う。   Then, the image deformation processing unit 15 sets the position of the reference point after the movement by the first-stage image deformation (step S4) as a new reference point for a portion with a large deformation error, and uses the new reference point to the target point. Perform image transformation to move.

このような再度の画像変形は、すべての基準点について、変形誤差が所定の閾値よりも小さくなるまで繰り返される。したがって、第2段階の画像変形で、変形誤差が残っている箇所については、図10(c)に示すように、さらに格子間隔の縮小化が行われる。適応的格子法では、制御格子の縮小化を繰り返しても、繰り返す度に、計算が必要な領域が小さくなるため、計算量の増大が抑えられる。   Such a second image deformation is repeated for all the reference points until the deformation error becomes smaller than a predetermined threshold value. Therefore, in the second stage of image deformation, the lattice spacing is further reduced as shown in FIG. In the adaptive lattice method, even if the reduction of the control lattice is repeated, the area that needs to be calculated becomes smaller each time the control lattice is repeated, so that an increase in the amount of calculation can be suppressed.

適応的格子法では、誤差低減という観点では、mulit−level B−spline変換と同様の処理が行われているため、mulit−level B−spline変換と同様に良好な画像変形精度が得られる。
しかも、適応的格子法では、mulit−level B−spline変換のように画像全体にmulit−levelの処理を行うのではなく、変形誤差の大きい箇所だけmulit−levelの処理を行うため、計算量を削減できる。
In the adaptive grid method, from the viewpoint of error reduction, the same processing as the multi-level B-spline conversion is performed, and therefore, good image deformation accuracy can be obtained as in the multi-level B-spline conversion.
Moreover, in the adaptive grid method, the multi-level processing is not performed on the entire image as in the multi-level B-spline conversion, but the multi-level processing is performed only on the portion where the deformation error is large. Can be reduced.

なお、本実施形態では、ユーザの見た目上、変形が発生しない箇所(算出された移動距離が1ピクセル未満の箇所等)については、ピクセル操作等の各ピクセルの移動量計算後の処理を省略する。
例えば、図11(a)のように、2つの基準点C,Cがあった場合、変形のための計算が行われる領域(基準点Cの影響領域)は、図11(a)における塗りつぶし範囲(基準点を含む周辺の領域)となる。
しかし、基準点C,Cから離れた位置においては、算出された移動量が1ピクセル未満となることがある。そのような範囲については、実際に画像の移動操作(画像変形処理)のための計算を行っても、結果として画像は変形しない。
In the present embodiment, the processing after calculation of the movement amount of each pixel such as pixel operation is omitted for a portion where the deformation does not occur (a portion where the calculated moving distance is less than one pixel). .
For example, as shown in FIG. 11 (a), when there are two reference points C and C, the area where the calculation for deformation is performed (the influence area of the reference point C) is the filled range in FIG. 11 (a). (Peripheral area including the reference point).
However, at a position away from the reference points C and C, the calculated movement amount may be less than one pixel. For such a range, even if a calculation for an image moving operation (image deformation process) is actually performed, the image is not deformed as a result.

そこで、本実施形態では、各ピクセルについて、算出された移動量を、所定の閾値(例えば,0.5ピクセル)と比較し、移動量が閾値未満の場合には、見た目上変形が発生しない箇所であると判定し、そのピクセルの移動操作処理を省略する。
図11(b)の塗りつぶし範囲は、実際に移動操作処理が行われる範囲を示している。なお、ここでは、ピクセルの移動操作処理の際には、算出された移動距離を四捨五入するため、移動量が閾値(0.5)以上の場合には、1ピクセル分の移動が生じることになる。
Therefore, in the present embodiment, for each pixel, the calculated movement amount is compared with a predetermined threshold value (for example, 0.5 pixel), and when the movement amount is less than the threshold value, no apparent deformation occurs. And the pixel movement operation process is omitted.
The filled range in FIG. 11B indicates a range where the movement operation process is actually performed. Here, in the pixel movement operation process, the calculated movement distance is rounded off, so that when the movement amount is equal to or greater than the threshold value (0.5), movement for one pixel occurs. .

[4.基準点の配置間隔と格子間隔についての考察]
変形対象に基準点を配置する際、高精度の変形を実現しようとすると基準点の配置間隔は各パーツの形状の細かさに応じて変化してくる。細かさの異なる複数のパーツに対して同一サイズの制御格子を用いた変形を行った場合、その格子の格子間隔は必ずしも変形に最適なものではなく、変形精度を悪化させる要因となる。
[4. Consideration of reference point arrangement and grid spacing]
When the reference points are arranged on the deformation target, the arrangement interval of the reference points changes according to the shape of each part in order to realize high-precision deformation. When deformation using a control grid of the same size is performed on a plurality of parts having different fineness, the lattice spacing of the lattice is not necessarily optimal for deformation, and causes deterioration in deformation accuracy.

変形精度の悪化の原因としては、格子間隔が大きすぎる場合と、格子間隔が小さすぎる場合とに大別される。
格子間隔が大きすぎる場合、(i)意図しない領域における変形の発生、(ii)変形精度の悪化などの問題が生じる。
The cause of the deterioration of the deformation accuracy is roughly classified into a case where the lattice spacing is too large and a case where the lattice spacing is too small.
When the lattice interval is too large, problems such as (i) occurrence of deformation in an unintended region and (ii) deterioration of deformation accuracy occur.

変形に使用する制御格子の格子間隔を拡大すると、それに伴って各基準点の移動により影響を受ける範囲も拡大する。これが極端になると変形の局所性が失われ、本来の変形対象領域外でも大きな変形が発生してしまう様になる。
また、格子間隔の大きな制御格子を用いて変形を行う場合、前述のように各基準点から影響を受ける領域は大きくなり、近傍に存在する他の基準点の影響領域と重なりやすくなる。この際、式(1)によりその誤差を最小とする様配慮はしていても多数の影響領域が重なり合う場合にはこの誤差は大きくなり、ぼやけも発生しがちとなる。
When the lattice spacing of the control lattice used for deformation is increased, the range affected by the movement of each reference point is also increased accordingly. When this becomes extreme, the locality of deformation is lost, and a large deformation occurs outside the original deformation target area.
In addition, when deformation is performed using a control grid having a large grid interval, the area affected by each reference point becomes large as described above, and the area affected by other reference points existing in the vicinity tends to overlap. At this time, even if care is taken to minimize the error according to equation (1), this error becomes large and blurring tends to occur when a large number of affected areas overlap.

また、格子間隔が小さすぎる場合、(iii)形状変化の過度な局所化、(iv)形状変化の不成立などの問題が生じる。   Further, when the lattice spacing is too small, problems such as (iii) excessive localization of shape change and (iv) failure of shape change occur.

複数の基準点を用いて一つのパーツの変形を実現する場合、サイズの小さ過ぎる格子を使用して変形を行うと、各基準点による変形が必要以上に局所化してしまう。この結果、それぞれの変形がスムーズに繋がり合わず、自然な変形を行うことが出来なくなる。
また、B−spline変換では、基準点の周囲9つの領域においてのみ点の移動の影響を受ける.しかし、小さなサイズの格子を用いて変形を行った場合(もしくは基準点の移動量が格子サイズに対して著しく大きい場合)、基準点の移動先がこの領域内に収まらなくなり。正常な変形が実現されない。この不自然さは上記の(i)〜(iii)において発生する不自然さよりも顕著なものとなる。
When the deformation of one part is realized using a plurality of reference points, if the deformation is performed using a grid that is too small in size, the deformation by each reference point is localized more than necessary. As a result, the respective deformations are not smoothly connected and natural deformation cannot be performed.
Also, the B-spline transformation is affected by the movement of points only in nine regions around the reference point. However, when deformation is performed using a small-size grid (or when the movement amount of the reference point is significantly larger than the grid size), the movement destination of the reference point does not fit in this region. Normal deformation is not realized. This unnaturalness becomes more prominent than the unnaturalness generated in the above (i) to (iii).

これらを考慮すると高精度のB−spline変換を行うには同一パーツの変形を担う隣り合った基準点の影響領域はある程度以上重なり合う必要がある。
一方、他パーツの変形を担う基準点の影響領域とは重なりが発生しないように調節する必要があることがわかる。
Considering these, in order to perform B-spline conversion with high accuracy, the influence areas of adjacent reference points responsible for deformation of the same part need to overlap to some extent.
On the other hand, it can be seen that it is necessary to adjust so as not to overlap with the influence area of the reference point responsible for deformation of other parts.

また、同一パーツの変形を担う基準点同士でもすべての基準点において影響領域が重複する場合、基準点の数にもよるがぼやけや変形誤差が発生しがちとなる。
同一パーツの変形を担う隣り合った基準点においてのみ変形に不自然さが発生しない程度に影響領域を重複させ、それ以外の場合は極力影響領域が重なり合わない様に格子の間隔を調整するのが好ましい。
In addition, even when the reference points responsible for deformation of the same part are overlapped with each other at the reference points, blurring and deformation errors tend to occur depending on the number of reference points.
The affected areas are overlapped to the extent that no unnaturalness occurs in the deformation only at adjacent reference points that carry the deformation of the same part, and in other cases, the lattice spacing is adjusted so that the affected areas do not overlap as much as possible. Is preferred.

また、上記の4つの問題点のうち、問題(iv)が発生した場合、変形の不自然さは最も大きなものとなる。そこで、問題(iv)が発生しないことを最重要と考え,その上で他の3つの問題が極力発生しない様に格子のサイズを規定するのが好ましい。   In addition, among the above four problems, when the problem (iv) occurs, the unnaturalness of deformation becomes the largest. Therefore, it is considered most important that the problem (iv) does not occur, and it is preferable to define the size of the lattice so that the other three problems do not occur as much as possible.

ここで、B−spline変換による変形実行時の制御格子の分割数を検討するため、基準点間の距離(最大間隔)と制御格子の格子間隔とを関連付けてアンケート調査を行った。 アンケート調査には25名の男女の顔画像に対して格子間隔を変化させて変形を行った100枚の画像を使用し、32名の男女から回答を得た。この調査結果を下記の図12に示す。   Here, in order to examine the number of divisions of the control grid at the time of execution of deformation by B-spline transformation, a questionnaire survey was conducted in association with the distance between the reference points (maximum spacing) and the grid spacing of the control grid. In the questionnaire survey, 100 images obtained by changing the lattice spacing of the face images of 25 men and women were used, and responses were obtained from 32 men and women. The results of this investigation are shown in FIG.

図12より格子間隔が基準点間の距離よりも大きな場合、8割以上の回答者が不自然さを感じないと回答していることがわかる。また、その後のヒアリングにより格子間隔と基準点間の距離が同程度の画像では上記の問題(iii)(iv)はほとんど認知されていないことがわかった。不自然さの理由としては変形させている顔の輪郭の形状に対するものがほとんどであるが、その周囲に配置されている頭髪の形状に不自然さを感じる回答者もいた。   It can be seen from FIG. 12 that when the lattice spacing is larger than the distance between the reference points, 80% or more of the respondents answered that they do not feel unnaturalness. Further, it was found from the subsequent hearing that the above problems (iii) and (iv) were hardly recognized in the images having the same distance between the lattice and the reference point. Most of the reasons for the unnaturalness are the shape of the contour of the face being deformed, but some respondents felt unnaturalness in the shape of the hair arranged around it.

また、図12より問題(iii)(iv)が認識されなくなったあと、制御格子のサイズ(格子間隔)を大きくしても形状が不自然だとする回答数はあまり収束していないことがわかる。また、先に説明した様に格子のサイズを大きくしすぎると問題(i)、(ii)よる影響が大きく反映されてしまう。このことから前記部分変形法では同一パーツの変形を担う基準点群のうち、隣り合う基準点間の最大距離を制御格子の格子間隔として定義し、変形に使用した。これにより問題(iii)、(iv)をなるべく低減させ,問題(i)、(ii)による影響も抑えることが可能となる。   In addition, from FIG. 12, after the problems (iii) and (iv) are not recognized, the number of answers that the shape is unnatural has not converged so much even if the size of the control grid (lattice interval) is increased. . Further, as described above, if the size of the lattice is too large, the influences of the problems (i) and (ii) are greatly reflected. Therefore, in the partial deformation method, the maximum distance between adjacent reference points among the reference point groups responsible for deformation of the same part is defined as the lattice spacing of the control lattice and used for deformation. As a result, the problems (iii) and (iv) can be reduced as much as possible, and the influence of the problems (i) and (ii) can be suppressed.

[5.実験結果]
下記表1は、a)従来のmulti−level B−spline変換の計算時間、b)画像全体を適応的格子法だけで処理した場合の計算時間(部分変形法は不採用)、c)部分変形法と従来のmulti−level B−spline変換とを組み合わせた場合の計算時間、d)部分変形法と適応的格子法を組み合わせた場合(図6の場合)の計算時間、を示している。
[5. Experimental result]
Table 1 below shows a) calculation time of the conventional multi-level B-spline transformation, b) calculation time when the entire image is processed only by the adaptive grid method (partial deformation method is not adopted), and c) partial deformation. The calculation time when combining the method and the conventional multi-level B-spline transformation, and d) the calculation time when combining the partial deformation method and the adaptive lattice method (in the case of FIG. 6) are shown.

Figure 2011170541
Figure 2011170541

表1に示すようにb)適応的格子法では、a)従来のmulti−level B−spline変換の処理を削減できているため、処理が高速化していることがわかる。また、c)の部分変形法では、計算時間は、a)従来のmulti−level B−spline変換とほとんどかわらないが、誤差を小さくできた。
d)部分変形法と適応的格子法を組み合わせた場合は、誤差を小さくできるとともに、計算時間の削減も達成できている。
As shown in Table 1, it can be seen that in b) the adaptive lattice method, a) the conventional multi-level B-spline conversion process can be reduced, so that the process is accelerated. Further, in the partial deformation method of c), the calculation time is almost the same as that of the conventional multi-level B-spline transformation, but the error can be reduced.
d) When the partial deformation method and the adaptive lattice method are combined, the error can be reduced and the calculation time can be reduced.

[6.付記]
なお、上記において開示した事項は、例示であって、本発明を限定するものではなく、様々な変形が可能である。
また、本明細書には、特許請求の範囲に記載した発明以外の他の発明も開示されている。例えば、本明細書には、以下の発明が記載されている。
[6. Addendum]
In addition, the matter disclosed above is an exemplification, and does not limit the present invention, and various modifications are possible.
The present specification also discloses other inventions other than those described in the claims. For example, the following invention is described in this specification.

変形前の原画像において設定された基準点及び当該基準点の移動先を示す目標点から、画像を変形させるための制御格子における各頂点の移動量を取得し、各頂点の移動量が取得された制御格子を用いて、前記原画像の変形を行う画像変形方法であって、原画像に含まれる基準点の間隔に応じて、前記制御格子の格子間隔を決定するステップを含むことを特徴とする画像変形方法。   The movement amount of each vertex in the control grid for deforming the image is acquired from the reference point set in the original image before deformation and the target point indicating the movement destination of the reference point, and the movement amount of each vertex is acquired. An image deformation method for deforming the original image using the control grid, comprising: determining a grid interval of the control grid in accordance with an interval between reference points included in the original image, Image transformation method.

変形前の原画像において設定された基準点及び当該基準点の移動先を示す目標点から、画像を変形させるための制御格子における各頂点の移動量を取得し、各頂点の移動量が取得された制御格子を用いて、前記原画像の変形を行う画像変形方法であって、所定の格子間隔の制御格子を用いた前記画像変形によって移動した後の基準点の位置と前記目標点の位置との誤差が、所定の閾値よりも大きい箇所については、前記格子間隔よりも小さい格子間隔の制御格子を用いて、再度の画像変形を行うことを特徴とする画像変形方法。   The movement amount of each vertex in the control grid for deforming the image is acquired from the reference point set in the original image before deformation and the target point indicating the movement destination of the reference point, and the movement amount of each vertex is acquired. An image deformation method for deforming the original image using the control grid, wherein the position of the reference point and the position of the target point after being moved by the image deformation using the control grid with a predetermined grid interval An image deformation method characterized by performing image deformation again for a portion where the error is larger than a predetermined threshold by using a control lattice having a lattice interval smaller than the lattice interval.

1 画像処理装置
11 基準点設定部
12 目標点設定部
13 パーツ設定部
14 格子間隔設定部
15 画像変形処理部
16 誤差判定部
17 格子間隔調整部
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 11 Reference point setting part 12 Target point setting part 13 Parts setting part 14 Lattice space | interval setting part 15 Image deformation | transformation processing part 16 Error determination part 17 Lattice space | interval adjustment part

Claims (7)

変形前の原画像において設定された基準点及び当該基準点の移動先を示す目標点から、画像を変形させるための制御格子における各頂点の移動量を取得し、各頂点の移動量が取得された制御格子を用いて、前記原画像の変形を行う画像変形方法であって、
前記原画像中における複数のパーツを設定するパーツ設定ステップと、
前記複数のパーツそれぞれについて、制御格子の格子間隔を設定する格子間隔設定ステップと、を含み、
複数のパーツそれぞれの画像変形を、前記格子間隔設定ステップにて設定された格子間隔の制御格子を用いて行う
ことを特徴とする画像変形方法。
The movement amount of each vertex in the control grid for deforming the image is acquired from the reference point set in the original image before deformation and the target point indicating the movement destination of the reference point, and the movement amount of each vertex is acquired. An image deformation method for deforming the original image using a control lattice,
A parts setting step for setting a plurality of parts in the original image;
For each of the plurality of parts, including a lattice interval setting step for setting a lattice interval of the control lattice,
An image deformation method, wherein image deformation of each of a plurality of parts is performed using a lattice control lattice set in the lattice interval setting step.
前記格子間隔設定ステップでは、格子間隔の設定対象となっているパーツに含まれる基準点の間隔に応じて、格子間隔を決定する
ことを特徴とする請求項1記載の画像変形方法。
The image deformation method according to claim 1, wherein, in the lattice interval setting step, the lattice interval is determined according to the interval between reference points included in a part for which the lattice interval is to be set.
前記格子間隔設定ステップでは、前記パーツ内において隣り合う基準点の格子方向における最大間隔に応じて、当該格子方向における格子間隔を決定する
ことを特徴とする請求項2記載の画像変形方法。
The image deformation method according to claim 2, wherein, in the lattice interval setting step, the lattice interval in the lattice direction is determined according to the maximum interval in the lattice direction of adjacent reference points in the part.
前記格子間隔設定ステップでは、前記最大間隔にほぼ等しい値を、当該格子方向における格子間隔として決定する
ことを特徴とする請求項3記載の画像変形方法。
The image deformation method according to claim 3, wherein in the lattice interval setting step, a value substantially equal to the maximum interval is determined as a lattice interval in the lattice direction.
設定された格子間隔の制御格子を用いた前記画像変形によって移動した後の基準点の位置と前記目標点の位置との誤差が、所定の閾値よりも大きい箇所については、設定された前記格子間隔よりも小さい格子間隔の制御格子を用いて、再度の画像変形を行う
請求項1〜4のいずれか1項に記載の画像変形方法。
For a location where the error between the position of the reference point and the position of the target point after moving by the image deformation using the control grid of the set grid interval is larger than a predetermined threshold, the set grid interval The image deformation method according to claim 1, wherein the image deformation is performed again using a control lattice having a smaller lattice interval.
変形前の原画像において設定された基準点及び当該基準点の移動先を示す目標点から、画像を変形させるための制御格子における各頂点の移動量を取得し、各頂点の移動量が取得された制御格子を用いて、前記原画像の変形を行う画像処理装置であって、
前記原画像中における複数のパーツを設定するパーツ設定手段と、
前記複数のパーツそれぞれについて、制御格子の格子間隔を設定する格子間隔設定手段と、を含み、
複数のパーツそれぞれの画像変形が、前記格子間隔設定手段にて設定された格子間隔の制御格子を用いて行われるよう構成されている
ことを特徴とする画像処理装置。
The movement amount of each vertex in the control grid for deforming the image is acquired from the reference point set in the original image before deformation and the target point indicating the movement destination of the reference point, and the movement amount of each vertex is acquired. An image processing apparatus that performs deformation of the original image using a control grid,
Parts setting means for setting a plurality of parts in the original image;
For each of the plurality of parts, including lattice interval setting means for setting the lattice interval of the control lattice,
An image processing apparatus configured to perform image deformation of each of a plurality of parts using a control lattice having a lattice interval set by the lattice interval setting means.
コンピュータを、請求項6記載の画像処理装置として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as the image processing apparatus according to claim 6.
JP2010032680A 2010-02-17 2010-02-17 Image deformation method, image processing apparatus, and computer program Expired - Fee Related JP5565671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010032680A JP5565671B2 (en) 2010-02-17 2010-02-17 Image deformation method, image processing apparatus, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010032680A JP5565671B2 (en) 2010-02-17 2010-02-17 Image deformation method, image processing apparatus, and computer program

Publications (2)

Publication Number Publication Date
JP2011170541A true JP2011170541A (en) 2011-09-01
JP5565671B2 JP5565671B2 (en) 2014-08-06

Family

ID=44684618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010032680A Expired - Fee Related JP5565671B2 (en) 2010-02-17 2010-02-17 Image deformation method, image processing apparatus, and computer program

Country Status (1)

Country Link
JP (1) JP5565671B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105074780A (en) * 2013-02-23 2015-11-18 高通股份有限公司 Systems and methods for interactive image caricaturing by an electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6013063078; 瀬尾昌孝,陳延偉: 'Multi-level B-スプライン変換による画像変形とその改良' 第14回 日本顔学会大会(フォーラム顔学2009) , 20091031, 日本顔学会 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105074780A (en) * 2013-02-23 2015-11-18 高通股份有限公司 Systems and methods for interactive image caricaturing by an electronic device
JP2016515236A (en) * 2013-02-23 2016-05-26 クゥアルコム・インコーポレイテッドQualcomm Incorporated System and method for interactive image caricature using electronic devices
US10379734B2 (en) 2013-02-23 2019-08-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
US10761721B2 (en) 2013-02-23 2020-09-01 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN105074780B (en) * 2013-02-23 2020-11-10 高通股份有限公司 System and method for interactive image caricature generation by an electronic device
CN112215914A (en) * 2013-02-23 2021-01-12 高通股份有限公司 System and method for interactive image caricature generation by an electronic device
US11526272B2 (en) 2013-02-23 2022-12-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device

Also Published As

Publication number Publication date
JP5565671B2 (en) 2014-08-06

Similar Documents

Publication Publication Date Title
US8154544B1 (en) User specified contact deformations for computer graphics
JP2021061041A (en) Foveated geometry tessellation
CN111194550B (en) Processing 3D video content
JP5653541B2 (en) Drawing data generation apparatus and image drawing apparatus
JP2008033940A (en) Run time/computer graphic animation/conversion in engine from deformation data for mesh to animation data for skeleton, skinning, and shading
US8576225B2 (en) Seamless fracture in a production pipeline
JP6863596B6 (en) Data processing device and data processing method
JP3892016B2 (en) Image processing apparatus and image processing method
JPH11339061A (en) Three dimensional polygon display device using hierarchical polygon data
Petkov et al. Interactive visibility retargeting in vr using conformal visualization
JP4668289B2 (en) Image processing apparatus and method, and program
JP5565671B2 (en) Image deformation method, image processing apparatus, and computer program
JP2016157174A (en) Three-dimensional space data interpolation program and shape generation program achieved by combining the same
WO2014016894A1 (en) Shape data generation method and device
JP4918577B2 (en) Image processing system and image processing method
US9275487B1 (en) System and method for performing non-affine deformations
US20120050304A1 (en) Image processing apparatus, method, and program
JP2012065202A (en) Apparatus, method, and program for processing image
JPWO2016092588A1 (en) Drawing apparatus and drawing method
US10275925B2 (en) Blend shape system with texture coordinate blending
JP2007048151A (en) Method for mapping object mesh model onto three-dimensional curved surface
JP2012039331A (en) Parallax image creation device, parallax image creation method, program, and storage medium
JP2009205553A (en) Image creating device and method therefor
JP5966800B2 (en) Image processing apparatus, image processing method, and program
JP2009104228A (en) Image alignment method and image alignment program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140220

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: 20140513

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140605

R150 Certificate of patent or registration of utility model

Ref document number: 5565671

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees