Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3764972B2 - Image deformation device and image deformation method - Google Patents
[go: Go Back, main page]

JP3764972B2 - Image deformation device and image deformation method - Google Patents

Image deformation device and image deformation method Download PDF

Info

Publication number
JP3764972B2
JP3764972B2 JP23859599A JP23859599A JP3764972B2 JP 3764972 B2 JP3764972 B2 JP 3764972B2 JP 23859599 A JP23859599 A JP 23859599A JP 23859599 A JP23859599 A JP 23859599A JP 3764972 B2 JP3764972 B2 JP 3764972B2
Authority
JP
Japan
Prior art keywords
image
pixel
original image
deformed
coordinates
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
JP23859599A
Other languages
Japanese (ja)
Other versions
JP2001069337A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP23859599A priority Critical patent/JP3764972B2/en
Publication of JP2001069337A publication Critical patent/JP2001069337A/en
Application granted granted Critical
Publication of JP3764972B2 publication Critical patent/JP3764972B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像変形装置に関し、特に、ディジタル画像を元画像とし、この元画像の非相似形の変形画像を生成する装置に関する。
【0002】
【従来の技術】
近時、ディジタル信号処理とLSI技術の進歩によって、テレビジョン信号等のアナログ画像をディジタル画像として容易に処理できるようになり、画像の圧縮や画像の編集加工等を自在に行えるようになった。例えば、画像の編集加工の一つに“変形”がある。この変形処理は「相似変形」と「非相似変形」に分けることができる。前者は元画像と相似の変形画像を生成し、後者は元画像と非相似の変形画像を生成する。
ここで、両者の処理時間に着目すると、非相似変形の処理時間は相似変形のそれに比べて長い。相似変形では元画像の水平方向と垂直方向の画素を変形率に応じた割合で間引きまたは補間するだけでよいのに対し、非相似変形では写像関数などを用いて変形画像のすべての画素情報を逐一再現しなければならないからである。
【0003】
図15は、元画像1と変形画像2を示す概念図である。図示の元画像1と変形画像2は非相似の関係にあり、この関係は写像(mapping)として表現することができる。今、元画像1の任意画素Pの座標を(Xs,Ys)とすると、この画素Pに対応する変形画像2の画素Qの座標(Xd,Yd)は、次式(1)で表すことができる。
(Xd,Yd)=F(Xs,Ys) ……(1)
Fは写像であり、写像Fの逆写像をF-1とすると、元画像1の画素Pの座標(Xs,Ys)は、次式(2)で表すことができる。
(Xs,Ys)=F-1(Xd,Yd) ……(2)
【0004】
変形画像2を生成する場合、変形画像2を構成するすべての画素について、式(2)を用いてその画素座標(Xd,Yd)に対応する元画像1の画素座標(Xs,Ys)を特定し、その画素値を取得して変形画像2の座標(Xd,Yd)の画素値にセットするという処理を繰り返す。繰り返しの回数は変形画像2の画素数であり、例えば、変形画像2の横方向画素数をWd、縦方向画素数をHdとすると、Wd×Hd回の繰返しになる。
【0005】
図16は、従来の画像変形処理(特に非相似変形を行うもの)のフローチャートである。このフローチャートは、まず、変形画像2の横方向画素数と縦方向画素数をそれぞれ変数Wd、Hdにセットし(ステップS1)、二つのループ変数Yd、Xdに1をセットして初期化(ステップS2、ステップS3)した後、前式(2)を用いて、変形画像2の座標(Xd,Yd)に対応する元画像1の座標(Xs,Ys)を特定する(ステップS4)。ここに、Yd=1、Xd=1の場合、(Xd,Yd)は(1,1)となる。
【0006】
次に、特定された元画像1の座標(Xs,Ys)の画素値を変形画像2の座標(Xd,Yd)にセット(ステップS5)し、Xdを+1(ステップS6)した後、式「Xd==Wd」(“==”は等号演算子;以下同様)を評価(ステップS7)する。そして、評価結果がFalse(フロー中では“NO”)の間、Xdを+1しながら、ステップS4〜ステップS7のループを繰り返し実行する。ここに、Xdはループ変数、Wdは変形画像2の横方向画素数であるから、ループ回数(Xd)が変形画像2の横方向画素数Wdに到達するまでの間、式「Xd==Wd」の評価結果はFalseを維持する。したがって、ステップS4の実行回数はWd回となる。
【0007】
一方、ステップS4の実行回数がWd回に達して、ステップS7の評価結果がTrue(フロー中では“YES”)になると、Ydを+1(ステップS8)した後、式「Yd==Hd」を評価(ステップS9)し、そして、評価結果がFalseであれば、再びXdを初期化してステップS4をWd回繰り返し実行する。
ここに、Ydはループ変数、Hdは変形画像2の縦方向画素数であるから、ループ回数(Yd)が変形画像2の縦方向画素数Hdに到達するまでの間、式「Yd==Hd」の評価結果はFalseを維持する。したがって、ステップS4の最終的な実行回数はWd×Hd回、すなわち、変形画像2の画素数に相当する回数になる。
【0008】
【発明が解決しようとする課題】
上記従来の画像変形処理にあっては、変形画像2の画素数に相当する回数だけ前式(2)を繰り返す必要がある。一般に前式(2)は非線形の変換であるから、演算に時間がかかり、特に、ディスプレイの表示を見ながら非相似変形の操作を行う場合に表示の更新が間に合わないことがあり、この場合、変形途中の画像をリアルタイムに描画できず、画像の表示にギクシャク感を伴うという問題点があった。
したがって、本発明が解決しようとする課題は、非相似変形を行う場合の処理を効率化し、以って変形途中の画像をリアルタイムに描画できるようにすることにある。
【0009】
【課題を解決するための手段】
本発明の画像変形装置は、元画像を用いて非相似形の変形画像に変形する画像変形装置において、前記元画像の変形方法を示す変形情報に基づいて前記元画像上の指定された画素座標に対応する前記変形画像上の画素座標を特定する第1特定手段と、前記第1特定手段によって特定された前記変形画像上の画素座標に隣接する1または複数の画素座標を補間画素座標として特定する第2特定手段と、前記第1特定手段によって特定された前記変形画像上の画素座標および前記第2特定手段によって特定された前記補間画素座標に対して、前記元画像上の前記指定された画素座標の画素値を設定する画素値設定手段と、前記元画像を構成する複数の画素座標の各々に対して、前記第1特定手段、前記第2特定手段、および前記画素値設定手段による処理を実行させることにより前記変形画像を構成する複数の画素座標の各々に対する画素値を設定する第1制御手段と、を備えたことを特徴とする。
【0010】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態を詳細に説明する。
<画像変形装置の構成>
図1は、画像変形装置10のブロック図であり、それぞれのブロックは以下の機能を有する。なお、各機能は論理回路等のハードロジックで実現してもよいし、パーソナルコンピュータ等のハードウェアリソースと所要のアプリケーションソフトプログラム等のソフトウェアリソースとの有機的結合によって実現してもよい。
【0011】
画像入力部11は、変形対象の画像(元画像3)を取り込み保持する。元画像3はn×m個の画素で構成されたディジタル画像であり、各々の画素に色や輝度の情報(モノクロの場合は輝度のみ)をもつ、例えば、写真やビットマップイメージ等のグラフィックデータである。
情報入力部12は、ユーザによって入力された変形情報5を取り込み保持する。変形情報5は元画像3をどのように変形するかを示す情報である。例えば、元画像3を単純に拡大・縮小する場合(相似変形)はその拡大率または縮小率であるが、複雑な変形(非相似変形)を行う場合は元画像3の写像Fを表す情報である。
【0012】
第1パラメータ生成部13は、変形画像4の画素座標の特定に必要な第1パラメータ群を生成する。第1パラメータ群は、例えば、元画像3の横方向画素数Wsと縦方向画素数Hsおよび変形情報5から特定した変形画像4の横方向画素数Wdと縦方向画素数Hdなどである。
第2パラメータ生成部14は、変形画像4の補間画素の座標特定に必要な第2パラメータ群を生成する。第2パラメータ群は、例えば、元画像3の横方向画素数Wsと変形画像4の横方向画素数Wdの比(以下「横方向画素数比Wr」という)および元画像3の縦方向画素数Hsと変形画像4の縦方向画素数Hdの比(以下「縦方向画素数比Hr」という)である。但し、横方向画素数比Wrおよび縦方向画素数比Hrは小数点以下の値を含まない整数値である。
【0013】
変形画像座標生成部(第1特定手段)15は、前記第1パラメータ群を用いて変形画像4の画素座標を生成する。生成される画素座標は、元画像3の画素座標(Xs,Ys)に対応する画素座標(Xd,Yd)であり、元画像3はn×m個の画素で構成されているから、この変形画像座標生成部15は、変形画像4を構成するすべての画素のうちn×m個の画素座標(Xd,Yd)を生成する。
補間座標生成部(第2特定手段)16は、前記第2パラメータ群を用いて変形画像4の補間画素座標を生成する。生成される補間画素座標は、変形画像4を構成するすべての画素のうち上記変形画像座標生成部15で生成されたn×m個の画素座標(Xd,Yd)を除く画素座標である。すなわち、1個の画素座標(Xd,Yd)につき(Wr×Hr)−1個の補間画素座標を生成する。
【0014】
画素値設定部(画素値設定手段)17は、変形画像座標生成部15で生成された画素座標(Xd,Yd)と補間座標生成部16で生成された補間画素座標とに画素値を設定し、変形画像4を生成する。
変形画像出力部18は、画素値設定部17で生成された変形画像4を取り込み、所定の表示フォーマットに変換して表示部19に出力し、表示部19は、変形画像出力部18から出力された変形画像4を画面に表示する。
【0015】
<画像変形装置の動作>
図2は、元画像3と変形画像4の概念図である。便宜的に元画像3は矩形状図形3aを含み、変形画像4は矩形状図形3aの変形図形である略台形状図形4aを含むものとする。すなわち、図示の例では、変形画像4は元画像3の左辺側を上下に引き伸ばした非相似形の画像になっている。
元画像3および変形画像4の小さな桝目は各々画素を表している。ここで、図示の元画像3の横方向画素数Wsと縦方向画素数Hsは10個、変形画像4の横方向画素数Wdと縦方向画素数Hdはそれぞれ10個、20個であるから、両者の横方向画素数比Wrは「1」、縦方向画素数比Hrは「2」である。
【0016】
画像変形装置10は、前式(1)を用いて元画像3の画素座標(Xs,Ys)に対応する変形画像4の画素座標(Xd,Yd)を特定し、その画素座標(Xd,Yd)に元画像3の画素座標(Xs,Ys)の画素値を設定するとともに、横方向画素数比Wrと縦方向画素数比Hrによって決定された補間画素座標にも同一の画素値を設定する。
【0017】
図3は、画素座標の特定と画素値設定の概念図である。図3において、P1〜P4は元画像3を構成する画素の代表であり、Q1〜Q4は、それぞれ元画像3の画素P1、P2、P3、P4に対応する変形画像4の画素である。すなわち、Q1は元画像3の画素P1に対応する変形画像4の画素であり、Q2は元画像3の画素P2に対応する変形画像4の画素であり、Q3は元画像3の画素P3に対応する変形画像4の画素であり、Q4は元画像3の画素P4に対応する変形画像4の画素である。
【0018】
変形画像4は、横方向画素数比Wrと縦方向画素数比Hrの値によって決まる幾つかの補間画素を有する。例えば、Wr=1、Hr=2の場合はQ1〜Q4の各々ごとに1個の補間画素を有し、Wr=2、Hr=2の場合はQ1〜Q4の各々ごとに3個の補間画素を有し、Wr=2、Hr=3の場合はQ1〜Q4の各々ごとに5個の補間画素を有し、Wr=3、Hr=3の場合はQ1〜Q4の各々ごとに8個の補間画素を有している。この関係は、Wr=I、Hr=Jとした場合、「Q1〜Q4の各々ごとに(I×J)−1個の補間画素を有している」と表現することができる。
【0019】
画像変形装置10は、前式(1)を用いて元画像3の画素Pi(iは1〜4;以下同様)に対応する変形画像4の画素Qiの座標(Xd,Yd)を特定し、その画素Qiに元画像3の画素Piの画素値を設定するとともに、横方向画素数比Wrと縦方向画素数比Hrによって決定された補間画素(図中太線内のハッチングなしの桝目)にも同一の画素値を設定する。
【0020】
図4は、画像変形装置10の全体的な動作を示すフローチャートである。このフローチャートでは、まず、第1パラメータ群の各変数(Ws、Hs、Wd、Hd)に元画像3の横方向画素数、縦方向画素数、変形画像4の横方向画素数および縦方向画素数をセットし(ステップS11、ステップS12)、次いで、第1パラメータ群の値に基づいて第2パラメータ群の各変数(Wr、Hr)の値をセットする(ステップS13)。ここで、Wrは横方向画素数比(Wd/Ws)、Hrは縦方向画素数比(Hd/Hs)であるが、WrとHrを整数値とするために、このフローチャートではInt関数(引数で指定した数値の整数部分を返す関数)を使用している。
【0021】
次に、二つのループ変数Ys、Xsに1をセットして初期化(ステップS14、ステップS15)した後、前式(1)を用いて、元画像3の画素Piの座標(Xs,Ys)に対応する変形画像4の画素Qiの座標(Xd,Yd)を特定する(ステップS16)。ここに、Ys=1、Xs=1の場合、(Xs,Ys)は(1,1)となる。
次に、元画像3の座標(Xs,Ys)の画素値を画素値変数Gにセットし(ステップS17)、後述の「画素値設定処理」(ステップS18)を実行した後、Xsを+1(ステップS19)し、式「Xs==Ws」を評価(ステップS20)する。そして、評価結果がFalseの間、Xsを+1しながら、ステップS16〜ステップS20のループを繰り返し実行する。
ここに、Xsはループ変数、Wsは元画像3の横方向画素数であるから、ループ回数(Xs)が元画像3の横方向画素数Wsに到達するまでの間、式「Xs==Ws」の評価結果はFalseを維持する。したがって、ステップS16を含むループの実行回数はWs回となる。
【0022】
一方、ステップS16を含むループの実行回数がWs回に達して、ステップS20の評価結果がTrueになると、Ysを+1(ステップS21)した後、式「Ys==Hs」を評価(ステップS22)し、そして、評価結果がFalseであれば、再びXsを初期化してステップS16を含むループをWs回繰り返し実行する。
ここに、Ysはループ変数、Hsは元画像3の縦方向画素数であるから、ループ回数(Ys)が元画像3の縦方向画素数Hsに到達するまでの間、式「Ys==Hs」の評価結果はFalseを維持する。したがって、ステップS16を含むループの最終的な実行回数はWs×Hs回、すなわち、元画像3の画素数に相当する回数となる。
【0023】
実施の形態におけるループ回数(Ws×Hs回)と冒頭の従来技術におけるループ回数(Wd×Hd回)を対比すると、実施の形態のループ回数は明らかに少なく、非線形変換の実行回数(前式(1)の演算回数)をそれだけ減らすことができる。これは、冒頭の従来技術では変形画像の画素座標(Xd,Yd)に対応する元画像の画素座標(Xs,Ys)を特定するのに対して、実施の形態では、その逆に、元画像の画素座標(Xs,Ys)に対応する変形画像の画素座標(Xd,Yd)を特定するからであり、元画像と変形画像の画素数差だけ演算回数を減らすことができるからである。
【0024】
ところで、元画像の画素座標(Xs,Ys)に対応する変形画像の画素座標(Xd,Yd)を特定した場合、図3に示すように、Q1〜Q4の座標しか特定できず、図3の太線内のハッチングなしの桝目で示す画素(補間画素)の座標を何らかの方法で特定しなければならない。
図5は、補間画素の座標特定を含む「画素値設定処理」のフローチャートであり、このフローチャートは、図4のステップS18に相当するものである。このフローチャートでは、まず、二つのループ変数(y、x)に0をセットして初期化し(ステップS18a、ステップS18b)、次いで、変形画像4の座標(Xd+x,Yd+y)に画素値変数Gの値を設定する(ステップS18c)。ここに、画素値変数Gには元画像3の座標(Xs,Ys)の画素値がセットされており(図4のステップS17参照)、かつ、y=0、x=0であるから、変形画像4の座標(Xd+0,Yd+0)に元画像3の座標(Xs,Ys)の画素値が設定される(図6参照)。
【0025】
次に、xを+1(ステップS18d)し、式「x==Wr」を評価(ステップS18e)する。そして、評価結果がFalseの間、xを+1しながら、ステップS18c〜ステップS18eのループを繰り返し実行し、そのループ中に式「x==Wr」の評価結果がTrueになると、yを+1(ステップS18f)し、式「y==Hr」を評価(ステップS18g)する。そして、評価結果がFalseであれば、再びxを初期化してステップS18c〜ステップS18eのループを繰り返し実行する一方、式「y==Hr」の評価結果がTrueになると、フローチャートを終了して図4に戻り、ステップS19以降を実行する。
【0026】
ここで、画素値設定処理の動作を具体的に説明する。今、Wr=3、Hr=3とすると、図5のフローチャートを実行することにより、図6に示す3×3個の画素に対する画素値設定の操作が行われる。図6において、ハッチングで示す画素(Xd+0,Yd+0)は元画像3の画素Piに対応する画素Qiであり、その他の8個の画素〔(Xd+1,Yd+0)、(Xd+2,Yd+0)、(Xd+0,Yd+1)、(Xd+1,Yd+1)、(Xd+2,Yd+1)、(Xd+0,Yd+2)、(Xd+1,Yd+2)、(Xd+2,Yd+2)〕は補間画素である。
【0027】
<y=0の場合>
x=0のときは、変形画像4の座標(Xd+0,Yd+0)に元画像3の座標(Xs,Ys)の画素値が設定される。
x=1のときは、変形画像4の座標(Xd+1,Yd+0)に元画像3の座標(Xs,Ys)の画素値が設定される。
x=2のときは、変形画像4の座標(Xd+2,Yd+0)に元画像3の座標(Xs,Ys)の画素値が設定される。
【0028】
<y=1の場合>
x=0のときは、変形画像4の座標(Xd+0,Yd+1)に元画像3の座標(Xs,Ys)の画素値が設定される。
x=1のときは、変形画像4の座標(Xd+1,Yd+1)に元画像3の座標(Xs,Ys)の画素値が設定される。
x=2のときは、変形画像4の座標(Xd+2,Yd+1)に元画像3の座標(Xs,Ys)の画素値が設定される。
【0029】
<y=2の場合>
x=0のときは、変形画像4の座標(Xd+0,Yd+2)に元画像3の座標(Xs,Ys)の画素値が設定される。
x=1のときは、変形画像4の座標(Xd+1,Yd+2)に元画像3の座標(Xs,Ys)の画素値が設定される。
x=2のときは、変形画像4の座標(Xd+2,Yd+2)に元画像3の座標(Xs,Ys)の画素値が設定される。
【0030】
<設定される画素値>
図6に示す3×3個の画素、すなわち、ハッチングで示す画素(Xd+0,Yd+0)と、その他の8個の画素〔(Xd+1,Yd+0)、(Xd+2,Yd+0)、(Xd+0,Yd+1)、(Xd+1,Yd+1)、(Xd+2,Yd+1)、(Xd+0,Yd+2)、(Xd+1,Yd+2)、(Xd+2,Yd+2)〕に設定される画素値は、いずれも同一の画素値(元画像3の画素Piの画素値)である。言い換えれば、図5のフローチャートでは、元画像3の画素Piの画素値を変形画像4の画素Qiと幾つかの補間画素に同一に設定する。
【0031】
<まとめ>
以上のとおり、本実施の形態の画像変形装置10によれば、演算時間の長い非線形の変換処理、すなわち、図4のステップS16における演算処理(前式(1))の繰返し回数を元画像3の画素数に相当するWs×Hs回とすることができ、冒頭の従来技術における繰返し回数(変形画像4の画素数に相当するWd×Hd回)よりも少なくすることができる。
したがって、元画像3と変形情報5の入力から、その変形画像4を表示部19に出力するまでの時間を短くして画像の表示更新をスムーズにすることができ、特に、変形画像4のリアルタイムな描画を行うことができるという格別有益な効果が得られる。
【0032】
なお、この効果は、元画像3の画素数(Ws×Hs)より変形画像4の画素数(Wd×Hd)が多い場合に成立する。言い換えれば、元画像3の画素数(Ws×Hs)が変形画像4の画素数(Wd×Hd)より少ない場合は、却って、演算処理の繰返し回数が増加して逆効果になるが、このような場合は冒頭の従来技術を適用すればよい。すなわち、図4のステップS12の後に、元画像3の画素数(Ws×Hs)と変形画像4の画素数(Wd×Hd)の大小関係を判定するステップを追加し、その判定結果が「(Ws×Hs)<(Wd×Hd)」を満たす場合に、図4のステップS13以降を実行し、満たさない場合に図16のステップS2以降を実行すればよい。
【0033】
また、本実施の形態では、元画像3の画素Piの座標(Xs,Ys)から変形画像4の画像Qiの座標(Xd,Yd)を特定するために、前式(1)の写像Fを用いているが、これに限定されない。例えば、以下に説明するような線形補間式を用いてもよい。
図7は、元画像の図形と変形画像の図形を示す図である。この図では、矩形状図形を略台形状図形に変形する例を示している。矩形状図形の各コーナ座標はそれぞれ時計周り順に(0,0)、(x1,0)、(x1,y1)、(0,y1)であり、略台形状図形の各コーナ座標はそれぞれ時計周り順に(x3,y3)、(x1,0)、(x1,y1)、(x4,y4)である。両図形の右上コーナおよび右下コーナの座標は同一であるから、両図形の右辺は等長である。
したがって、図示の変形画像は、元画像の左辺側を上下に少し引き伸ばし、かつ、同左辺側を若干右に傾けたものであり、元画像と非相似の変形画像である。
【0034】
このような変形画像において、その任意の画素Qの座標(Xd,Yd)は、次の二つの線形補間式(3)(4)によって特定することができる。
Xd=[A]+[B]+[C]−[D] ……(3)
Yd=[E]+[F]−[G]+[H] ……(4)
但し、[A]=x3
[B]=(x4−x3)×Ys/y1
[C]=(x1−x3)×Xs/x1
[D]=(x4−x3)×Xs×Ys/x1×y1
[E]=y3
[F]=(y4−y3)×Ys/y1
[G]=y3×Xs/x1
[H]=(y1+y3−y4)×Xs×Ys/x1×y1
【0035】
<パノラマエディタへの応用>
本発明は、先にも述べたように、非相似形の変形を行う画像変形装置に適用することができる。この種の画像変形装置としては、例えば、グラフィックデザイン用など様々のものが知られているが、その一つに、ディジタルカメラ等で撮影した画像の編集加工を行うエディタツールがあり、さらに、このエディタツールにはパノラマ写真の編集加工機能を搭載したもの(以下「パノラマエディタ」という)がある。
パノラマ写真とは、カメラを水平にパンさせて撮影した複数枚の画像をつなぎ合わせたものである。つなぎ合わせの部分に不自然さのないパノラマ写真を得るためには、正確な水平レベル合わせと、パン動作中のカメラの上下方向への動きを阻止する必要がある。このため、手持ち撮影では良好なパノラマ写真を得ることが困難で、撮影後におけるパノラマ写真の編集加工(特につなぎ部分の合わせ込み調整)は欠かせない。
【0036】
以下、パノラマエディタについて説明する。
図8は、パノラマエディタ21の構成図である。図において、パノラマエディタ21は、オペレーティングシステムとアプリケーションプログラムソフトを実行してパノラマエディタに必要な各種機能を実現するCPU22、CPU22のワークエリアとして動作するメモリ23、オペレーティングシステムやアプリケーションプログラムソフトを格納するハードディスク24、パノラマエディタの編集画面を表示するディスプレイ25、不図示の他のハードウェアリソースとのインターフェースをとるI/O26、キーボードやマウス等の入力装置27およびバス28などを含んで構成される。
なお、これらの構成は汎用のパーソナルコンピュータやワークステーション等(以下「パソコン」)におけるハードウェア構成に匹敵する。したがって、パノラマエディタ21の典型的な実施例は、パノラマエディタに必要な各種機能を実現するためのアプリケーションプログラムソフトとパソコンとを組み合わせたものであるが、これに限定されない。上記構成と上記アプリケーションプログラムソフトとを有する電子機器であればよく、例えば、ディジタルカメラであってもよくまたはその他の画像処理機器であってもよい。
【0037】
図9(a)は、パノラマエディタ21の編集画面の表示例であり、この例では、三つの画像32〜34で構成されたパノラマ写真31が表示されている。中央の画像33と左隣の画像32との間の重合部分および中央の画像33と右隣の画像34との間の重合部分は“ステッチ”と呼ばれており、重ね合わせを行うための同一画像の記録部分である。ステッチ幅は固定されていることもある。ステッチ幅固定のカメラを用いパノラマ撮影モードで1枚の画像を撮影すると、その右端のステッチ幅部分の画像が次の画像を撮影する際にモニター画面の左端に表示されるようになっており、スルー画像(構図調整用のモニター画像)をそのステッチ幅画像に重ね合わせることによって撮影時のつなぎ部分の大まかな調整を行えるようになっている。
【0038】
ハッチングで示す中央の画像33は選択中の画像(編集対象の画像)を示している。例えば、画像を選択したままドラッグすることにより、左右上下に移動できるようになっている。また、編集対象画像の四隅に設けられたコーナパッド35〜38(図10参照)は、編集対象画像の非相似変形を行う際に用いられるものである。例えば、任意のコーナパッドをドラッグすると、そのドラッグ方向に画像が拡大または縮小されるようになっている。
【0039】
図9(b)は、左上のコーナパッド35(または左下のコーナパッド36)を上方向(または下方向)にドラッグしたときの選択画像33の変形状態を示す図であり、コーナパッド35(または36)の動きに伴って、選択画像33が徐々に変形しつつ表示されている。この変形表示の過程において、変形画像の表示更新が間に合わない場合、表示がギクシャクして操作感を損なうことになる。このパノラマエディタ21は、以下に説明するように、前述の画像変形装置10の原理を応用して変形画像の生成時間を短くしているので、かかる不都合を招くことはない。
【0040】
図11および図12は、CPU22で実行するアプリケーションプログラムソフトのフローチャートである。このフローチャートを実行すると、まず、パノラマ画像を構成する複数の画像を読み込むためのファイル選択画面を表示し、ユーザによって選択された画像ファイルを読み込む(ステップS31)。次に、各画像ファイルのステッチ情報から隣りの画像との重合部分を設定し(ステップS32)、その重合部分を適用して編集画面にパノラマ写真(例えば、図9(a)のパノラマ写真31参照)を表示する(ステップS33)。
【0041】
次に、イベントを検出するまで待機し(ステップS34)、イベントを検出すると、そのイベントに対応した処理を実行する。例えば、画像のクリックイベントを検出すると画像選択処理を実行し(ステップS35)、画像のドラッグイベントを検出すると選択画像の上下移動処理を実行し(ステップS36)、コーナパッド35〜38のドラッグイベントを検出すると選択画像の変形編集処理を実行し(ステップS37)、あるいは、不図示のメニュー選択イベント(画像の追加、挿入、削除、保存、再生、……、終了)を検出するとそのメニュー処理を実行する(ステップS38〜41)。
【0042】
<選択画像の変形編集処理>
図13は、選択画像の変形編集処理(ステップS37参照)のフローチャートである。このフローチャートでは、まず、ドラッグ中であるか否かを判定し(ステップS51)、ドラッグ中であれば変数WDにステッチ幅の画素数WD1をセットし(ステップS52)、そうでなければ変数WDに選択画像の横方向画素数WD2をセットする(ステップS53)。
【0043】
次に、二つのループ変数(Ys、Xs)に0をセットして初期化(ステップS54、ステップS55)し、式「Ys==HT」(HTは選択画像33の縦方向画素数;図9参照)を評価(ステップS56)する。そして、評価結果がFalseの間、式「Xs==WD」を評価(ステップS57)し、そして、評価結果がTrueであれば、Ysを+1(ステップS58)した後、ステップS55以降を実行する。
【0044】
式「Xs==WD」の評価結果がFalseの場合、元画像(選択画像33)の座標(Xs,Ys)から変形画像の座標(Xd,Yd)を計算する(ステップS59)。この計算には、前式(1)または前式(3)、(4)を用いることができる。座標(Xd,Yd)を計算すると、次に、座標(Xd,Yd)の画素を含む四つの画素に元画像の座標(Xs,Ys)の画素値を書き込んだ後(ステップS60)、Xsを+1し(ステップS61)、ステップ57に戻る。
【0045】
図14は、座標(Xd,Yd)の画素を含む四つの画素の概念図であり、これら四つの画素〔(Xd,Yd)、(Xd+1,Yd)、(Xd,Yd+1)、(Xd+1,Yd+1)〕に元画像の座標(Xs,Ys)の画素値を書き込む。図14の画素配列は、図3の上から2段目の画素配列に相当する。したがって、図13のフローチャートは、前出の画像変形装置10における横画素数比Wrと縦画素数比Hrを「2」に固定したものである。
【0046】
元画像の対象画素(ドラッグ中はWD1×HT個の画素、ドラック中でなければWD2×HT個の画素)のすべてについて、ステップS59の座標計算およびステップS60の画素値書込みを完了すると、ステップS56の式「Ys==HT」の評価結果がTrueとなり、変形後の選択画像33を表示更新して(ステップS62〜ステップS65)、プログラムを終了する。
【0047】
この表示更新処理においては、まず、左隣の画像32と変形後の選択画像33との重ね合わせを行い(ステップS62)、次に、ドラッグ中であるか否かを判定(ステップS53)してドラッグ中でなければ右隣の画像34との重ね合わせを行った後(ステップS64)、変形後のパノラマ画像31を表示し(ステップS65)、ドラッグ中であればそのまま変形後のパノラマ画像31を表示する(ステップS65)。
【0048】
以上のようにしたから、このパノラマエディタ21によれば、以下の効果が得られる。
(a)座標計算(ステップS59)の繰返し回数を元画像の対象画素の数にすることができ、従来技術のように、変形画像の画素数だけ繰り返すものに比べて計算時間を短くすることができる。
(b)ドラッグ中の場合は、座標計算(ステップS59)の繰返し回数を元画像の一部の画素(ステッチ幅の画素)の数にすることができ、特にスムーズな画像の更新が求められるドラッグ中の操作感を改善することができる。
(c)ドラッグ中の場合は、右隣の画像34との重ね合わせ処理(ステップS64)をパスするので、この点においてもスムーズな画像の更新が求められるドラッグ中の操作感を改善することができる。
【0049】
<付記>
本実施の形態の主要な機能は、マイクロコンピュータを含むハードウェア資産と、OSや各種プログラムなどのソフトウェア資産との有機的結合によって機能的に実現されるものであるが、ハードウェア資産およびOSは汎用のものを利用できるから、本発明にとって欠くことのできない必須の事項は、実質的に、図4または図13のフローチャートで示すプログラムに集約されているということがいえる。したがって、本発明は、図4または図13のフローチャートで示すプログラムのすべてまたはその要部を格納した、フロッピィディスク、光ディスク、コンパクトディスク、磁気テープ、ハードディスクまたは半導体メモリなどの記憶媒体若しくはこれらの記憶媒体を含む構成品(ユニット品や完成品または半完成品)を包含する。なお、上記記憶媒体または構成品は、それ自体が流通経路にのるものはもちろんのこと、ネットワーク上にあって記録内容だけを提供するものも含まれる。
【0050】
【発明の効果】
本発明によれば、変形情報に基づいて画素座標を特定する演算処理は、元画像を構成する画素座標の個数に対応する回数だけ実行すればよく、他の補間画素の画素座標は、隣接関係によって容易に特定できるので、例えば、写像関数または線形補間式等を用いた画素座標の演算回数が実質的に元画像の画素数を超えることがなく、非相似変形を行う場合の処理を効率化することができ、例えば、変形途中の画像をリアルタイムに描画できるようになる。
【図面の簡単な説明】
【図1】画像変形装置のブロック図である。
【図2】元画像と変形画像の概念図である。
【図3】画素座標の特定と画素値設定の概念図である。
【図4】画像変形装置の全体的な動作を示すフローチャートである。
【図5】画素値設定処理のフローチャートである。
【図6】3×3個の画素に対する画素値設定の操作説明図である。
【図7】元画像の図形と変形画像の図形を示す図である。
【図8】パノラマエディタの構成図である。
【図9】パノラマエディタの編集画面の表示例を示す図である。
【図10】コーナパッドを含む編集画面の要部拡大図である。
【図11】CPUで実行するアプリケーションプログラムソフトのフローチャート(1/2)である。
【図12】CPUで実行するアプリケーションプログラムソフトのフローチャート(2/2)である。
【図13】選択画像の変形編集処理のフローチャートである。
【図14】座標(Xd,Yd)の画素を含む四つの画素の概念図である。
【図15】元画像1と変形画像2を示す概念図である。
【図16】従来の画像変形処理(特に非相似変形を行うもの)のフローチャートである。
【符号の説明】
3 元画像
4 変形画像
5 変形情報
10 画像変形装置
11 画像入力部
12 情報入力部
13 第1パラメータ生成部
14 第2パラメータ生成部
15 変形画像座標生成部(第1特定手段)
16 補間座標生成部(第2特定手段)
17 画素値設定部(画素値設定手段)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image deformation apparatus, and more particularly to an apparatus that uses a digital image as an original image and generates a non-similar deformed image of the original image.
[0002]
[Prior art]
Recently, with advances in digital signal processing and LSI technology, analog images such as television signals can be easily processed as digital images, and image compression and image editing can be performed freely. For example, one of image editing processes is “deformation”. This deformation process can be divided into “similar deformation” and “non-similar deformation”. The former generates a deformed image similar to the original image, and the latter generates a deformed image dissimilar to the original image.
Here, paying attention to the processing time of both, the processing time of the non-similar deformation is longer than that of the similar deformation. In the similar deformation, only the pixels in the horizontal and vertical directions of the original image need be thinned out or interpolated at a rate corresponding to the deformation rate, whereas in the non-similar deformation, all pixel information of the deformed image is obtained using a mapping function or the like. This is because it must be reproduced one by one.
[0003]
FIG. 15 is a conceptual diagram showing the original image 1 and the deformed image 2. The original image 1 and the deformed image 2 shown in the figure have a dissimilar relationship, and this relationship can be expressed as a mapping. Now, assuming that the coordinates of the arbitrary pixel P of the original image 1 are (Xs, Ys), the coordinates (Xd, Yd) of the pixel Q of the modified image 2 corresponding to the pixel P can be expressed by the following equation (1). it can.
(Xd, Yd) = F (Xs, Ys) (1)
F is a map, and the inverse map of map F is F -1 Then, the coordinates (Xs, Ys) of the pixel P of the original image 1 can be expressed by the following equation (2).
(Xs, Ys) = F -1 (Xd, Yd) (2)
[0004]
When generating the deformed image 2, the pixel coordinates (Xs, Ys) of the original image 1 corresponding to the pixel coordinates (Xd, Yd) are specified for all the pixels constituting the deformed image 2 using Equation (2). Then, the process of acquiring the pixel value and setting it to the pixel value of the coordinates (Xd, Yd) of the deformed image 2 is repeated. The number of repetitions is the number of pixels of the modified image 2. For example, if the number of horizontal pixels of the modified image 2 is Wd and the number of vertical pixels is Hd, the number of repetitions is Wd × Hd.
[0005]
FIG. 16 is a flowchart of conventional image deformation processing (particularly, for performing non-similar deformation). In this flowchart, first, the number of horizontal pixels and the number of vertical pixels of the deformed image 2 are set to variables Wd and Hd, respectively (step S1), and two loop variables Yd and Xd are set to 1 and initialized (step S1). After step S2 and step S3), the coordinates (Xs, Ys) of the original image 1 corresponding to the coordinates (Xd, Yd) of the deformed image 2 are specified using the previous equation (2) (step S4). Here, when Yd = 1 and Xd = 1, (Xd, Yd) is (1, 1).
[0006]
Next, the pixel value of the identified coordinates (Xs, Ys) of the original image 1 is set to the coordinates (Xd, Yd) of the deformed image 2 (step S5), Xd is incremented by 1 (step S6), and then the expression “ Xd == Wd ”(“ == ”is an equality operator; the same applies hereinafter) is evaluated (step S7). Then, while the evaluation result is False (“NO” in the flow), the loop of Step S4 to Step S7 is repeatedly executed while Xd is incremented by 1. Here, since Xd is a loop variable and Wd is the number of horizontal pixels of the deformed image 2, the expression “Xd == Wd” until the number of loops (Xd) reaches the number of horizontal pixels Wd of the deformed image 2. The evaluation result of “is maintained as False. Therefore, the number of executions of step S4 is Wd.
[0007]
On the other hand, when the number of executions of step S4 reaches Wd and the evaluation result of step S7 becomes True (“YES” in the flow), Yd is incremented by 1 (step S8), and then the expression “Yd == Hd” is obtained. Evaluation is performed (step S9), and if the evaluation result is false, Xd is initialized again and step S4 is repeatedly executed Wd times.
Here, Yd is a loop variable, and Hd is the number of pixels in the vertical direction of the deformed image 2. Therefore, until the number of loops (Yd) reaches the number of vertical pixels Hd in the deformed image 2, the expression “Yd == Hd The evaluation result of “is maintained as False. Therefore, the final number of executions of step S4 is Wd × Hd, that is, the number of times corresponding to the number of pixels of the deformed image 2.
[0008]
[Problems to be solved by the invention]
In the conventional image deformation process, it is necessary to repeat the above equation (2) as many times as the number of pixels of the deformed image 2. In general, since the previous equation (2) is a non-linear conversion, it takes time to calculate, and in particular, when the operation of non-similar deformation is performed while watching the display on the display, the update of the display may not be in time. There is a problem that an image in the middle of deformation cannot be drawn in real time, and the display of the image is accompanied by a tingling sensation.
Therefore, the problem to be solved by the present invention is to improve the efficiency of processing when performing non-similar deformation, and to render an image in the middle of deformation in real time.
[0009]
[Means for Solving the Problems]
The image deformation device according to the present invention is an image deformation device that deforms into an unsimilar deformed image using the original image, and the designated pixel coordinates on the original image based on deformation information indicating a deformation method of the original image. Adjacent to the pixel coordinates on the deformed image specified by the first specifying means and first specifying means for specifying the pixel coordinates on the deformed image corresponding to One or more Second specifying means for specifying pixel coordinates as interpolated pixel coordinates, pixel coordinates on the deformed image specified by the first specifying means, and the interpolated pixel coordinates specified by the second specifying means, A pixel value setting means for setting a pixel value of the designated pixel coordinate on the original image; and for each of a plurality of pixel coordinates constituting the original image, the first specifying means, the second specifying means, And a first control unit that sets a pixel value for each of a plurality of pixel coordinates constituting the modified image by executing processing by the pixel value setting unit.
[0010]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
<Configuration of image transformation device>
FIG. 1 is a block diagram of the image deformation apparatus 10, and each block has the following functions. Each function may be realized by hardware logic such as a logic circuit, or may be realized by organic coupling of hardware resources such as a personal computer and software resources such as required application software programs.
[0011]
The image input unit 11 captures and holds the deformation target image (original image 3). The original image 3 is a digital image composed of n × m pixels, and each pixel has color and luminance information (only luminance in the case of monochrome), for example, graphic data such as a photograph or a bitmap image. It is.
The information input unit 12 captures and holds the deformation information 5 input by the user. The deformation information 5 is information indicating how to deform the original image 3. For example, when the original image 3 is simply enlarged / reduced (similar deformation), the enlargement ratio or the reduction ratio is used, but when complex deformation (non-similar deformation) is performed, information representing the mapping F of the original image 3 is used. is there.
[0012]
The first parameter generation unit 13 generates a first parameter group necessary for specifying the pixel coordinates of the deformed image 4. The first parameter group includes, for example, the number of horizontal pixels Ws and the number of vertical pixels Hs of the original image 3 and the number of horizontal pixels Wd and the number of vertical pixels Hd of the modified image 4 specified from the deformation information 5.
The second parameter generation unit 14 generates a second parameter group necessary for specifying the coordinates of the interpolation pixel of the deformed image 4. The second parameter group includes, for example, a ratio between the number of horizontal pixels Ws of the original image 3 and the number of horizontal pixels Wd of the modified image 4 (hereinafter referred to as “horizontal pixel number ratio Wr”) and the number of vertical pixels of the original image 3. This is a ratio of Hs to the number of vertical pixels Hd of the deformed image 4 (hereinafter referred to as “vertical pixel number ratio Hr”). However, the horizontal pixel number ratio Wr and the vertical pixel number ratio Hr are integer values that do not include values after the decimal point.
[0013]
The deformed image coordinate generation unit (first specifying unit) 15 generates the pixel coordinates of the deformed image 4 using the first parameter group. The generated pixel coordinates are pixel coordinates (Xd, Yd) corresponding to the pixel coordinates (Xs, Ys) of the original image 3, and the original image 3 is composed of n × m pixels. The image coordinate generation unit 15 generates n × m pixel coordinates (Xd, Yd) among all the pixels constituting the deformed image 4.
The interpolation coordinate generation unit (second specifying means) 16 generates the interpolation pixel coordinates of the deformed image 4 using the second parameter group. The generated interpolation pixel coordinates are pixel coordinates excluding n × m pixel coordinates (Xd, Yd) generated by the modified image coordinate generation unit 15 among all the pixels constituting the modified image 4. That is, (Wr × Hr) −1 interpolation pixel coordinates are generated for each pixel coordinate (Xd, Yd).
[0014]
The pixel value setting unit (pixel value setting unit) 17 sets pixel values to the pixel coordinates (Xd, Yd) generated by the deformed image coordinate generation unit 15 and the interpolation pixel coordinates generated by the interpolation coordinate generation unit 16. Then, the deformed image 4 is generated.
The modified image output unit 18 takes in the modified image 4 generated by the pixel value setting unit 17, converts it into a predetermined display format, and outputs it to the display unit 19. The display unit 19 is output from the modified image output unit 18. The deformed image 4 is displayed on the screen.
[0015]
<Operation of image deformation device>
FIG. 2 is a conceptual diagram of the original image 3 and the deformed image 4. For convenience, the original image 3 includes a rectangular figure 3a, and the deformed image 4 includes a substantially trapezoidal figure 4a that is a deformed figure of the rectangular figure 3a. That is, in the illustrated example, the deformed image 4 is an unsimilar image in which the left side of the original image 3 is stretched up and down.
Small squares in the original image 3 and the deformed image 4 each represent a pixel. Here, the horizontal pixel number Ws and the vertical pixel number Hs of the original image 3 shown in the figure are 10, and the horizontal pixel number Wd and the vertical pixel number Hd of the modified image 4 are 10 and 20, respectively. The horizontal pixel number ratio Wr of both is “1”, and the vertical pixel number ratio Hr is “2”.
[0016]
The image deformation device 10 specifies the pixel coordinates (Xd, Yd) of the deformed image 4 corresponding to the pixel coordinates (Xs, Ys) of the original image 3 using the previous equation (1), and the pixel coordinates (Xd, Yd). ), The pixel value of the pixel coordinate (Xs, Ys) of the original image 3 is set, and the same pixel value is also set to the interpolated pixel coordinate determined by the horizontal pixel number ratio Wr and the vertical pixel number ratio Hr. .
[0017]
FIG. 3 is a conceptual diagram of specifying pixel coordinates and setting pixel values. In FIG. 3, P1 to P4 are representative pixels constituting the original image 3, and Q1 to Q4 are pixels of the modified image 4 corresponding to the pixels P1, P2, P3, and P4 of the original image 3, respectively. That is, Q1 is a pixel of the modified image 4 corresponding to the pixel P1 of the original image 3, Q2 is a pixel of the modified image 4 corresponding to the pixel P2 of the original image 3, and Q3 corresponds to the pixel P3 of the original image 3. Q4 is a pixel of the deformed image 4 corresponding to the pixel P4 of the original image 3.
[0018]
The deformed image 4 has several interpolation pixels determined by the values of the horizontal pixel number ratio Wr and the vertical pixel number ratio Hr. For example, when Wr = 1 and Hr = 2, there is one interpolation pixel for each of Q1 to Q4, and when Wr = 2 and Hr = 2, three interpolation pixels for each of Q1 to Q4. When Wr = 2 and Hr = 3, there are 5 interpolated pixels for each of Q1 to Q4, and when Wr = 3 and Hr = 3, 8 for each of Q1 to Q4 Interpolated pixels. This relationship can be expressed as “having (I × J) −1 interpolation pixels for each of Q1 to Q4” when Wr = I and Hr = J.
[0019]
The image deformation device 10 specifies the coordinates (Xd, Yd) of the pixel Qi of the deformed image 4 corresponding to the pixel Pi (i is 1 to 4; the same shall apply hereinafter) of the original image 3 using the previous equation (1). In addition to setting the pixel value of the pixel Pi of the original image 3 to the pixel Qi, the interpolation pixel determined by the horizontal pixel number ratio Wr and the vertical pixel number ratio Hr (the hatched cell in the bold line in the figure) Set the same pixel value.
[0020]
FIG. 4 is a flowchart showing the overall operation of the image deformation apparatus 10. In this flowchart, first, each variable (Ws, Hs, Wd, Hd) of the first parameter group includes the number of horizontal pixels, the number of vertical pixels of the original image 3, the number of horizontal pixels and the number of vertical pixels of the modified image 4. Is set (step S11, step S12), and then the value of each variable (Wr, Hr) of the second parameter group is set based on the value of the first parameter group (step S13). Here, Wr is the horizontal pixel number ratio (Wd / Ws), and Hr is the vertical pixel number ratio (Hd / Hs). In this flowchart, an Int function (argument) is used to set Wr and Hr to integer values. Function that returns the integer part of the number specified in.
[0021]
Next, the two loop variables Ys and Xs are set to 1 and initialized (steps S14 and S15), and then the coordinates (Xs, Ys) of the pixel Pi of the original image 3 using the previous equation (1). The coordinates (Xd, Yd) of the pixel Qi of the deformed image 4 corresponding to are specified (step S16). Here, when Ys = 1 and Xs = 1, (Xs, Ys) is (1, 1).
Next, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the pixel value variable G (step S17), and after executing “pixel value setting processing” (step S18) described later, Xs is increased by +1 ( In step S19), the expression “Xs == Ws” is evaluated (step S20). Then, while the evaluation result is False, the loop from Step S16 to Step S20 is repeatedly executed while adding Xs to +1.
Here, Xs is a loop variable, and Ws is the number of pixels in the horizontal direction of the original image 3. Therefore, until the number of loops (Xs) reaches the number of horizontal pixels Ws in the original image 3, the expression “Xs == Ws”. The evaluation result of “is maintained as False. Therefore, the number of executions of the loop including step S16 is Ws.
[0022]
On the other hand, when the number of executions of the loop including step S16 reaches Ws and the evaluation result in step S20 becomes True, Ys is incremented by +1 (step S21), and then the expression “Ys == Hs” is evaluated (step S22). If the evaluation result is False, Xs is initialized again and the loop including Step S16 is repeatedly executed Ws times.
Here, Ys is a loop variable, and Hs is the number of pixels in the vertical direction of the original image 3. Therefore, until the number of loops (Ys) reaches the number of vertical pixels Hs of the original image 3, the expression “Ys == Hs”. The evaluation result of “is maintained as False. Therefore, the final number of executions of the loop including step S16 is Ws × Hs, that is, the number of times corresponding to the number of pixels of the original image 3.
[0023]
Comparing the number of loops in the embodiment (Ws × Hs times) with the number of loops in the prior art (Wd × Hd times) in the beginning, the number of loops in the embodiment is clearly small, and the number of times nonlinear transformation is executed (formula ( The number of operations 1) can be reduced accordingly. This is because the pixel coordinates (Xs, Ys) of the original image corresponding to the pixel coordinates (Xd, Yd) of the deformed image are specified in the conventional technique at the beginning, whereas in the embodiment, conversely, the original image This is because the pixel coordinates (Xd, Yd) of the modified image corresponding to the pixel coordinates (Xs, Ys) are specified, and the number of computations can be reduced by the difference in the number of pixels between the original image and the modified image.
[0024]
By the way, when the pixel coordinates (Xd, Yd) of the modified image corresponding to the pixel coordinates (Xs, Ys) of the original image are specified, only the coordinates of Q1 to Q4 can be specified as shown in FIG. The coordinates of pixels (interpolated pixels) indicated by unhatched cells in the thick line must be specified by some method.
FIG. 5 is a flowchart of the “pixel value setting process” including the coordinate specification of the interpolation pixel, and this flowchart corresponds to step S18 of FIG. In this flowchart, first, two loop variables (y, x) are initialized by setting them to 0 (step S18a, step S18b), and then the value of the pixel value variable G is set to the coordinates (Xd + x, Yd + y) of the deformed image 4. Is set (step S18c). Here, the pixel value variable G is set with the pixel value of the coordinates (Xs, Ys) of the original image 3 (see step S17 in FIG. 4), and y = 0 and x = 0. The pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 0, Yd + 0) of the image 4 (see FIG. 6).
[0025]
Next, x is incremented by 1 (step S18d), and the expression “x == Wr” is evaluated (step S18e). Then, while the evaluation result is False, x is incremented by 1 and the loop of Step S18c to Step S18e is repeatedly executed. When the evaluation result of the expression “x == Wr” becomes True in the loop, y is incremented by +1 ( Step S18f) and evaluate the expression “y == Hr” (Step S18g). If the evaluation result is False, x is initialized again, and the loop from Step S18c to Step S18e is repeatedly executed. On the other hand, when the evaluation result of the expression “y == Hr” becomes True, the flowchart is ended and FIG. Returning to step 4, step S19 and subsequent steps are executed.
[0026]
Here, the operation of the pixel value setting process will be specifically described. Now, assuming that Wr = 3 and Hr = 3, the pixel value setting operation for 3 × 3 pixels shown in FIG. 6 is performed by executing the flowchart of FIG. In FIG. 6, the pixels (Xd + 0, Yd + 0) indicated by hatching are the pixels Qi corresponding to the pixels Pi of the original image 3, and the other eight pixels [(Xd + 1, Yd + 0), (Xd + 2, Yd + 0), (Xd + 0, Yd + 1), (Xd + 1, Yd + 1), (Xd + 2, Yd + 1), (Xd + 0, Yd + 2), (Xd + 1, Yd + 2), (Xd + 2, Yd + 2)] are interpolation pixels.
[0027]
<When y = 0>
When x = 0, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 0, Yd + 0) of the deformed image 4.
When x = 1, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 1, Yd + 0) of the deformed image 4.
When x = 2, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 2, Yd + 0) of the deformed image 4.
[0028]
<When y = 1>
When x = 0, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 0, Yd + 1) of the deformed image 4.
When x = 1, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 1, Yd + 1) of the deformed image 4.
When x = 2, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 2, Yd + 1) of the deformed image 4.
[0029]
<When y = 2>
When x = 0, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 0, Yd + 2) of the deformed image 4.
When x = 1, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 1, Yd + 2) of the deformed image 4.
When x = 2, the pixel value of the coordinates (Xs, Ys) of the original image 3 is set to the coordinates (Xd + 2, Yd + 2) of the deformed image 4.
[0030]
<Set pixel value>
6, that is, the hatched pixel (Xd + 0, Yd + 0) and the other eight pixels [(Xd + 1, Yd + 0), (Xd + 2, Yd + 0), (Xd + 0, Yd + 1), ( Xd + 1, Yd + 1), (Xd + 2, Yd + 1), (Xd + 0, Yd + 2), (Xd + 1, Yd + 2), (Xd + 2, Yd + 2)] all have the same pixel value (pixel Pi of the original image 3) Pixel value). In other words, in the flowchart of FIG. 5, the pixel value of the pixel Pi of the original image 3 is set to be the same for the pixel Qi of the modified image 4 and several interpolation pixels.
[0031]
<Summary>
As described above, according to the image transformation device 10 of the present embodiment, the non-linear conversion process with a long calculation time, that is, the number of repetitions of the calculation process (formula (1)) in step S16 in FIG. Ws × Hs times corresponding to the number of pixels, and the number of repetitions (Wd × Hd times corresponding to the number of pixels of the deformed image 4) in the first prior art can be reduced.
Accordingly, it is possible to shorten the time from the input of the original image 3 and the deformation information 5 to the output of the deformation image 4 to the display unit 19 and to smoothly update the display of the image. A special beneficial effect of being able to perform simple drawing is obtained.
[0032]
This effect is realized when the number of pixels of the deformed image 4 (Wd × Hd) is larger than the number of pixels of the original image 3 (Ws × Hs). In other words, when the number of pixels of the original image 3 (Ws × Hs) is smaller than the number of pixels of the deformed image 4 (Wd × Hd), the number of repetitions of the arithmetic processing increases, which is counterproductive. In such a case, the prior art at the beginning may be applied. That is, after step S12 in FIG. 4, a step of determining the magnitude relationship between the number of pixels of the original image 3 (Ws × Hs) and the number of pixels of the modified image 4 (Wd × Hd) is added, and the determination result is “( When satisfying “Ws × Hs) <(Wd × Hd)”, step S13 and subsequent steps in FIG. 4 may be executed, and when not satisfying, step S2 and subsequent steps in FIG. 16 may be executed.
[0033]
Further, in the present embodiment, in order to identify the coordinates (Xd, Yd) of the image Qi of the deformed image 4 from the coordinates (Xs, Ys) of the pixel Pi of the original image 3, the mapping F of the previous formula (1) is used. Although used, it is not limited to this. For example, a linear interpolation formula as described below may be used.
FIG. 7 is a diagram showing a graphic of the original image and a graphic of the deformed image. This figure shows an example in which a rectangular figure is transformed into a substantially trapezoidal figure. The corner coordinates of the rectangular figure are (0, 0), (x1,0), (x1, y1), (0, y1) in the clockwise order, and the corner coordinates of the substantially trapezoid figure are clockwise. In order, (x3, y3), (x1, 0), (x1, y1), (x4, y4). Since the coordinates of the upper right corner and the lower right corner of both figures are the same, the right sides of both figures are of equal length.
Accordingly, the illustrated deformed image is a deformed image that is slightly similar to the original image, with the left side of the original image slightly stretched up and down and the left side slightly tilted to the right.
[0034]
In such a deformed image, the coordinates (Xd, Yd) of the arbitrary pixel Q can be specified by the following two linear interpolation equations (3) and (4).
Xd = [A] + [B] + [C]-[D] (3)
Yd = [E] + [F] − [G] + [H] (4)
However, [A] = x3
[B] = (x4-x3) × Ys / y1
[C] = (x1-x3) × Xs / x1
[D] = (x4-x3) × Xs × Ys / x1 × y1
[E] = y3
[F] = (y4-y3) × Ys / y1
[G] = y3 × Xs / x1
[H] = (y1 + y3−y4) × Xs × Ys / x1 × y1
[0035]
<Application to panorama editor>
As described above, the present invention can be applied to an image deformation apparatus that performs non-similar deformation. As this type of image transformation device, for example, various devices such as for graphic design are known, and one of them is an editor tool for editing and processing images taken with a digital camera or the like. Some editor tools have a panoramic photo editing function (hereinafter referred to as “panorama editor”).
A panoramic photograph is a combination of a plurality of images taken by panning the camera horizontally. In order to obtain a panoramic photo with no unnaturalness at the stitched portion, it is necessary to prevent accurate horizontal leveling and vertical movement of the camera during panning. For this reason, it is difficult to obtain a good panoramic photo by hand-held shooting, and editing of the panoramic photo after shooting (especially adjustment of the joining portion) is indispensable.
[0036]
Hereinafter, the panorama editor will be described.
FIG. 8 is a configuration diagram of the panorama editor 21. In the figure, a panorama editor 21 executes an operating system and application program software to realize various functions necessary for the panorama editor, a memory 23 that operates as a work area of the CPU 22, and a hard disk that stores the operating system and application program software. 24, a display 25 for displaying the editing screen of the panorama editor, an I / O 26 for interfacing with other hardware resources (not shown), an input device 27 such as a keyboard and a mouse, a bus 28, and the like.
Note that these configurations are comparable to the hardware configurations of general-purpose personal computers, workstations, etc. (hereinafter “PCs”). Therefore, a typical embodiment of the panorama editor 21 is a combination of application program software for realizing various functions required for the panorama editor and a personal computer, but is not limited thereto. Any electronic device having the above configuration and the above application program software may be used. For example, a digital camera or other image processing device may be used.
[0037]
FIG. 9A is a display example of the editing screen of the panorama editor 21. In this example, a panoramic photograph 31 composed of three images 32-34 is displayed. The overlapping portion between the central image 33 and the left adjacent image 32 and the overlapping portion between the central image 33 and the right adjacent image 34 are called “stitch” and are the same for superimposing. This is the recording part of the image. The stitch width may be fixed. When one image is shot in panoramic shooting mode using a camera with a fixed stitch width, the image of the stitch width portion on the right end is displayed on the left end of the monitor screen when the next image is shot. By superimposing a through image (a monitor image for composition adjustment) on the stitch width image, it is possible to roughly adjust the connecting portion at the time of photographing.
[0038]
A central image 33 indicated by hatching indicates a currently selected image (image to be edited). For example, it is possible to move left and right and up and down by dragging while selecting an image. Further, the corner pads 35 to 38 (see FIG. 10) provided at the four corners of the edit target image are used when performing dissimilar deformation of the edit target image. For example, when an arbitrary corner pad is dragged, the image is enlarged or reduced in the drag direction.
[0039]
FIG. 9B is a diagram showing a deformed state of the selected image 33 when the upper left corner pad 35 (or the lower left corner pad 36) is dragged upward (or downward), and the corner pad 35 (or The selected image 33 is displayed while being gradually deformed along with the movement of 36). In the process of the deformed display, if the display update of the deformed image is not in time, the display is jerky and the operational feeling is impaired. As will be described below, the panorama editor 21 shortens the generation time of the deformed image by applying the principle of the image deforming apparatus 10 described above, and thus does not cause such inconvenience.
[0040]
11 and 12 are flowcharts of application program software executed by the CPU 22. When this flowchart is executed, first, a file selection screen for reading a plurality of images constituting a panoramic image is displayed, and an image file selected by the user is read (step S31). Next, an overlap portion with the adjacent image is set from the stitch information of each image file (step S32), and the overlap portion is applied to the panorama photo (for example, see the panorama photo 31 in FIG. 9A). ) Is displayed (step S33).
[0041]
Next, the process waits until an event is detected (step S34). When an event is detected, a process corresponding to the event is executed. For example, when an image click event is detected, an image selection process is executed (step S35). When an image drag event is detected, a vertical movement process of the selected image is executed (step S36). When it is detected, the selected image is subjected to deformation editing processing (step S37), or when a menu selection event (not shown) (image addition, insertion, deletion, storage, playback,..., End) is detected, the menu processing is executed. (Steps S38-41).
[0042]
<Deformation editing processing of selected image>
FIG. 13 is a flowchart of the selected image deformation editing process (see step S37). In this flowchart, first, it is determined whether or not the drag is being performed (step S51). If the drag is being performed, the number of pixels WD1 of the stitch width is set in the variable WD (step S52), and if not, the variable WD is set. The number of horizontal pixels WD2 of the selected image is set (step S53).
[0043]
Next, initialization is performed by setting two loop variables (Ys, Xs) to 0 (steps S54 and S55), and the expression “Ys == HT” (HT is the number of pixels in the vertical direction of the selected image 33; FIG. Reference) is evaluated (step S56). Then, while the evaluation result is False, the expression “Xs == WD” is evaluated (Step S57). If the evaluation result is True, Ys is incremented by 1 (Step S58), and then Step S55 and subsequent steps are executed. .
[0044]
When the evaluation result of the expression “Xs == WD” is False, the coordinates (Xd, Yd) of the deformed image are calculated from the coordinates (Xs, Ys) of the original image (selected image 33) (step S59). In this calculation, the previous formula (1) or the previous formulas (3) and (4) can be used. When the coordinates (Xd, Yd) are calculated, the pixel values of the coordinates (Xs, Ys) of the original image are written in the four pixels including the pixel of the coordinates (Xd, Yd) (step S60), and then Xs is changed. +1 (step S61), and returns to step 57.
[0045]
FIG. 14 is a conceptual diagram of four pixels including a pixel of coordinates (Xd, Yd), and these four pixels [(Xd, Yd), (Xd + 1, Yd), (Xd, Yd + 1), (Xd + 1, Yd + 1). )] Is written with the pixel value of the coordinates (Xs, Ys) of the original image. The pixel array in FIG. 14 corresponds to the pixel array in the second stage from the top in FIG. Therefore, the flowchart of FIG. 13 is obtained by fixing the horizontal pixel number ratio Wr and the vertical pixel number ratio Hr to “2” in the image deformation apparatus 10 described above.
[0046]
When the coordinate calculation in step S59 and the pixel value writing in step S60 are completed for all target pixels of the original image (WD1 × HT pixels during dragging, WD2 × HT pixels if not dragging), step S56 is performed. The evaluation result of the equation “Ys == HT” becomes True, the selected image 33 after deformation is displayed and updated (steps S62 to S65), and the program ends.
[0047]
In this display update process, first, the image 32 adjacent to the left and the selected image 33 after deformation are superimposed (step S62), and then it is determined whether or not the drag is being performed (step S53). If it is not being dragged, it is superimposed on the image 34 on the right side (step S64), and then the modified panorama image 31 is displayed (step S65). Displayed (step S65).
[0048]
As described above, according to the panorama editor 21, the following effects can be obtained.
(A) The number of repetitions of the coordinate calculation (step S59) can be set to the number of target pixels of the original image, and the calculation time can be shortened compared to the case of repeating the number of pixels of the deformed image as in the prior art. it can.
(B) When dragging, the number of times the coordinate calculation (step S59) is repeated can be set to the number of partial pixels (stitch width pixels) in the original image, and dragging that requires particularly smooth image updating is possible. The operational feeling inside can be improved.
(C) When dragging, the superimposition process (step S64) with the image 34 on the right side is passed, so that in this respect as well, the operational feeling during dragging that requires smooth image updating can be improved. it can.
[0049]
<Appendix>
The main functions of this embodiment are functionally realized by organic coupling of hardware assets including a microcomputer and software assets such as an OS and various programs. Since general-purpose items can be used, it can be said that essential items essential to the present invention are substantially concentrated in the program shown in the flowchart of FIG. 4 or FIG. Therefore, the present invention is a storage medium such as a floppy disk, an optical disk, a compact disk, a magnetic tape, a hard disk, or a semiconductor memory, or a storage medium thereof, which stores all or the main part of the program shown in the flowchart of FIG. 4 or FIG. Including components (unit products, finished products, or semi-finished products). Note that the above-mentioned storage medium or component includes not only those which are themselves on the distribution channel but also those that are on the network and provide only the recorded contents.
[0050]
【The invention's effect】
According to the present invention, the calculation process for specifying the pixel coordinates based on the deformation information only needs to be executed the number of times corresponding to the number of pixel coordinates constituting the original image, and the pixel coordinates of the other interpolation pixels are adjacent to each other. For example, The number of pixel coordinate operations using mapping functions or linear interpolation formulas does not substantially exceed the number of pixels in the original image, and the processing for dissimilar deformation is made more efficient For example, you can The image in the middle of deformation can be drawn in real time.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image transformation device.
FIG. 2 is a conceptual diagram of an original image and a modified image.
FIG. 3 is a conceptual diagram of specifying pixel coordinates and setting pixel values.
FIG. 4 is a flowchart showing an overall operation of the image transformation apparatus.
FIG. 5 is a flowchart of a pixel value setting process.
FIG. 6 is an operation explanatory diagram of pixel value setting for 3 × 3 pixels.
FIG. 7 is a diagram illustrating a graphic of an original image and a graphic of a deformed image.
FIG. 8 is a configuration diagram of a panorama editor.
FIG. 9 is a diagram illustrating a display example of an editing screen of the panorama editor.
FIG. 10 is an enlarged view of a main part of an editing screen including a corner pad.
FIG. 11 is a flowchart (1/2) of application program software executed by a CPU.
FIG. 12 is a flowchart (2/2) of application program software executed by the CPU.
FIG. 13 is a flowchart of selected image deformation editing processing;
FIG. 14 is a conceptual diagram of four pixels including a pixel at coordinates (Xd, Yd).
FIG. 15 is a conceptual diagram showing an original image 1 and a modified image 2;
FIG. 16 is a flowchart of conventional image deformation processing (particularly, for performing non-similar deformation).
[Explanation of symbols]
3 Original image
4 Modified images
5 deformation information
10 Image deformation device
11 Image input section
12 Information input section
13 First parameter generator
14 Second parameter generator
15 Deformed image coordinate generation unit (first specifying means)
16 Interpolated coordinate generator (second specifying means)
17 Pixel value setting unit (pixel value setting means)

Claims (10)

元画像を用いて非相似形の変形画像に変形する画像変形装置において、
前記元画像の変形方法を示す変形情報に基づいて前記元画像上の指定された画素座標に対応する前記変形画像上の画素座標を特定する第1特定手段と、
前記第1特定手段によって特定された前記変形画像上の画素座標に隣接する1または複数の画素座標を補間画素座標として特定する第2特定手段と、
前記第1特定手段によって特定された前記変形画像上の画素座標および前記第2特定手段によって特定された前記補間画素座標に対して、前記元画像上の前記指定された画素座標の画素値を設定する画素値設定手段と、
前記元画像を構成する複数の画素座標の各々に対して、前記第1特定手段、前記第2特定手段、および前記画素値設定手段による処理を実行させることにより前記変形画像を構成する複数の画素座標の各々に対する画素値を設定する第1制御手段と、
を備えたことを特徴とする画像変形装置。
In an image transformation device that transforms into an unsimilar deformed image using an original image,
First specifying means for specifying a pixel coordinate on the deformed image corresponding to a designated pixel coordinate on the original image based on deformation information indicating a deformation method of the original image;
Second specifying means for specifying one or more pixel coordinates adjacent to the pixel coordinates on the deformed image specified by the first specifying means as interpolated pixel coordinates;
The pixel value of the specified pixel coordinate on the original image is set with respect to the pixel coordinate on the deformed image specified by the first specifying unit and the interpolation pixel coordinate specified by the second specifying unit. Pixel value setting means for
A plurality of pixels constituting the deformed image by causing the first specifying means, the second specifying means, and the pixel value setting means to perform processing on each of a plurality of pixel coordinates constituting the original image. First control means for setting pixel values for each of the coordinates;
An image deformation apparatus comprising:
元画像を用いて非相似形の変形画像に変形する画像変形方法において、
前記元画像の変形方法を示す変形情報に基づいて前記元画像上の指定された画素座標に対応する前記変形画像上の画素座標を特定する第1ステップと、
前記第1ステップによって特定された前記変形画像上の画素座標に隣接する1または複数の画素座標を補間画素座標として特定する第2ステップと、
前記第1ステップによって特定された前記変形画像上の画素座標および前記第2ステップによって特定された前記補間画素座標に対して、前記元画像上の前記指定された画素座標の画素値を設定する第3ステップと、
前記元画像を構成する複数の画素座標の各々に対して、前記第1ステップ、前記第2ステップ、および前記第3ステップによる処理を繰り返し実行させることにより前記変形画像を構成する複数の画素座標の各々に対する画素値を設定する第4ステップと、
を含むことを特徴とする画像変形方法。
In an image deformation method for deforming into an unsimilar deformed image using an original image,
A first step of specifying pixel coordinates on the modified image corresponding to designated pixel coordinates on the original image based on deformation information indicating a deformation method of the original image;
A second step of specifying one or more pixel coordinates adjacent to the pixel coordinates on the deformed image specified by the first step as interpolated pixel coordinates;
A pixel value of the designated pixel coordinate on the original image is set with respect to the pixel coordinate on the deformed image specified by the first step and the interpolated pixel coordinate specified by the second step. 3 steps,
For each of the plurality of pixel coordinates constituting the original image, the process of the first step, the second step, and the third step is repeatedly executed, whereby the plurality of pixel coordinates constituting the modified image are determined. A fourth step of setting pixel values for each;
An image deformation method comprising:
前記第2特定手段は、前記元画像と前記変換画像との画素数比に基づいて、前記第1特定手段によって特定された前記変形画像上の画素座標に隣接する画素座標の個数を決定し、その決定された個数の隣接画素座標を前記補間画素座標として特定することを特徴とする請求項1記載の画像変形装置。  The second specifying means determines the number of pixel coordinates adjacent to the pixel coordinates on the deformed image specified by the first specifying means based on a pixel number ratio between the original image and the converted image; 2. The image transformation device according to claim 1, wherein the determined number of adjacent pixel coordinates are specified as the interpolation pixel coordinates. 前記第2特定手段は、前記第1特定手段によって特定された前記変形画像上の画素座標に対して、左右どちらか一方向に位置し、且つ、上下どちらか一方向に位置する複数の画素座標を前記補間画素座標として特定することを特徴とする請求項1記載の画像変形装置。  The second specifying means is a plurality of pixel coordinates located in one of the left and right directions and in one of the up and down directions with respect to the pixel coordinates on the deformed image specified by the first specifying means. The image transformation device according to claim 1, wherein: is specified as the interpolation pixel coordinate. 前記元画像の変形方法を示す変形情報に基づいて前記変形画像上の指定された画素座標に対応する前記元画像上の画素座標を特定する第3特定手段と、
前記変形画像を構成する複数の画素座標の各々に対して、前記第3特定手段によって特定された前記元画像上の画素座標の画素値を設定することにより前記変形画像を構成する複数の画素座標の各々に対する画素値を設定する第2制御手段と、
前記元画像と前記変換画像との画素数の大小関係を判定する判定手段と、
前記判定手段により前記変換画像の画素数の方が大きいと判定された場合には、前記第1制御手段により前記変形画像を構成する複数の画素座標の各々に対する画素値を設定させ、前記判定手段により前記変換画像の画素数の方が小さいと判定された場合には、前記第2制御手段によって前記変形画像を構成する複数の画素座標の各々に対する画素値を設定させる第3制御手段を備えたことを特徴とする請求項1記載の画像変形装置。
Third specifying means for specifying pixel coordinates on the original image corresponding to designated pixel coordinates on the deformed image based on deformation information indicating a deformation method of the original image;
For each of a plurality of pixel coordinates constituting the deformed image, a plurality of pixel coordinates constituting the deformed image are set by setting pixel values of the pixel coordinates on the original image specified by the third specifying means. Second control means for setting pixel values for each of
Determination means for determining a magnitude relationship of the number of pixels between the original image and the converted image;
When the determination unit determines that the number of pixels of the converted image is larger, the first control unit sets a pixel value for each of a plurality of pixel coordinates constituting the modified image, and the determination unit When it is determined that the number of pixels of the converted image is smaller, the second control means includes third control means for setting pixel values for each of a plurality of pixel coordinates constituting the modified image. The image transformation apparatus according to claim 1.
前記元画像を取り込み保持する画像入力手段と、
ユーザによって入力された前記変形情報を取り込み保持する変形情報入力手段と、
を備え、
前記第1制御手段は、前記変形情報入力手段によって前記変形情報が取り込まれるのに応じて、前記画像入力手段によって取り込まれた元画像を該変形情報に基づいて変形画像に変形することを特徴とする請求項1記載の画像変形装置。
Image input means for capturing and holding the original image;
Deformation information input means for capturing and holding the deformation information input by the user;
With
The first control means transforms the original image captured by the image input means into a deformed image based on the deformation information in response to the deformation information being captured by the deformation information input means. The image deformation device according to claim 1.
前記画像入力手段は、パノラマ写真を構成する複数の画像を取り込み保持し、
前記変形情報入力手段は、前記画像入力手段によって取り込まれた複数の画像の一部が重ね合わさるように表示された編集画面上で、この複数の画像の中から変形対象となる元画像をユーザーに選択させるとともに、該選択された元画像に対するユーザの変形操作により指定される変形情報を取り込み、
前記第1制御手段は、前記選択された元画像を前記ユーザの変形操作に応じて逐次変形画像に変形するとともに、前記編集画面における前記元画像の表示を逐次変形される変形画像に更新することを特徴とする請求項6記載の画像変形装置。
The image input means captures and holds a plurality of images constituting a panoramic photo,
The deformation information input unit displays an original image to be deformed from the plurality of images to the user on an editing screen displayed so that a part of the plurality of images captured by the image input unit is overlapped. In addition to the selection, the transformation information specified by the transformation operation of the user for the selected original image is captured,
The first control unit transforms the selected original image into a sequentially deformed image according to the deformation operation of the user, and updates the display of the original image on the editing screen to a deformed image that is sequentially deformed. The image transformation device according to claim 6.
前記元画像の形状は、長方形であり、
前記ユーザの変形操作は、長方形の形状をした前記元画像における角の位置をドラッグ操作により変更する変形操作であることを特徴とする請求項1記載の画像変形装置。
The shape of the original image is a rectangle,
The image deforming apparatus according to claim 1, wherein the deforming operation of the user is a deforming operation for changing a corner position in the original image having a rectangular shape by a drag operation.
前記第1制御手段は、前記ユーザによるドラッグ操作の実行中においては、前記元画像における重ね合わせ個所に対応する画像部分に対してのみ、前記第1特定手段、前記第2特定手段、および前記画素値設定手段による処理を実行させ、前記変形画像における前記画像部分に対応する画素座標の画素値を設定することを特徴とする請求項7または8記載の画像変形装置。  The first control unit includes the first specifying unit, the second specifying unit, and the pixel only for the image portion corresponding to the overlapping portion in the original image during the drag operation by the user. 9. The image deformation apparatus according to claim 7, wherein a process by a value setting unit is executed to set a pixel value of a pixel coordinate corresponding to the image portion in the deformed image. 元画像の変形方法を示す変形情報に基づいて前記元画像上の指定された画素座標に対応する変形画像上の画素座標を特定する第1特定手段と、
前記第1特定手段によって特定された前記変形画像上の画素座標に隣接する1または複数の画素座標を補間画素座標として特定する第2特定手段と、
前記第1特定手段によって特定された前記変形画像上の画素座標および前記第2特定手段によって特定された前記補間画素座標に対して、前記元画像上の前記指定された画素座標の画素値を設定する画素値設定手段と、
前記元画像を構成する複数の画素座標の各々に対して、前記第1特定手段、前記第2特定手段、および前記画素値設定手段による処理を実行させることにより前記変形画像を構成する複数の画素座標の各々に対する画素値を設定する第1制御手段と、
を実現するためのプログラムを格納したことを特徴とする記録媒体。
First specifying means for specifying pixel coordinates on the deformed image corresponding to designated pixel coordinates on the original image based on deformation information indicating a deformation method of the original image;
Second specifying means for specifying one or more pixel coordinates adjacent to the pixel coordinates on the deformed image specified by the first specifying means as interpolated pixel coordinates;
The pixel value of the specified pixel coordinate on the original image is set with respect to the pixel coordinate on the deformed image specified by the first specifying unit and the interpolation pixel coordinate specified by the second specifying unit. Pixel value setting means for
A plurality of pixels constituting the deformed image by causing the first specifying means, the second specifying means, and the pixel value setting means to perform processing on each of a plurality of pixel coordinates constituting the original image. First control means for setting pixel values for each of the coordinates;
A recording medium storing a program for realizing the above.
JP23859599A 1999-08-25 1999-08-25 Image deformation device and image deformation method Expired - Fee Related JP3764972B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23859599A JP3764972B2 (en) 1999-08-25 1999-08-25 Image deformation device and image deformation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23859599A JP3764972B2 (en) 1999-08-25 1999-08-25 Image deformation device and image deformation method

Publications (2)

Publication Number Publication Date
JP2001069337A JP2001069337A (en) 2001-03-16
JP3764972B2 true JP3764972B2 (en) 2006-04-12

Family

ID=17032539

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23859599A Expired - Fee Related JP3764972B2 (en) 1999-08-25 1999-08-25 Image deformation device and image deformation method

Country Status (1)

Country Link
JP (1) JP3764972B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8750646B2 (en) 2011-09-30 2014-06-10 Seiko Epson Corporation Projector and control method for the projector

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8750646B2 (en) 2011-09-30 2014-06-10 Seiko Epson Corporation Projector and control method for the projector

Also Published As

Publication number Publication date
JP2001069337A (en) 2001-03-16

Similar Documents

Publication Publication Date Title
US5590271A (en) Interactive visualization environment with improved visual programming interface
US6747652B2 (en) Image processing device and method for generating three-dimensional character image and recording medium for storing image processing program
US6396962B1 (en) System and method for providing zooming video
US7535497B2 (en) Generation of static image data from multiple image data
JP2003271665A (en) Graphical user interface for retrieval
JP2919428B2 (en) Image transformation device
US9424681B2 (en) Information processing device, information processing method, and program
JPH04281572A (en) Synthesizing system for photographic image with computer graphic in image processing system
WO2024222356A1 (en) Special-effect generation method and apparatus, and computer device and storage medium
US20100037136A1 (en) Context-Aware Non-Linear Graphic Editing
JP4143228B2 (en) Image processing apparatus, image processing method, and storage medium
JP3764972B2 (en) Image deformation device and image deformation method
JPH07200243A (en) Icon selection control device
KR100908084B1 (en) Recording medium recording method of 3-dimensional coordinates of subject and program for executing the method in computer
JP3041360B2 (en) Generating moving images
CA2485723A1 (en) A data processing apparatus and method for producing interpolated data of an image
US6847359B1 (en) Image processing apparatus and image capturing apparatus, which approximate object shapes using a plurality of polygon patches
JP3219182B2 (en) Camera control method in monitoring control device
JPH06301792A (en) Texture mapping device
JP2999019B2 (en) Character and graphic transformation processor
JP3202435B2 (en) Image display method and device
WO2001011627A1 (en) Generation and versatile usage of effect tree presets
US20140365926A1 (en) Apparatus and method for providing graphic editors
JP2000020707A (en) Image generating method and recording medium for image generation program
JP2000348199A (en) Method and device for texture mapping

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050128

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050830

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050929

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20051124

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060102

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100203

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110203

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120203

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120203

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130203

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130203

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140203

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees