JP3449563B2 - How to edit image data - Google Patents

How to edit image data

Info

Publication number
JP3449563B2
JP3449563B2 JP25881393A JP25881393A JP3449563B2 JP 3449563 B2 JP3449563 B2 JP 3449563B2 JP 25881393 A JP25881393 A JP 25881393A JP 25881393 A JP25881393 A JP 25881393A JP 3449563 B2 JP3449563 B2 JP 3449563B2
Authority
JP
Japan
Prior art keywords
coordinates
coordinate
pixel
parameter
deformation
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
JP25881393A
Other languages
Japanese (ja)
Other versions
JPH07273967A (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.)
Alps Alpine Co Ltd
Original Assignee
Alps Electric 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 Alps Electric Co Ltd filed Critical Alps Electric Co Ltd
Priority to JP25881393A priority Critical patent/JP3449563B2/en
Publication of JPH07273967A publication Critical patent/JPH07273967A/en
Priority to JP2000007612A priority patent/JP3612257B2/en
Application granted granted Critical
Publication of JP3449563B2 publication Critical patent/JP3449563B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、コンピュータおよび複
写機などの画像編集方法に係り、特に、階調を有するモ
ノクロ写真あるいはカラー写真などの原画像の画像デー
タを読み込んで所定の形状に変形させるのに好適な画像
集方法に関する。 【0002】 【従来の技術】一般に、文字、図形等の原画像の形状を
読み取り、これを原画像データとしてコンピュータ等に
取り込み、この原画像データを所望の形状に変形させ、
CRT、プロッタ等の出力装置で描画したり、FD等の
記憶媒体に記録したりする画像データ編集が盛んに行な
われている。 【0003】このような従来の画像データ編集を行なう
場合には、図示しない略矩形の原画像を、図25に示す
ような形状に変形させる射影変形が移用されている。 【0004】 【発明が解決しようとする課題】しかしながら、前述し
た従来の射影変形を用いた画像データ編集においては、
変形後の画像が変形方向に徐々に大きくなるとともに、
変形方向の先端側に大きな空間が形成され、変形後の画
像の品質が劣るという問題点があった。また、このよう
な従来の射影変形を用いた原画像の画像データ編集にお
いては、曲線形状への変形ができないという問題点があ
った。 【0005】このような問題点に対処するために、本出
願人は、特願平4−264858号に記載した画像デー
タ編集装置および方法を提案した。 【0006】しかしながら、特願平4−264858号
に記載した画像データ編集方法においては、文字や図形
などの2値化可能な原画像の画像データ(ベクトルデー
タ)を曲線形状に変形することを対象としている。 【0007】そこで、さらに画像データとして深さの画
像情報(濃度値)を有する点(画素:ピクセル)の集合
により構成されている階調を有するモノクロ写真あるい
はカラー写真などを曲線形状に良好に変形することので
きるものが望まれていた。 【0008】本発明はこれらの点に鑑みてなされたもの
であり、階調を有するモノクロ写真あるいはカラー写真
などの原画像の形状を自在に変形可能とする画像編集方
法を提供することを目的とする。 【0009】 【課題を解決するための手段】前述した目的を達成する
ため請求項1に記載の本発明の画像データ編集方法は、
原画像の画像情報としての原画像データをコンピュータ
で処理可能な単位のピクセルの集合体とし、これらのピ
クセルを略矩形の基準外形枠を座標軸とする整数のメッ
シュ座標として前記基準外形枠に収納し、この基準外形
枠に収納した各ピクセルの座標値を前記基準外形枠の座
標軸の原点から座標軸毎に最も離間した位置のピクセル
の座標値をそれぞれ1とするパラメータ座標値に変換し
て前記メッシュ座標上の各ピクセルを座標軸の最大値を
1とする略矩形のパラメータ座標に展開し、前記基準外
形枠を少なくとも関数により記述可能な所望の形状の変
形外形枠に変形させてこの変形外形枠を座標軸とする実
座標とし、この実座標を当該実座標の座標軸の原点から
座標軸毎に最も離間した位置の座標値をそれぞれ1とす
る変形パラメータ座標とし、その後、前記各ピクセルの
パラメータ座標値を変形パラメータ座標における変形パ
ラメータ座標値に変換して、前記各ピクセルを前記実座
標上に整数のフロートメッシュ座標として展開するとと
もに、前記実座標内の領域を複数の変形処理最小単位と
してのブロックに分割し、前記ブロック毎にそのブロッ
ク内に位置するピクセルのうちの1つのピクセルの原画
の画像濃度値を取得し、前記実座標内の領域を、前記ブ
ロックを囲む前記実座標上の矩形毎に、前記取得した原
画の画像濃度値をもって塗りつぶすことを特徴としてい
る。 【0010】 【0011】 【作用】前述した構成からなる本発明の画像データ編集
方法によれば、原画像を所定の基準外形枠内に収納し、
原画像の基準外形枠に対する相対位置を決定することが
できる。そして、前記基準外形枠を所望の形状の変形外
形枠に変形させると、その変形外形枠に従って原画像の
基準外形枠に対する相対位置と同一の位置関係を保持さ
せた状態で変形外形枠内に原画像を変形させるととも
に、変形外形枠内に原画像の濃度値を付与させることが
できる。 【0012】 【実施例】以下、本発明の実施例を図1から図24につ
いて説明する。 【0013】本実施例は、本発明による画像データ編
法を、写真原稿を変形させる(写真変形)場合に用い
たものであり、図1は画像データ編集装置の要部の構成
を示すブロック図である。 【0014】図1に示すように、本実施例の画像データ
編集装置1は、原画像データ読み取り手段2と、パラメ
ータ座標形成手段3と、変形外形枠形状読み取り手段4
と、変形パラメータ座標形成手段5と、実座標算出手段
6と、画像変形描画単位設定手段7と、原画像濃度値取
得手段8と、画像描画手段9とにより形成されている。 【0015】つぎに、各部の構成をさらに説明すると、
前記原画像データ読み取り手段2は、例えば長方形状を
した写真等の原画たる原画像の画像情報(原画像デー
タ)としての画素および画素属性(濃度値)などを読み
取り適宜なメモリ等へ記憶させるスキャナ、メモリ、C
PU等(図示せず)から形成されている。したがって、
原画をスキャナなどの原画像データ読み取り手段2で読
み取ると、読み取られた原画像データの各ドット(画
素)は、従来公知の如く、直交座標上の座標データとし
て原画像データ読み取り手段2のメモリに記憶されるこ
とになる。 【0016】また、前記パラメータ座標形成手段3は、
前記原画像データ読み取り手段2により読み取られた原
画像データの画素を図示しないコンピュータなどで処理
可能な単位のピクセルの集合体とし、この各ピクセルを
矩形の基準外形枠を座標軸とする整数のメッシュ座標と
して適宜なメモリ等に記憶させた後に、その座標軸の最
大値を1としたパラメータ座標に展開し、適宜なメモリ
等に記憶させるメモリ、CPU等(図示せず)から形成
されている。つまり、パラメータ座標形成手段3は、原
画像データ読み取り手段2により読み取られた原画像デ
ータの画素をコンピュータで処理可能な単位のピクセル
の集合体とし、これらのピクセルを略矩形の基準外形枠
を座標軸とする整数のメッシュ座標として前記基準外形
枠に収納し、この基準外形枠に収納した各ピクセルの座
標値を前記基準外形枠の座標軸の原点から座標軸毎に最
も離間した位置のピクセルの座標値をそれぞれ1とする
パラメータ座標値に変換して前記メッシュ座標上の各ピ
クセルを座標軸の最大値を1とする略矩形のパラメータ
座標に展開するようになっている。なお、コンピュータ
などで処理可能な単位のピクセルとするのは、従来公知
の如く、例えば、コンピュータがディスプレイ上で独立
してコントロールできる最小単位が8ビット単位である
場合には、原画像データの直交座標上におけるXおよび
Y軸方向のそれぞれ8画素(ドット)を1ピクセルとす
る。もちろん、コンピュータがディスプレイ上で独立し
てコントロールできる最小単位が1ビットである場合に
は、読み取られた原画像データの1ビットが1ピクセル
となる。したがって、パラメータ座標においては、座標
軸の原点から最も離間した座標値が1となる。更に説明
すれば、「コンピュータで処理可能な単位」とは、CC
Dスキャナやデジタルカメラからの入力データのよ
、画像の1点1点に対応する濃度情報やカラー情報の
ことをいう。具体的には、メモリに格納された画像要素
(ピクセル)の持つ位置データおよびその位置に対応す
る色情報(または濃淡情報)データのことである。例え
ば、256の段階をもつ白黒で表現する場合には、各画
像の1点1点に対応する8ビットのデータが必要であ
り、カラー画像において1670万色(正確には167
7215色)を表現するためには画像の1点1点に対応
するR:8ビット、G:8ビット、B:8ビットの3バ
イトのデータが必要となる。そして、ピクセルとはこの
1点1点に対応したデータのことをいう。例えば縦横が
256で表される場合、画像の位置に対応する(x、
y)座標データは、各々8ビットのコンピュータで処理
可能なデータとして扱うことができる。また、この位置
座標に対応する色成分のデータは、コンピュータで扱う
ことのできる8ビットx3のデータとして扱うことがで
きる。 【0017】また、前記変形外形枠形状読み取り手段4
は、少なくとも関数、例えば3次ベジエ関数等により記
述可能とされる所望の形状に変形された基準外形枠とし
ての変形外形枠の画像データ(形状データ)としての画
素を図示しないスキャナ等により読み取ったり、予め与
えられた複数の所望の変形外形枠から選択することによ
り適宜なメモリ等に記憶させるスキャナ、メモリ、CP
U等(図示せず)から形成されている。 【0018】また、前記変形パラメータ座標形成手段5
は、前記変形外形枠形状読み取り手段4により読み取ら
れた変形外形枠の形状データ(輪郭)の画素をコンピュ
ータなどで処理可能な単位のピクセルの集合体とし、こ
のピクセルにより形成されたを変形外形枠を座標軸とす
る実座標として適宜なメモリ等に記憶させた後に、その
実座標軸の最大値を1とした変形パラメータ座標に展開
し、適宜なメモリ等に記憶させるメモリ、CPU等(図
示せず)から形成されている。つまり、変形パラメータ
座標形成手段5は、前記基準外形枠を変形外形枠に変形
させてこの変形外形枠を座標軸とする実座標として適宜
なメモリ等に記憶させた後に、この実座標を当該実座標
の座標軸の原点から座標軸毎に最も離間した位置の座標
値をそれぞれ1とする変形パラメータ座標として、適宜
なメモリ等に記憶させるメモリ、CPU等(図示せず)
から形成されている。 【0019】また、前記実座標算出手段6は、前記各ピ
クセルのパラメータ座標値を変形パラメータ座標におけ
る変形パラメータ座標値に変換した後に、所望の処理精
度とする処理精度設定部10を介して各ピクセルを実座
標上に整数のフロートメッシュ座標として展開し、適宜
なメモリ等に記憶させるメモリ、CPU等(図示せず)
から形成されている。なお、公知の如く、コンピュータ
を用いた演算において、演算に使用する「数」の中に小
数点の位置が動き得る「浮動小数点形式の数」というも
のがある。そして、「フロートメッシュ座標」とは、座
標軸上の数値をこの「浮動小数点形式の数」で表した座
標のことで、基準外形枠を座標軸とする座標を「整数の
メッシュ座標」と記載したので、これと区別するために
「整数のフロートメッシュ座標」と表現した。なお、整
数であるので、小数点以下の数値は0である。 【0020】また、前記画像変形描画単位設定手段7
は、前記実座標のフロートメッシュ座標上に展開された
各ピクセルを画像品質および処理速度を勘案し、一旦バ
ンド処理と称する列分割し、その後各列を行分割するこ
とにより、変形外形枠(実座標のフロートメッシュ座
標)内の領域を所望の4点のピクセルにて形成される適
宜な変形処理最小単位(ブロック)に分割して適宜なメ
モリ等に記憶させるメモリ、CPU等(図示せず)から
形成されている。 【0021】また、前記原画像濃度値取得手段8は、前
記各ブロックを形成する4点のピクセルのうちの1つの
ピクセルの原画の濃度値(前記基準外形枠の整数メッシ
ュ座標上の4点のピクセルの濃度値:本実施例において
は、メッシュ座標上の4点のピクセルの内の左上の1点
のピクセルの濃度値)を適宜なメモリ等に記憶させるメ
モリ、CPU等(図示せず)から形成されている。 【0022】また、前記画像描画手段9は、前記実座標
内の領域を前記ブロックを囲む前記実座標上の矩形毎
に、取得した原画の画像濃度値、すなわち、画像濃度値
取得手段8により取得した各ブロック毎の濃度値に基づ
いて塗りつぶすことにより変形後の画像データを形成す
るとともに、その変形後の画像データをCRT、プロッ
タ等の適宜な出力装置に出力するメモリ、CPU等(共
に図示せず)から形成されている。 【0023】なお、前記処理精度設定部10は必要に応
じて各手段に付設するようにしてもよく、特に、本実施
例の構成に限定されるものではない。また、前記各メモ
リおよび各CPU等を制御部等に一括させて設けること
もできる。 【0024】つぎに、前述した構成からなる本実施例の
画像データ編集装置1を用いた画像データ編集方法の作
用について説明する。 【0025】本実施例の画像データ編集方法の概略につ
いて説明すると、写真等の原画たる原画像の画像情報
(原画像データ)としての画素および画素属性(濃度
値)を図示しないコンピュータで処理可能な単位のピク
セルとし、そのピクセルを基準外形枠を座標軸とする整
数のメッシュ座標として基準外形枠内に収納し、この基
準外形枠をその座標軸の最大値を1としたパラメータ座
標に展開し、基準外形枠を関数、本実施例では3次ベジ
エ関数にて記述可能な所望の形状に変形させて変形外形
枠とし、この変形外形枠を座標軸とする実座標とし、そ
の実座標軸の最大値を1とした変形パラメータ座標に変
換し、前記パラメータ座標上のピクセルを変形パラメー
タ座標上に変換し、その変形パラメータ座標上のピクセ
ルを実座標上に整数のフロートメッシュ座標として展開
するとともに、変形外形枠(実座標)内の領域を複数の
変形処理最小単位としてのブロックに分割し、各ブロッ
クを各ブロックの相対位置と等しい基準外形枠上のピク
セルの濃度値(画像濃度値)をもって塗りつぶすことに
より、写真等の原画の変形を行なうようにされている
すなわち、原画像の画像情報としての原画像データをコ
ンピュータで処理可能な単位のピクセルの集合体とし、
これらのピクセルを略矩形の基準外形枠を座標軸とする
整数のメッシュ座標として基準外形枠に収納し、この基
準外形枠に収納した各ピクセルの座標値を基準外形枠の
座標軸の原点から座標軸毎に最も離間した位置のピクセ
ルの座標値をそれぞれ1とするパラメータ座標値に変換
してメッシュ座標上の各ピクセルを座標軸の最大値を1
とする略矩形のパラメータ座標に展開し、基準外形枠を
少なくとも関数により記述可能な所望の形状の変形外形
枠に変形させてこの変形外形枠を座標軸とする実座標と
し、この実座標を当該実座標の座標軸の原点から座標軸
毎に最も離間した位置の座標値をそれぞれ1とする変形
パラメータ座標とし、その後、各ピクセルのパラメータ
座標値を変形パラメータ座標における変形パラメータ座
標値に変換して、各ピクセルを実座標上に整数のフロー
トメッシュ座標として展開するとともに、実座標内の領
域を複数の変形処理最小単位としてのブロックに分割
し、ブロック毎にそのブロック内に位置するピクセルの
うちの1つのピクセルの原画の画像濃度値を取得し、実
座標内の領域を、ブロックを囲む実座標上の矩形毎に、
取得した原画の画像濃度値をもって 塗りつぶすことによ
り、写真等の原画の変形を行なうようにされている。し
たがって、原画像データの収納された基準外形枠を、関
数にて記述可能な所望の形状の変形外形枠に変形させる
ことにより原画像データを変換させている。 【0026】このような画像データ編集方法を、図2に
示すフローチャートにより説明するる。 【0027】まず、ステップST10において、写真な
どの原画像の画像情報である画素および画素属性(濃度
値)をスキャナなどの適宜な原画像データ読み取り手段
2により所望の分解能をもって読み取り、つぎのステッ
プST11に進行する。 【0028】つぎに、ステップST11において、原画像
の画像情報を適宜なパラメータ座標形成手段3により画
像データ編集装置1にて処理可能な単位のピクセルとす
るとともに、このピクセルを整数のメッシュ座標からな
る基準外形枠に収納した後、基準外形枠に対するパラメ
ータ座標に展開し、つぎのステップST12に進行する。
すなわち、原画像の画像情報としての原画像データをコ
ンピュータで処理可能な単位のピクセルの集合体とし、
これらのピクセルを略矩形の基準外形枠を座標軸とする
整数のメッシュ座標として基準外形枠に収納し、この基
準外形枠に収納した各ピクセルの座標値を基準外形枠の
座標軸の原点から座標軸毎に最も離間した位置のピクセ
ルの座標値をそれぞれ1とするパラメータ座標値に変換
してメッシュ座標上の各ピクセルを座標軸の最大値を1
とする略矩形のパラメータ座標に展開する。これにより
原画像を所定の基準外形枠内に収納し、原画像の基準外
形枠に対する相対位置を決定することができる。 【0029】つぎに、ステップST12において、所望
の形状の変形外形枠の形状を適宜な変形外形枠形状読み
取り手段4により読み取り、つぎのステップST13に
進行する。 【0030】つぎに、ステップST13において、変形外
形枠に対する変形パラメータ座標を適宜な変形パラメー
タ座標形成手段5により形成し、つぎのステップST14
に進行する。すなわち、基準外形枠を、少なくとも関数
により記述可能な所望の形状の変形外形枠に変形させて
この変形外形枠を座標軸とする実座標とした後に、この
実座標を当該実座標の座標軸の原点から座標軸毎に最も
離間した位置の座標値をそれぞれ1とする。 【0031】つぎに、ステップST14において、適宜な
実座標算出手段6により前記パラメータ座標上のピクセ
ルを変形パラメータ座標上に変換し、その変形パラメー
タ座標上に変換したピクセルを整数のフロートメッシュ
座標として実座標(変形外形枠)に展開し、つぎの、ス
テップST15に進行する。すなわち、各ピクセルのパラ
メータ座標値を変形パラメータ座標における変形パラメ
ータ座標値に変換して各ピクセルを実座標上に整数のフ
ロートメッシュ座標として展開する。 【0032】つぎに、ステップST15において、実座標
(フロートメッシュ座標)上に展開された各ピクセルを
適宜な画像変形描画単位設定手段7により変形処理最小
単位(ブロック)に分割し、つぎのステップST16に進
行する。すなわち、実座標内の領域を複数の変形処理最
小単位としてのブロックに分割する。 【0033】つぎに、ステップST16において、適宜な
原画像濃度値取得手段8により各ブロックのピクセルに
対応する基準外形枠上のピクセルの濃度値(元の濃度
値)を取得し、つぎのステップST17に進行する。すな
わち、ブロック毎に、そのブロック内に位置するピクセ
ルのうちの1つのピクセルの原画の画像濃度値を取得す
る。詳細については、後述する。 【0034】つぎに、ステップST17において、変形外
形枠(実座標)内の各ブロックを適宜な画像描画手段9
により元の濃度値にて塗りつぶすとともに、所望の出力
装置に出力することにより一連の処理を終了させる。
細については、後述する。 【0035】このような、上述した画像データ編集方法
の要部について具体的に詳しく説明する。 【0036】まず、本実施例の画像データ編集の基準外
形枠の変形時の線分の組み合わせについて図3のaから
hにより説明する。 【0037】図3は基準外形枠の変形時の線分の組み合
わせを説明する説明図であり、aは原画像の一例を示
し、bは基準外形枠を示し、cは基準外形枠の縦方向変
形時の線分の組み合わせを示し、dは縦方向変形後の変
形外形枠を示し、eは縦方向変形した画像を示し、fは
基準外形枠の横方向変形時の線分の組み合わせを示し、
gは横方向変形後の変形外形枠を示し、hは横方向変形
した画像を示す。 【0038】図3のaに示す原画(写真)の画像情報の
外側の適宜な位置に、図3のbに示すような点A,点
B,点C,点Dから構成される矩形形状のA−B−C−
Dからなる基準外形枠11が形成される。そして、ベク
トルの方向を考慮し、図3のcに示す基準外形枠11の
図中上下の線分A−B:A(t)と線分D−C:B
(t)との組み合わせを用いて図3のdに示すように、
縦方向に基準外形枠11を変形させて変形外形枠12を
形成し、図3のeに示す縦方向に変形した画像を得る場
合と、図3のfに示すように、基準外形枠11の図中左
右の線分A−D:A(t)と線分B−C:B(t)との
組み合わせを用いて図3のgに示すように、横方向に基
準外形枠11を変形させて変形外形枠12を形成し、図
3のhに示す縦方向に変形した画像を得る場合の何れか
一方の組み合わせを用いて原画の変形を行なう。 【0039】つぎに、画像データ編集としての変形の原
理について縦方向変形を例示して図4のaからgにより
説明する。 【0040】図4は縦方向変形について説明する説明図
であり、aは基準外形枠に収納されたピクセルを示し、
bは基準外形枠上のピクセルを示し、cは基準外形枠上
のピクセルの位置を示し、dはパラメータ座標上のピク
セルの位置を示し、e変形外形枠を示し、fは変形パラ
メータ座標上のピクセルの位置を示し、gは変形外形枠
上に変換されたピクセルの位置を示す。 【0041】図4のaに示すように、矩形形状のA−B
−C−Dからなる基準外形枠11の左上の点Aを原点と
し、線分A−B方向を座標軸x(x軸)とし、そのx軸
の最大値(ピクセルの数=距離)をXSとするととも
に、線分A−D方向を座標軸y(y軸)とし、そのy軸
の最大値(ピクセルの数=距離)をYSとする。つま
り、基準外形枠11を形成する点Aの座標値を(0,
0)、点Bの座標を(XS,0)、点Dの座標値を
(0,YS)とし、ピクセルのx軸方向をxbaseと
称し、ピクセルのy軸方向をybaseと称するととも
に、変形方向の線分をpxlcnt、直線方向の線分を
baseと称す。そして、このx軸とy軸とにより形成
されるピクセルを単位とする整数のメッシュ座標(x−
y座標)13内に原画の画像情報としてのピクセルが収
納される。この基準外形枠11上のピクセル(メッシュ
座標)を図4のbに示す。ここで、図4のcに示すよう
に、ピクセルPのメッシュ座標(x−y座標)13にお
ける座標値はP=(Px,Py)となる。更に説明する
と、図4のbにあるように、画像を構成する矩形ピクセ
ルの左上端をA、右上端をB、左下端をD、右下端をC
としたときに、画像を構成するピクセルの位置はA−B
をx軸、A−Dをy軸として2次元の座標(x,y)で
表すことができる。例えば、A点を原点にとると、Aの
ピクセル座標は(0,0)であり、A−B軸上にありA
から3番目のピクセルの座標は(2,0)と表すことが
できる。これがメッシュ座標である。座標値x,yは整
数値となる(図4のcを参照)。また、「基準外形枠」
とは、画像を構成するピクセルを囲む図4のbでいう矩
形A−B−C−Dを指している。この矩形のことを「基
準外形枠」と称する。そして、この枠の内部(枠の線上
にもピクセルは存在することになるが)に対象とする画
像を構成するピクセルが入ることになる。このこと(対
象とする画像のピクセルデータが当該矩形内にあるとい
うこと)を「収納」という。つまり、集合体の各ピクセ
ルを枠内に入れるという作業は、コンピュータのメモリ
に順番に画像ピクセルの位置座標に対応した色情報(ま
たは濃淡情報)格納することを指している。 【0042】つぎに、図4のdに示すように、メッシュ
座標(x−y座標)13におけるx軸の最大値XSを1
とするu軸に変換するとともに、y軸の最大値YSを1
とするv軸に変換し、このu軸とv軸とにより形成され
る座標をパラメータ座標14(u−v座標)とすると、
x−y座標13におけるピクセルPの座標値P=(P
x,Py)は、u−v座標14において、パラメータ座
標値P=(u,v)で表すことができる(ただし、0≦
u≦1,0≦v≦1)。すなわち、図4のcの座標によ
って示される前記各ピクセルのパラメータ座標値を、図
4のdの座標によって示される変形パラメータ座標にお
ける変形パラメータ座標値に変換することが行われる。
更に説明すると、図4のcに示す基準外形枠11の原点
たる点Aに位置するピクセルの座標値(0,0)は、図
4のdに示すパラメータ座標14における原点たる点A
において座標値(0,0)となり、図4のcに示す基準
外形枠11の点Bに位置するピクセルの座標値(XS,
0)は、図4のdに示すパラメータ座標14における点
Bにおいて座標値(1,0)となり、図4のcに示す基
準外形枠11の点Cに位置するピクセルの座標値(X
S,YS)は、図4のdに示すパラメータ座標14にお
ける点Cにおいて座標値(1,1)となり、図4のcに
示す基準外形枠11の点Dに位置するピクセルの座標値
(0,YS)は、図4のdに示すパラメータ座標14に
おける点Dにおいて座標値(0,1)となる。なお、A
点、B点、C点、D点以外に位置するピクセルのパラメ
ータ座標値P=(u,v)は、公知の如く、メッシュ座
標13のx軸およびy軸の原点から最も離間したそれぞ
れの座標値を1とする比例計算により容易に算出するこ
とができる。 【0043】つぎに、図4(d)の座標に展開されたパ
ラメータ座標値に基づく各ピクセルを、図4(e)〜
(g)に示すように順に展開して、図4(g)のフロー
トメッシュ座標を得ることにより、各ピクセルを実座標
軸上に整数のフロートメッシュ座標として展開するよう
にする。すなわち、矩形形状の基準外形枠11(A−B
−C−D)を構成する線分の内の線分A−Bと線分D−
Cが3次ベジエ関数により記述可能な所望の形状に横方
向変形し、図4のeに示すA’−B’−C’−D’から
なる変形外形枠12を前記と同様に、点A’を原点と
し、線分A’−B’方向を座標軸x(x軸)とし、その
x軸の最大値をXS’とするとともに、線分A’−D’
方向を座標軸y(y軸)とし、そのy軸の最大値をY
S’とする実座標15とした後に、実座標15における
x軸の最大値XS’を1とするu軸に変換するととも
に、y軸の最大値YS’を1とするv軸に変換し、図4
のfに示すように、u軸とv軸とにより形成される変形
パラメータ座標(u−v座標)16とする。また、基準
外形枠11を変形外形枠12に変形させるのは、基準外
形枠11(A−B−C−D)を構成する4つの線分を、
変形外形枠12を構成する4つの線分に置き換えること
により実行する。つまり、基準外形枠11(A−B−C
−D)を構成する4つの線分の方程式を、前記変形外形
枠形状読み取り手段4により読み取るかあるいは予め与
えられた複数の所望の変形外形枠の形状データから変形
外形枠12を構成する4つの線分の方程式のそれぞれに
等しくなるように置き換えることにより容易に実行でき
ることは自明である。なお、変形外形枠12の変形方向
の線分の一方(上または左)をF(t)にて記述される
fcurve、他方(下または右)をG(t)にて記述
されるgcurveと称し、変形外形枠12の直線方向
の線分の一方(左または上)をaline、他方(右ま
たは下)をblineと称する(図4のe)。 【0044】ここで、前記パラメータ座標14のu軸と
v軸とが変化してもパラメータ座標値は変化しないとし
て、ピクセルPの変形パラメータ座標値を算出すると、
図4のfに示すように、変形パラメータ座標16の曲線
A’−B’から曲線D’−C’に変化する過程において
発生する曲線の内の、v軸方向jライン目のものを表す
曲線F(Lj0−Lj1)を算出し、この算出した曲線
FをLj(u)(=(Ljx(u),Ljy(u)))
表したとき、この曲線F上にあって、u軸方向i番目
のパラメータuiにより決定される点P’(Ljx(u
i),Ljy(ui))が点Pの変形パラメータ座標値
となる。したがって、変形外形枠12上の各ピクセル
P’は、基準外形枠11上における各ピクセルPの相互
の位置関係を確実に反映するので、基準外形枠11に対
する原画像データのそれぞれの相対位置関係を保持する
ようにして、原画像データを所望の形状に変形させるこ
とができることになる。 【0045】そして、この変形パラメータ座標値を実座
標15上に整数のフロートメッシュ座標として変換する
ことにより、変形が終了する。すなわち、原画像の各ピ
クセルの基準外形枠11に対するそれぞれの相対位置と
同一の位置関係を保持させた状態で変形外形枠12内に
原画像の各ピクセルを位置させることで変形が終了す
る。この変形が終了した実座標15としての整数のフロ
ートメッシュ座標を図4のgに示す。 【0046】つぎに、原画像データの縦方向変換および
横方向変換における中間曲線の算出方法について説明す
る。 【0047】図5は中間曲線の算出方法を説明する説明
図である。 【0048】図5に示すように、曲線A0−A3を A(t)=(1−t)・A0+(1−t)・t・A
1+(1−t)・t・A2+t・A3 曲線B0−B3を B(t)=(1−t)・B0+(1−t)・t・B
1+(1−t)・t2・B2+t ・B3 と表されているとする。 【0049】そして、曲線A0−A3から曲線B0−B
3に変化する途中の中間曲線をF(t)(ただし、0≦
t≦1)とすると、 F(t)=(1−t)・F0+(1−t)・t・F
1+(1−t)・t・F2+t・F3 として記述することができる。 【0050】ここで、中間曲線F(t)により記述され
る記述パラメータF0,F1,F2,F3を一般的に記
述すると、 F0=(1−u)・A0+u・B0 F1=(1−u)・A1+u・B1 F2=(1−u)・A2+u・B2 F3=(1−u)・A3+u・B3 と表すことができる(ただし、0≦u≦1)。 【0051】この式のuに、方向変形の場合には前述
したvの値(パラメータ座標におけるv軸方向の座標
値)を用い、方向変形の場合には前述したuの値(パ
ラメータ座標におけるu軸方向の座標値)を用いて、そ
れぞれの変形パラメータ座標16における中間曲線Fお
よび変形パラメータ座標値P’(u,v)(=(Ljx
(ui),Ljy(ui)))を算出することができ
る。これにより、各ピクセルのパラメータ座標値を変形
パラメータ座標における変形パラメータ座標値に変換し
て各ピクセルを実座標15上に整数のフロートメッシュ
座標として展開できることになる。 【0052】つぎに、画像変形描画単位設定について図
6から図10により説明する。 【0053】図6は列分割を説明する模式図であり、図
7は行分割を説明する模式図であり、図8はブロックを
説明する模式図であり、図9はバンドの設定を説明する
説明図であり、図10はブロックの設定を説明する説明
図であり、図11はブロックを説明する説明図である。 【0054】前記画像変形描画単位設定は、変形外形枠
12の実座標15上に整数のフロートメッシュ座標とし
て展開された各ピクセルを、図6に示すように、一旦バ
ンド処理と称するバンドに列分割し、その後各バンドを
図7に示すように行分割することにより、変形外形枠1
2(実座標のフロートメッシュ座標16)内の領域を、
図8に示すように、所望の4点のピクセルP(図示せ
ず)にて形成される変形処理最小単位17(ブロック)
に分割することによりなされる。 【0055】前記バンドの設定は、図9に示すように、
例えば、P00,P01なる開始点が既に設定されてい
る時、P10,P11の設定は、fcurve上のピク
セル数(flpxl)およびgcurve上のピクセル
数(glpxl)の両方が、所定のしきい値以上になる
まで処理バンド幅を徐々に拡張することにより行われ
る。この具体的なしきい値の値は、画像品質と処理速度
のかねあいから決定すればよいが、例えば、3ピクセル
程度とするとよい。なお、バンドを初めて設定する場合
に、開始点としてのP00およびP01の位置は、それ
ぞれがaline上に位置することになる。 【0056】前記ブロックの設定は、図10に示すよう
に、例えば、B00,B10なる開始点が既に設定され
ている時、B01,B11の設定は、直線方向(B00
−B01)のピクセル数(cpxl)および直線方向
(B10−B11)のピクセル数(blpxl)の両方
が、所定のしきい値以上になるまで処理バンド幅を広げ
てゆくことにより行われる。この具体的なしきい値の値
は、画像品質と処理速度のかねあいから決定すればよい
が、例えば、3ピクセル程度とするとよい。なお、ブロ
ックを初めて設定する場合に、開始点としてのB00お
よびB10の位置は、それぞれがfcurve上に位置
することになる。 【0057】以上のようにして、バンドおよびブロック
が設定され、図11に示すように、4点のピクセルによ
り形成されたB00−B01−B11−B10からなる
四角形が変形処理最小単位17(ブロック)とされる。 【0058】すなわち、図8に示すように、第i,jブ
ロックは、変形曲線jおよびj+i、直線iおよびi+
1にて構成されることとなる。 【0059】つぎに、原画像濃度値取得について説明す
る。 【0060】前記原画像濃度値取得は、前述した各ブロ
ックを塗りつぶす濃度値として、本実施例においては、
各ブロックの塗りつぶしの処理速度を勘案して図11に
示す4点のピクセル(B00,B01,B11,B1
0)の内の左方上方のピクセル(B00)に対応する原
画の画像濃度値(濃度値:G00)を取得することによ
り行われる。この(B00)に対応する原画濃度値(G
00)は当該ブロックの変形前に予めメモリ内に記憶さ
せられており、確実に原画濃度値(G00)が収得され
るようになっている。つまり、変形処理最小単位17
(ブロック:B00−B01−B11−B10)を決定
した時点で対応する原画の位置座標は一意に決定され、
ピクセル(B00)に対応する原画の濃度値を容易に取
得することができる。具体的には、画像として横方向に
N個、縦方向にM個のピクセルが並んでいるとする。数
え方としては、横方向は0番目から(N−1)番目ま
で、縦方向は0番目から(M−1)番目までという数え
方をすると、横方向n個目、縦方向m個目のピクセルP
の座標値は(n−1,m−1)となる(図4のc参
照)。そして、原画の位置座標から原画の濃度値を取得
する場合には、画像濃度値はピクセル座標値に対応した
状態で、既に格納されている(一般的に、画像を取り込
んだ時点で、既にこうした対応がとれるようにようにな
っている)。濃淡256階調の画像データについて例と
して取り上げると、上記の位置座標(0,0)の濃度値
G(0,0)を、メモリのa番地に格納したとする。こ
こで、G(0,0)は位置座標(0,0)に対応した濃
度値であることを示している。位置座標(1,0)の濃
度値をa+1番地に格納していたとすれば、位置座標
(n,m)の濃度値G(n,m)は、Nm+n番地の濃
度値として取り出すことができる。更に、前記変形処理
最小単位17(ブロック:B00−B01−B11−B
10)としては、例えば、同一画像濃度値(またはカラ
ー画像値)で描画されるべき四角形を指定するようにす
る。 【0061】つぎに、画像描画について図12および図
13により説明する。 【0062】図12はブロックを囲む矩形の四角形を説
明する説明図であり、図13は変形外形枠の塗りつぶし
を説明する説明図である。 【0063】前記画像描画は、前述した各ブロック17
を対応する原画の濃度値をもって塗りつぶすとともに、
所望の出力装置に出力することにより行われる。 【0064】前記塗りつぶしは、図12に示すように、
ブロック17を形成する四角形(B00−B01−B1
1−B10)を塗りつぶすのではなく、この四角形(B
00−B01−B11−B10)を囲む実座標15上の
矩形の四角形(Q0−Q1−Q2−Q3)を塗りつぶす
ことにより行われる。ブロック17を矩形の四角形とし
て塗りつぶすのは、ブロック17を直接塗りつぶすため
に斜め線の処理を行うことになり、通常のパーソナルコ
ンピュータを用いた場合に、コンピュータの処理速度が
遅くなるのを防止するためであり、処理速度の非常に速
いコンピュータ(非常に高価で特殊な科学計算用のコン
ピュータ)を用いる場合には必ずしも必要ではない。 【0065】そして、この矩形の四角形は、その最小値
を(xmin,ymin)とし、最大値を(xmax,
ymax)とした場合に、Q0=(xmin,ymi
n),Q1=(xmin,ymax),Q2=(xma
x,ymax),Q3=(xmax,ymin)と表す
ことができ、座標の最大値/最小値を容易に算出するこ
とができる。 【0066】さらに、図13に示すように、矩形の四角
形による変形外形枠の塗りつぶしは、塗りつぶす部分が
オーバーラップするので、各矩形の四角形にて塗りつぶ
す場合に、オーバーラップ部分をオーバーライトさせる
ようにして変形外形枠内を塗りつぶすことにより、画像
描写の処理速度を高速とすることができる。 【0067】つぎに、このような画像データ編集方法の
アルゴリズム(処理構造)について図14および図15
に示すフローチャートならびに図16から図21により
さらに説明する。 【0068】図14および図15は画像データ編集方法
のアルゴリズムを説明するフローチャートであり、図1
4はフローチャートを2分割した一方を示し、図15は
フローチャートを2分割した他方を示し、図16は3次
ベジエ関数およびそのパラメータを示す模式図であり、
図17は3次ベジエ関数を説明する説明図であり、図1
8は曲線の距離の計算方法を説明する説明図であり、図
19は曲線の距離の計算方法の一例を説明する説明図で
あり、図20は曲線の距離の計算方法の他例を説明する
説明図であり、図21は直線状の3次ベジエ関数を説明
する説明図である。ここで、3次ベジエ関数の変形を図
16により簡単に説明する。3次ベジエ関数は図16に
示すように、2つの端点P0,P3および2つの曲線制
御点P2がある。この2つの曲線制御点P1,P2の位
置を変えることにより3次ベジエ関数の変形を行う。具
体的には、上記2点P1,P2の位置の変更を行うに
は、まずユーザーインターフェースレベルで、どちらか
の点の近傍でマウスをクリックするなどの操作を行い、
近傍判定によりその点の変更モードに入る。マウスを押
下したまま、マウスを動かすことでその位置を変更して
から、マウスの押下を解除するとその位置が新たな変更
位置として登録され、点の位置変更モードは解除され
て、新たな3次ベジエ曲線を発生することができるよう
になる。更に、基準外形枠の変形の例として、基準外形
枠の1つの直線部分を3次ベジエ関数に変換して変形操
作を行う場合を図16を用いて説明する。ベジエパラメ
ータをP0(P0x,P1y),P1(P1x,P1
y),P2(P2x,P2y),P3(P3x,P3
y)としたとき、当該曲線L(Lx,Ly)は0≦t≦
1なるtを使ってL=P0(1−t) 3 +P1t(1−
t) 2 +P2t 2 (1−t)+P3t 3 と書き表すことがで
きる。そして、図16に示す曲線L上に1列の画像要素
がならべて、この曲線を変化させることで対応する画素
の位置が変化することになる。実際の操作としては、以
下の変形を行う際にのみ普段は必要としないP2および
P1の座標の表示を行い、マウス等でこのP1またはP
2の近傍(5画素程度)をクリックして操作点の指定を
行い、マウスを移動させることでその位置を変化させ
る。変化させた点が確定した後に再度クリックすると、
位置が確定されて 再度この座標に従ったベジエ曲線が発
生し、この曲線の連続した点に該当する画素(ピクセ
ル)のデータを配置することで終了する。 【0069】図14および図15に示すように、画像デ
ータ編集方法の処理構造が開始されると、まず、ステッ
プST20において最初に初期設定が行われ、つぎのス
テップST21に進行する。 【0070】ステップST20における初期設定は、以
下の8項目の内容を順に行なうことにより遂行される。 【0071】(1)原画のpxlcnt(変形方向ピク
セル数)およびbase(直線方向ピクセル数)の設定
(変形方向により設定)。つまり、縦方向変形および横
方向変形の選定を行う。これにより整数のメッシュ座標
からなる基準外形枠11に原画の画像のピクセルを収納
することができる。 【0072】2)変形対(fcurve,gcurv
e)の曲線パラメータ(3次ベジエパラメータ)の係数
値(中間曲線算出用)の算出。ここで係数値とは”形状
パラメータの演算係数”と称するものであり、図16に
示す3次ベジエ関数B(t)のパラメータをP0,P
1,P2,P3とした場合に、 B(t)=(−P0+3P1−3P2+P3)t+3
(P0−2P1+P2)t+3(−P0+P1)t+
P0 =M3t+M2t+M1t+M0 と表したときの、M3,M2,M1,M0を示す。つま
り、変形外形枠12の変形方向の線分が、この3次ベジ
エパラメータとして記述されることとなる。 【0073】(3)3次ベジエ曲線(fcurve)の
連続輪郭ピクセル数(fcpxl)の算出(図4のe,
図9)。ここで、連続輪郭ピクセル数(fcpxl)の
算出とは、曲線の距離を算出することである。 【0074】曲線の距離の計算について説明すると、一
般的に、プログラムにより曲線の距離を計算するには困
難が伴うが、3次のベジエ関数は、図17に示すよう
に、4つのパラメータP0,P1,P2,P3により決
定することができ、この関数B(t)は、媒介変数tを
用いて、 B(t)=(−P0+3P1−3P2+P3)t+3
(P0−2P1+P2)t+3(−P0+P1)t+
P0 と表すことができる。そして、tによる一次微分をB’
(t)として曲線距離DHは で表すことができる。 【0075】しかし、実際の計算をプログラムにて行う
には処理時間などの問題があるため、処理時間と計算の
複雑度を考慮して、図18に示すように、曲線を細かい
直線に分解し、その直線距離の総和を曲線距離として扱
うことが望ましい。 【0076】すなわち、曲線距離を算出するには、以下
に示す2つの方法から選択するとよい。 【0077】第1の曲線距離の算出方法は、図19に示
すように、曲線上の代表点を予め決めて折れ線を形成
し、その直線距離の総和に相当する数を分割点の数とす
るものである。この場合の精度を向上させるには、直線
にする度合(分割数)を増加すればよい。 【0078】第2の曲線距離の算出方法は、図20に示
すように、曲線の曲率に応じて分割点を形成し、その直
線距離の総和を曲線距離とするものである。 【0079】(4)3次ベジエ曲線(gcurve)の
連続輪郭ピクセル(gcpxl)数の算出((3)と同
様)。 【0080】(5)直線(aline)の連続輪郭ピク
セル数(alpxl)の算出(図4のe,図9)。ここ
で、連続輪郭ピクセル数(alpxl)の算出とは、直
線の距離を算出することである。 【0081】直線の距離の計算について説明すると、図
21に示すように、直線の開始点/終了点を各々P0
(P0x,P0y)、P1(P1x,P1y)とした場
合に、2点間の距離は、 で表すことができる。これは、プログラム的に容易に算
出することができる。 【0082】(6)直線(bline)の連続輪郭ピク
セル数(blpxl)の算出((5)と同様)。 【0083】(7)処理精度(丸め誤差リカバー値:X
ERR,YERR)設定。 【0084】処理精度の設定とは、前述した適宜な処理
精度設定部10により、基準外形枠11を形成する整数
のメッシュ座標13上に展開された各ピクセルを、変形
外形枠12を形成する整数のフロートメッシュ座標15
上に隙間なく連続させて展開するものである。 【0085】上記(2)から(7)をもって整数のフロ
ートメッシュ座標15(実座標)からなる変形外形枠1
2に、原画の画像のピクセルを展開することができる。 【0086】(8)ループ処理のための初期設定。つま
り、変形外形枠12を列分割するためのバンド処理にお
ける第1バンドの左側端点(図9に示すP00(左
上),P01(左下))の座標値をセットする。 【0087】つぎに、ステップST21において、すべ
ての処理を終了したか否か(処理終了?)を判断し、Y
ES(処理終了)の場合には処理を終了し、NO(処理
が終了していない)の場合にはつぎのステップST22
に進行する。 【0088】つぎに、ステップST22において、処理
バンド初期設定を行いつぎのステップST23に進行す
る。 【0089】ステップST22における処理バンド初期
設定は、以下の3項目の内容を順に行なうことにより遂
行される。 【0090】(1)処理バンドの右側端点(図9に示す
P10(右上),P11(右下))の座標値をセットす
る。 【0091】この処理バンドの右側端点をセットするに
は、 (a)変形方向上下の処理単位を終了し、tパラメータ
値(t0)を算出 (b)3次ベジエ曲線上の対応する座標値(P10,P
11)を求める ことにより行われる。具体的には、既知のピクセル番号
P00(図9の左上点P00のfcurve上の座標
値)から処理バンド幅(画素間距離を1以上とする)
応じて右側端点のピクセル番号P10(図9の右上点P
00のfcurve上の座標値)を求めるとともに、ピ
クセル番号P00からP10までの曲線距離を図17か
ら図20に示す方法に従って求め、前記の図4のeおよ
び図9に示す連続輪郭ピクセル数で割ることでよりt0
を求める。続いて、図9のA’−B’3次ベジエ曲線関
数のtパラメータをt=t0として前記3次ベジエ関数
B(t)に代入してP10の座標値を求める。同様にし
て、図9のD’−C’3次ベジエ曲線関数のtパラメー
タをt=t0としてP11の座標値を求める。 【0092】(2)変形方向の直線(P00−P10)
の連続輪郭ピクセル数(flpxl)の算出(図9)。
ここで連続輪郭ピクセル数(flpxl)の算出とは、
直線の距離を算出することである。直線の距離の算出方
法については、前述したものと同様である。 【0093】(3)変形方向の直線(P01−P11)
の連続輪郭ピクセル数(glpxl)の算出(図9)。
ここで連続輪郭ピクセル数(glpxl)の算出とは、
直線の距離を算出することである。 【0094】つぎに、ステップST23において、fl
pxlの距離がglpxlの距離より長いか否か(fl
pxl>glpxl?)を判断し、NO(flpxlの
距離がglpxlの距離より短い)の場合には、つぎの
ステップST24aに進行し、ステップST24aにお
いて、長い方のglpxlの距離が予め設定された所定
のしきい値より小さいか否か(予め設定したバンドの幅
より小さくて処理不適合か否か)を判断し、NO(しき
い値より大きい)の場合にはつぎのステップST26
(図15)に進行し、ステップST24aの判断がYE
S(しきい値より小さい)の場合には、つぎのステップ
ST25aに進行し、ステップST25aにおいて最終
処理単位であり、かつ1点ではないか否かを判断し、Y
ES(最終処理単位)の場合にはつぎのステップST2
6(図15)に進行し、NO(最終処理単位でない)の
場合にはステップST21に戻り、ステップST24a
の判断がNOになるか、ステップST25aの判断がY
ESとなるまで繰り返す。 【0095】前記ステップST23の判断がYES(f
lpxlの距離がglpxlの距離より大きい)の場合
には、つぎのステップST24bに進行し、ステップS
T24bにおいて、長い方のflpxlの距離が予め設
定された所定のしきい値より小さいか否か(予め設定し
たバンドの幅より小さくて処理不適合か否か)を判断
し、NO(しきい値より大きい)の場合にはつぎのステ
ップST26(図15)に進行し、ステップST24b
の判断がYES(しきい値より小さい)の場合には、つ
ぎのステップST25bに進行し、ステップST25b
において最終処理単位であり、かつ1点ではないか否か
を判断し、YES(最終処理単位)の場合にはつぎのス
テップST26に進行し、NO(最終処理単位でない)
の場合にはステップST21に戻り、ステップST24
bの判断がNOになるか、ステップST25bの判断が
YESとなるまで繰り返す。 【0096】すなわち、ステップST23からステップ
ST25(25a,25b)により、flpxlの距離
およびglpxlの距離の両者がしきい値より大きくな
るまで処理を繰り返して処理単位となるバンドの幅を決
定している。 【0097】つぎに、ステップST26において、処理
(対称バンド内の全ブロック処理)を終了したか否か
(処理終了?)を判断し、YES(処理終了)の場合に
は後述するステップST32に進行し、NO(処理が終
了していない)の場合にはつぎのステップST27に進
行する。 【0098】つぎに、ステップST27において処理ブ
ロック初期設定を行いつぎのステップST28に進行す
る。 【0099】ステップST27における処理ブロック初
期設定は、以下の4項目の内容を順に行なうことにより
遂行される。 【0100】(1)ループ処理のための初期設定。つま
り、変形外形枠12を列分割したバンドをさらに行分割
するブロック処理における第1ブロックの上部端点(図
10に示すB00(左上),B10(右上))の座標値
をセットする。 【0101】(2)変形処理最小単位17の端点座標値
(実数値:B00,B01,B11,B10)の設定。
つまり、変形外形枠12(フロートメッシュ座標15)
内の領域を所望の4点のピクセル(B00,B01,B
11,B10)により形成される四角形(B00−B0
1−B11−B10)からなる変形処理最小単位17
(ブロック)とする4点のピクセルの座標値を設定す
る。 【0102】(3)直線方向(B00−B01)の直線
連続輪郭ピクセル数(cpxl)の算出(図10)。こ
こで連続輪郭ピクセル数(cpxl)の算出とは、直線
の距離を算出することである。直線の距離の算出方法に
ついては、前述したものと同様である。 【0103】(4)直線方向(B10−B11)の直線
連続輪郭ピクセル数(dpxl)の算出(図10)。こ
こで連続輪郭ピクセル数(dpxl)の算出とは、直線
の距離を算出することである。直線の距離の算出方法に
ついては、前述したものと同様である。 【0104】つぎに、ステップST28において、cp
xlの距離がdpxlの距離より長いか否か(cpxl
>dpxl?)を判断し、NO(cpxlの距離がdp
xlの距離より短い)の場合には、つぎのステップST
29aに進行し、ステップST29aにおいて、長い方
のdpxlの距離が予め設定された所定のしきい値より
小さいか否か(予め設定したブロック17の幅より小さ
くて処理不適合か否か)を判断し、NO(しきい値より
大きい)の場合にはつぎのステップST31に進行し、
ステップST29aの判断がYES(しきい値より小さ
い)の場合には、つぎのステップST30aに進行し、
ステップST30aにおいて最終処理単位であり、かつ
1点ではないか否かを判断し、YES(最終処理単位)
の場合にはつぎのステップST31に進行し、NO(最
終処理単位でない)の場合にはステップST26に戻
り、ステップST29aの判断がNOになるか、ステッ
プST30aの判断がYESとなるまで繰り返す。 【0105】前記ステップST28の判断がYES(c
pxlの距離がdpxlの距離より大きい)の場合に
は、つぎのステップST29bに進行し、ステップST
29bにおいて、長い方のcpxlの距離が予め設定さ
れた所定のしきい値より小さいか否か(予め設定したブ
ロック17の幅より小さくて処理不適合か否か)を判断
し、NO(しきい値より大きい)の場合にはつぎのステ
ップST31に進行し、ステップST29bの判断がY
ES(しきい値より小さい)の場合には、つぎのステッ
プST30bに進行し、ステップST30bにおいて最
終処理単位であり、かつ1点ではないか否かを判断し、
YES(最終処理単位)の場合にはつぎのステップST
31に進行し、NO(最終処理単位でない)の場合には
ステップST26に戻り、ステップST29bの判断が
NOになるか、ステップST30bの判断がYESとな
るまで繰り返す。 【0106】すなわち、ステップST28からステップ
ST30(30a,30b)により、cpxlの距離お
よびdpxlの距離の両者がしきい値より大きくなるま
で処理を繰り返して変形処理最小単位17(ブロック)
の幅(大きさ)を決定している。 【0107】つぎに、ステップST31において、描画
/印刷出力処理を行いつぎのステップST32に進行す
る。 【0108】ステップST31における描画/印刷出力
処理は、以下の5項目の内容を順に行なうことにより遂
行される。 【0109】(1)画像濃度値の取得。つまり、変形処
理最小単位17(ブロック)を形成する4点のピクセル
(B00,B01,B11,B10)の内の左方上方の
ピクセル(B00)に対応する原画の濃度値(画像濃度
値:G00)をブロック全体の濃度値とする。 【0110】(2)変形処理最小単位17を囲む矩形
(fmax,fmin)の算出。ここで、変形処理最小
単位17を囲む矩形(fmax,fmin)の算出と
は、ブロック17を形成する四角形(B00−B01−
B11−B10)を囲む矩形の四角形を形成するもので
ある。 【0111】(3)丸め誤差リカバー値を加えて塗りつ
ぶし整数矩形領域を決定。これは、ブロック17を形成
する四角形(B00−B01−B11−B10)を囲む
矩形の四角形の4つの端点を、変形外形枠12を形成す
る整数のフロートメッシュ座標15(実座標)上の座標
に展開し、図12に示すように、四角形(B00−B0
1−B11−B10)を囲む矩形の四角形(Q0−Q1
−Q2−Q3)を形成して整数のフロートメッシュ座標
15上に隙間なく連続させて展開するものである。 【0112】(4)整数矩形領域を濃度値G00で塗り
つぶす。これは、変形外形枠12を形成する整数のフロ
ートメッシュ座標15(実座標)上の座標に展開した四
角形(B00−B01−B11−B10)を囲む矩形の
四角形(Q0−Q1−Q2−Q3)内を原画の濃度値
(画像濃度値:G00)にて塗りつぶすものである。 【0113】(5)上下座標値の更新(B00<−B0
1,B10<−B11)。これは、つぎのブロック17
の処理を行うために、塗りつぶしを施したブロック17
の下部端点B01およびB11をつぎに処理するブロッ
ク17の上部端点B00およびB10に置き換えるもの
である。 【0114】つぎに、ステップST32において、変形
方向上部の座標値更新(P00<−P10,P01<−
P11)を行ないステップST21へ戻りすべての処理
を終了するまでステップST21からステップST32
を繰り返すようにされている。 【0115】ステップST32における変形方向上部の
座標値更新(P00<−P10,P01<−P11)
は、つぎのバンドの処理を行うために、塗りつぶしを施
したバンドの右側端点P10およびP11をつぎに処理
するバンドの左側端点P00およびP01に置き換える
ものである。 【0116】以上のようにして、変形外形枠12上の各
ピクセルに、基準外形枠11上における各ピクセルの相
互の位置関係を容易に反映させることができるため、
準外形枠11に対する原画像データの相対位置関係を保
持するようにして、原画像データを所望の形状に変形さ
せることができるので、写真などの画素により形成され
る原画像データを円形形状、楕円形状、扇形形状、四角
形状、短冊形状、円筒形状、アーチ形状等に自在に変形
可能であるとともに、変形後の画像の品質を優れたもの
とすることができる。 【0117】また、基準外形枠11の変形形態である変
形外形枠12の形状は、図22に示すように、台形、円
形、円筒形またはアーチ形、扇形などをデフォルト変形
形状とし、このデフォルト変形形状と、台形を四角形変
形したり、円形を楕円変形したり、円筒形またはアーチ
形をアーチの深さ変更したり、扇形をコントロール・ポ
イント操作による任意変形するなどしてデフォルト変形
形状を修正した修正変形形状とを用いるとよい。 【0118】また、画像データ編集としてカラー写真の
変形例を図23に示す。 【0119】また、本発明に用いる原画としては、前述
した画像データとして深さの画像情報(濃度値)を有す
る点(画素:ピクセル)の集合により構成されている階
調を有するモノクロ写真あるいはカラー写真ばかりでな
く、文字や図形などの2値化可能な原画像の画像データ
(ベクトルデータあるいはドットデータ)を用いること
ができる。すなわち、2値のイメージ画像から濃淡/カ
ラー画像までの極めて広範囲の原画の画像に対応させる
ことができる。この2値のイメージ画像の変形例を図2
4に示す。 【0120】なお、本発明は、前記実施例に限定される
ものではなく、必要に応じて変更することができる。 【0121】 【発明の効果】以上説明したように本発明の画像データ
集方法によれば、基準外形枠を所望の形状に変形させ
ることにより、基準外形枠に対する原画像データの相対
位置関係を保持させた状態で、原画像データを変形させ
ることができるので、2値のイメージ画像から濃淡/カ
ラー画像からなる原画像データを円形形状、楕円形状、
扇形形状、四角形状、短冊形状、円筒形状、アーチ形状
等に自在に変形可能であるとともに、変形後の画像の品
質を優れたものとすることができるという極めて優れた
効果を奏する。
DETAILED DESCRIPTION OF THE INVENTION [0001] BACKGROUND OF THE INVENTION 1. Field of the Invention
Image editing such as copying machineGatheringLaw, especially for gray scale models.
Image data of the original image, such as a black and white photo or color photo
Image suitable for reading data and deforming it into a predetermined shape
EditionGatheringAbout the law. [0002] 2. Description of the Related Art Generally, the shape of an original image such as a character or a figure is changed.
Read and use this as original image data on a computer, etc.
Capture, transform this original image data into the desired shape,
Draw on an output device such as a CRT, plotter, etc.
Image data editing, such as recording on storage media, is
Has been done. [0003] Such conventional image data editing is performed.
In this case, a substantially rectangular original image (not shown) is shown in FIG.
A projective deformation for deforming into such a shape has been transferred. [0004] However, as described above,
In conventional image data editing using projective transformation,
As the image after deformation gradually increases in the deformation direction,
A large space is formed on the tip side in the deformation direction, and the image after deformation
There is a problem that the quality of the image is inferior. Also like this
To edit the original image data using
However, there is a problem that it cannot be transformed into a curved shape.
Was. In order to deal with such a problem, the present invention
The applicant is required to use the image data described in Japanese Patent Application No. 4-264858.
A data editing device and method were proposed. [0006] However, Japanese Patent Application No. 4-264858.
In the image data editing method described in
Image data (vector data) of the original image that can be binarized
(1) is intended to be transformed into a curved shape. [0007] Therefore, a depth image is further provided as image data.
A set of points (pixels) having image information (density values)
Or a black-and-white photo with a gradation composed of
Transforms color photographs into curved shapes
I wanted something that could be done. [0008] The present invention has been made in view of these points.
Is a monochrome or color photograph with gradation
Image editing that can freely deform the shape of the original image such asGathering
The purpose is to provide the law. [0009] The above-mentioned object is achieved.
The image data editing of the present invention according to claim 1The method is
Original image data as image information of the original image
A set of pixels in units that can be processed by
Xel is an integer message whose coordinate axis is a substantially rectangular reference outline frame.
This coordinate is stored in the reference outer frame as
The coordinate value of each pixel stored in the frame is determined by
Pixel at the position farthest away from the origin of the reference axis for each coordinate axis
Are converted to parameter coordinate values, where each coordinate value is 1.
The maximum value of each coordinate axis on the mesh coordinates
It is expanded to a substantially rectangular parameter coordinate set to 1 and out of the standard
The desired shape can be described by at least a function.
The shape is changed to a shape frame, and this deformed shape frame is used as a coordinate axis.
Coordinate, and this real coordinate is calculated from the origin of the coordinate axis of the real coordinate.
The coordinate value of the most distant position is set to 1 for each coordinate axis.
And the deformation parameter coordinates
The parameter coordinate values are
Convert each pixel to the actual
If you expand it as an integer float mesh coordinate on the benchmark
In addition, the area in the real coordinates is defined as a plurality of minimum units of the deformation processing.
And divide it into blocks.
Original image of one of the pixels located in the
And obtains an image density value of
For each rectangle on the real coordinates surrounding the lock,
It is characterized by filling with the image density value of the image
You. [0010] [0011] The image data editing of the present invention having the above configuration
According to the method, Storing the original image in a predetermined reference outer frame,
Determining the relative position of the original image to the reference outline
it can. Then, the reference outer frame is moved outside the desired shape.
When deformed into a shape frame, the original image is
Maintains the same positional relationship as the relative position to the reference outline frame.
With the original image deformed in the deformed outline frame with
The density value of the original image in the deformed outline frame.
it can. [0012] FIG. 1 to FIG. 24 show an embodiment of the present invention.
Will be described. This embodiment is directed to an image data editing system according to the present invention.Collection
OneMethod is used to transform a photo manuscript (photo transformation)
FIG. 1 shows a configuration of a main part of the image data editing apparatus.
FIG. As shown in FIG. 1, the image data of this embodiment
The editing device 1 includes an original image data reading unit 2 and a parameter
Data coordinate forming means 3 and deformed outer frame shape reading means 4
And deformation parameter coordinate forming means 5 and real coordinate calculating means
6, an image transformation / drawing unit setting means 7, and an original image density value
It is formed by the obtaining means 8 and the image drawing means 9. Next, the configuration of each part will be further described.
The original image data reading means 2 has a rectangular shape, for example.
Original pictures such as photosBarrel original imageImage information (original image data
Pixel) and pixel attributes (density values)
Scanner, memory, C to store in appropriate memory, etc.
It is formed from PU or the like (not shown).Therefore,
The original image is read by the original image data reading means 2 such as a scanner.
When scanning, each dot (image) of the read original image data is
Element) is coordinate data on rectangular coordinates, as is conventionally known.
To be stored in the memory of the original image data reading means 2.
And The parameter coordinate forming means 3 comprises:
The original read by the original image data reading means 2
Image data pixels are processed by a computer (not shown)
A collection of possible units of pixels, and each pixel
Integer mesh coordinates with the reference outline of the rectangle as the coordinate axis and
And store it in an appropriate memory, etc.
Developed into parameter coordinates with the large value as 1, and appropriate memory
Formed from memory, CPU, etc. (not shown) to be stored in etc.
Have been. That is, the parameter coordinate forming means 3
Original image data read by the image data reading means 2
Pixel of data that can be processed by computer
And these pixels are defined as a substantially rectangular reference outline frame.
The reference outer shape as an integer mesh coordinate with
The position of each pixel stored in this frame
The standard value is calculated for each coordinate axis from the origin of the coordinate axes of the reference outline frame.
The coordinate values of pixels at positions separated from each other are set to 1
Each coordinate on the mesh coordinates is converted to parameter coordinate values.
A roughly rectangular parameter with the maximum value of the coordinate axes as 1
It expands to coordinates. The computer
It is conventionally known that the unit pixel can be processed by
For example, the computer is independent on the display
Is the smallest unit that can be controlled by 8 bit units
In this case, X and X on the rectangular coordinates of the original image data are
Eight pixels (dots) in the Y-axis direction are defined as one pixel.
You. Of course, the computer is independent on the display
If the minimum unit that can be controlled by
Indicates that one bit of the read original image data is one pixel
Becomes Therefore, in the parameter coordinates, the coordinates
The coordinate value furthest from the origin of the axis is 1. Further explanation
Then, the “unit that can be processed by computer” is CC
Input data from a D-scanner or digital cameraU
WhatOf the density information and color information corresponding to each point of the image.
That means.Specifically, the image element stored in the memory
(Pixel) position data and its position
Color information (or shading information) data.example
For example, when expressing in black and white with 256 levels,
8-bit data corresponding to each point of the image is required.
16.7 million colors (167
7215 colors) corresponds to each point of the image
R: 8 bits, G: 8 bits, B: 8 bits
Site data is required. And the pixel is this
This means data corresponding to each point.For example,
When represented by 256, (x,
y) The coordinate data is processed by an 8-bit computer.
Can be treated as possible data. Also, this position
Color component data corresponding to coordinates is handled by computer
Can be handled as 8-bit x3 data
Wear. The deformed outer frame shape reading means 4
Is described by at least a function, such as a cubic Bezier function.
A reference outer shape frame transformed into a desired shape that can be described
Image data (shape data) of all deformed outline frames
The element is read by a scanner (not shown) or given in advance.
By selecting from a plurality of obtained desired deformed outline frames
Suitable memory etc.MemorizeScanner, memory, CP
U and the like (not shown). The deformation parameter coordinate forming means 5
Is read by the deformed outer frame shape reading means 4.
The pixels of the shape data (contour)Compu
DataProcessable units of pixelsAggregation ofToshiko
Is defined as a coordinate axis.
After storing the actual coordinates in a suitable memory or the like,
Expand to deformation parameter coordinates with the maximum value of the real coordinate axis set to 1
Memory, CPU, etc., which are stored in an appropriate memory, etc.
(Not shown).That is, the deformation parameters
The coordinate forming means 5 transforms the reference outer frame into a deformed outer frame.
Then, use this deformed outer frame as the actual coordinates
After storing the actual coordinates in the appropriate memory, etc.
Coordinates of the position farthest away from the origin of each coordinate axis for each coordinate axis
As appropriate, as the deformation parameter coordinates each having a value of 1,
Memory, CPU, etc. (not shown) to be stored in a simple memory, etc.
Is formed from. Further, the real coordinate calculating means 6,
Xel parameter coordinate value in transformation parameter coordinate
After converting to the transformation parameter coordinate valuesDesired processing
Each pixel through the processing accuracy setting unit 10
Develop on the bench as integer float mesh coordinates, and
Memory, CPU, etc. (not shown) to be stored in a simple memory, etc.
Is formed from.As is well known, a computer
In the operation using
A "floating point number" that can move several points
There is And "float mesh coordinates"
Coordinate representing the value on the benchmark in this "floating point number".
The coordinates with the reference outline frame as the coordinate axis
Mesh coordinates "
Expressed as "integer float mesh coordinates". In addition,
Since it is a number, the value after the decimal point is 0. The image transformation / drawing unit setting means 7
Was developed on the float mesh coordinates of the real coordinates
Considering the image quality and processing speed,
Column processing, and then divide each column into rows.
By the deformation outline frame (float mesh seat of real coordinates)
The area within the mark is formed by the desired four pixels.
Divided into appropriate minimum units (blocks)
From memory, CPU, etc. (not shown)
Is formed. The original image density value acquiring means 8 is provided
4 pixels forming each blockOne of
Pixel originalDensity value (integer mesh of the reference outline frame)
Density values of four pixels on the menu coordinates: in this embodiment
Is the upper left one of the four pixels on the mesh coordinates
To store the density value of the pixel in a suitable memory or the like.
It is formed from a memory, a CPU and the like (not shown). The image drawing means 9 comprises:The actual coordinates
Each rectangle on the real coordinates surrounding the block
The image density value of the acquired original image, that is, the image density value
Density value for each block acquired by acquisition means 8Based on
To form the deformed image data
The transformed image data on a CRT and plotter.
Memory to output to an appropriate output device such as
(Not shown). Note that the processing accuracy setting unit 10 is provided as needed.
May be attached to each means in the first place.
The configuration is not limited to the example. In addition, each memo
And all CPUs etc. should be provided collectively in the control unit etc.
Can also. Next, in the present embodiment having the above-described configuration,
Creation of image data editing method using image data editing device 1
The use will be described. An outline of the image data editing method according to the present embodiment will be described.
If you explain it,Of the original imageImage information
Pixels and pixel attributes (density) as (original image data)
Value) can be processed by a computer (not shown).
A cell, and its pixels are aligned with the reference outline frame as the coordinate axis.
Stored in the reference outer frame as mesh coordinates of
Parameter coordinates of the quasi-outer frame with the maximum value of its coordinate axis as 1
And expand the reference outline to a function.
Deformed into a desired shape that can be described by d-function
Frame, and the actual coordinates using the deformed outer frame as a coordinate axis.
To the transformation parameter coordinates with the maximum value of the real coordinate axes
The pixel on the parameter coordinates is transformed
Data on the coordinates of the
Unfolded on real coordinates as integer float mesh coordinates
And the area within the deformed outline (actual coordinates)
Divide into blocks as the minimum unit for deformation processing, and
Mark on the reference outline frame equal to the relative position of each block.
To fill with cell density value (image density value)
It is designed to transform original pictures such as photographs.
That is, original image data as image information of the original image is copied.
A set of pixels in units that can be processed by the computer,
Using these pixels as the coordinate axes of the substantially rectangular reference outline frame
It is stored in the reference outer frame as integer mesh coordinates, and
The coordinate value of each pixel stored in the quasi
The pixel at the position furthest away from the coordinate axis origin for each coordinate axis
Are converted to parameter coordinate values with each coordinate value of 1
Each pixel on the mesh coordinates to 1
To the parameter coordinates of a substantially rectangular
A deformed contour of a desired shape that can be described by at least a function
To the actual coordinates with the deformed outer frame as the coordinate axis.
Then, the actual coordinates are moved from the origin of the coordinate axes of the actual coordinates to the coordinate axes.
Deformation where the coordinate value of the most distant position is 1 for each
Parameter coordinates, then the parameters for each pixel
Deformation parameter coordinates in transformation parameter coordinates
Converts each pixel to an integer value on the real coordinates
It is developed as tomesh coordinates,
Divide the area into multiple blocks as the minimum unit for deformation processing
And for each block the pixels located within that block
The image density value of the original image of one of the pixels is obtained and
The area in the coordinates is divided into rectangles on the actual coordinates surrounding the block,
With the image density value of the acquired original image By filling
In addition, the original image such as a photograph is deformed. I
Therefore,The reference outline frame containing the original image data is
Deform into a deformed outline frame of a desired shape that can be described by a number
Thus, the original image data is converted. FIG. 2 shows such an image data editing method.
This will be described with reference to the flowchart shown. First, in step ST10, a photograph
Pixels and pixel attributes (density) that are the image information of the original image
Appropriate original image data reading means such as a scanner
2 and read with the desired resolution.
The process proceeds to step ST11. Next, in step ST11, the original image
Of the image information by the appropriate parameter coordinate forming means 3
Pixels of a unit that can be processed by the image data editing device 1
The pixel from the integer mesh coordinates.
After storing in the reference outline frame,
Data coordinates, and proceeds to the next step ST12.
That is, original image data as image information of the original image is copied.
A set of pixels in units that can be processed by the computer,
Using these pixels as the coordinate axes of the substantially rectangular reference outline frame
It is stored in the reference outer frame as integer mesh coordinates, and
The coordinate value of each pixel stored in the quasi
The pixel at the position furthest away from the coordinate axis origin for each coordinate axis
Are converted to parameter coordinate values with each coordinate value of 1
Each pixel on the mesh coordinates to 1
To the parameter coordinates of a substantially rectangular This
Store the original image in the specified reference outline frame, and
The position relative to the form can be determined. Next, in step ST12,
Read the shape of the deformed outer frame as appropriate.
Read by the take-out means 4 and proceed to the next step ST13.
proceed. Next, in step ST13, the outside of the deformation
The transformation parameter coordinates for the form
Formed by the data coordinate forming means 5 and the next step ST14
Proceed to.That is, the reference outer frame is defined as at least a function
Into a desired shape that can be described by
After using the deformed outer frame as the actual coordinates as coordinate axes,
The actual coordinates are calculated from the origin of the coordinate axes of the actual coordinates for each coordinate axis.
The coordinate values of the separated positions are each set to 1. Next, in step ST14, an appropriate
Pixels on the parameter coordinates are calculated by the actual coordinate calculating means 6.
The transformation parameters on the transformation parameter coordinates, and
Float mesh of pixels converted on data coordinates
The coordinates are expanded to real coordinates (deformed outline frame), and the next
Proceed to step ST15.That is, the parameter of each pixel
Deformation parameter in transformation parameter coordinates
And convert each pixel to an integer coordinate on real coordinates.
Develop as rotomesh coordinates. Next, in step ST15, the actual coordinates
(Float mesh coordinates)
Minimal deformation processing by appropriate image deformation drawing unit setting means 7
Divide into units (blocks) and proceed to the next step ST16.
Run.In other words, the area within the actual coordinates is
Divide into blocks as small units. Next, in step ST16, an appropriate
The original image density value acquisition means 8 assigns pixels to each block.
The density value of the pixel on the corresponding reference outline (the original density
Value) and proceeds to the next step ST17.sand
In other words, for each block, the pixels located in that block
The original image density value of one of the pixels
You. Details will be described later. Next, in step ST17, the outside of the deformation
Each block in the frame (actual coordinates) is converted to an appropriate image drawing means 9
To fill with the original density value and the desired output
A series of processes is terminated by outputting the data to the device.Details
Details will be described later. The above-described image data editing method
The main part will be specifically described in detail. First, out of the standard of the image data editing of this embodiment.
About the combination of line segments when the form is deformed
h. FIG. 3 shows a combination of line segments when the reference outer frame is deformed.
FIG. 4 is an explanatory diagram for explaining an example, in which a indicates an example of an original image.
B indicates a reference outer frame, and c indicates a vertical change of the reference outer frame.
Shows the combination of line segments at the time of shaping, and d is the deformation after vertical deformation.
E indicates a vertically deformed image, f indicates
Shows the combination of line segments when the reference outer frame is deformed in the horizontal direction,
g indicates the deformed outline frame after the horizontal deformation, and h indicates the horizontal deformation.
The image shown is shown. The image information of the original picture (photograph) shown in FIG.
A point A, a point as shown in FIG.
A-B-C- of a rectangular shape composed of B, point C, and point D
A reference outer frame 11 made of D is formed. And Baek
Considering the direction of the torque, the reference outer frame 11 shown in FIG.
In the figure, upper and lower line segments AB: A (t) and line segments DC: B
Using the combination with (t), as shown in FIG.
By deforming the reference outer frame 11 in the vertical direction,
When forming and obtaining an image deformed in the vertical direction shown in FIG.
In the case shown in FIG.
Between the right line segment AD: A (t) and the line segment BC: B (t)
Using the combination, as shown in FIG.
A deformed outer frame 12 is formed by deforming the quasi-outer frame 11, and FIG.
Either of obtaining vertically deformed image shown in 3h
The original image is transformed using one of the combinations. Next, the source of deformation as image data editing
As an example, the vertical deformation is explained with reference to FIGS.
explain. FIG. 4 is an explanatory view for explaining vertical deformation.
And a represents a pixel stored in the reference outer frame,
b indicates a pixel on the reference outer frame, and c indicates a pixel on the reference outer frame.
Where d is the pixel on the parameter coordinates
Indicates the cell position, e indicates the deformation outline frame, and f indicates the deformation parameter.
Indicates the position of the pixel on the meter coordinates, g is the deformed outline frame
Shows the location of the transformed pixel above. As shown in FIG. 4A, a rectangular AB
The point A at the upper left of the reference outer frame 11 composed of -CD is defined as the origin.
And the line segment AB direction is defined as a coordinate axis x (x axis), and the x axis
Let XS be the maximum value of (the number of pixels = distance)
And the line segment A-D direction as a coordinate axis y (y-axis), and the y-axis
(The number of pixels = distance) is YS. Toes
The coordinate value of the point A forming the reference outer frame 11 is (0,
0), the coordinates of point B are (XS, 0), and the coordinates of point D are
(0, YS), and the x-axis direction of the pixel is xbase.
And the y-axis direction of the pixel is referred to as ybase.
The line segment in the deformation direction is pxlcnt, and the line segment in the straight line direction is
It is called base. And formed by the x-axis and the y-axis.
Mesh coordinates (x−
Pixels as image information of the original image
Will be delivered. Pixels (mesh) on this reference outline frame 11
(Coordinates) are shown in FIG. Here, as shown in FIG.
At the mesh coordinates (xy coordinates) 13 of the pixel P
The coordinate value obtained is P = (Px, Py). Further explanation
And a rectangular pixel constituting the image as shown in FIG.
The upper left corner is A, the upper right corner is B, the lower left corner is D, and the lower right corner is C
Then, the position of the pixel constituting the image is AB
Is the x-axis and A-D is the y-axis, in two-dimensional coordinates (x, y).
Can be represented. For example, taking point A as the origin,
The pixel coordinates are (0,0), are on the AB axis and
The coordinates of the third pixel from can be expressed as (2,0)
it can. This is the mesh coordinates. Coordinate values x and y are
It is a numerical value (see c in FIG. 4). In addition, "standard outer frame"
Is a rectangular shape in FIG.
Refers to the form ABCD. This rectangle is called
It is referred to as “quasi-outer frame”. And inside this frame (on the line of the frame
Pixel is also present)
The pixels that make up the image will be included. This (vs.
If the pixel data of the elephant image is within the rectangle
Is called “storage”.In other words, each pixel of the aggregate
The task of putting the file into the frame is the memory of the computer
Color information corresponding to the position coordinates of the image pixels
Or shading information). Next, as shown in FIG.
The maximum value XS of the x-axis at the coordinates (xy coordinates) 13 is 1
And the maximum value YS of the y-axis is set to 1
Is converted to the v axis, and is formed by the u axis and the v axis.
Is the parameter coordinate 14 (uv coordinate),
The coordinate value P of the pixel P at the xy coordinate 13 is P = (P
x, Py) is a parameter locus on the uv coordinates 14.
It can be represented by a standard value P = (u, v) (where 0 ≦
u ≦ 1, 0 ≦ v ≦ 1). That is,According to the coordinates of FIG.
The parameter coordinate values of each pixel indicated by
4 to the deformation parameter coordinates indicated by the d coordinate.
The transformation is performed to transform parameter coordinate values.
To explain further,The origin of the reference outer frame 11 shown in FIG.
The coordinate value (0,0) of the pixel located at the point A is
Point A which is the origin in the parameter coordinates 14 shown in 4d
Becomes the coordinate value (0, 0), and the reference shown in FIG.
The coordinates (XS, XS) of the pixel located at point B of the outer frame 11
0) is a point at the parameter coordinates 14 shown in FIG.
In FIG. 4B, the coordinate value becomes (1, 0).
The coordinates (X
(S, YS) corresponds to the parameter coordinates 14 shown in FIG.
At point C, the coordinate value (1, 1) is obtained.
Coordinates of the pixel located at point D of the reference outline 11 shown
(0, YS) corresponds to the parameter coordinates 14 shown in FIG.
At the point D in the coordinate value (0, 1). Note that A
Parameters of pixels located other than point, point B, point C and point D
The data coordinate value P = (u, v) is, as is known,
Each one of the x-axis and y-axis of mark 13 that is furthest away from the origin
It can be easily calculated by proportional calculation with these coordinate values as 1.
Can be. Next, the coordinates are expanded to the coordinates shown in FIG.Tapa
Each pixel based on the parameter coordinate values is shown in FIG.
FIG. 4 (g) is developed in order as shown in FIG.
By obtaining the Tomesh coordinates, each pixel is converted to the real coordinates
Expand to integer float mesh coordinates on axis
To That is, the rectangular reference outer frame 11 (A-B
-CD) and the line segment AB and the line segment D-
C is in the desired shape that can be described by a cubic Bezier function
A'-B'-C'-D 'shown in FIG.
In the same manner as above, the point A 'is defined as the origin.
And the direction of the line segment A'-B 'is defined as a coordinate axis x (x-axis),
The maximum value of the x-axis is set to XS ', and the line segment A'-D'
The direction is coordinate axis y (y-axis), and the maximum value of the y-axis is Y
After setting the actual coordinates 15 as S ',
When the maximum value XS 'of the x-axis is converted to a u-axis which is 1,
4 is converted to a v-axis in which the maximum value YS 'of the y-axis is 1.
F, the deformation formed by the u-axis and the v-axis
Parameter coordinates (uv coordinates) are assumed to be 16. Also, the standard
The deformation of the outer frame 11 into the deformed outer frame 12 is out of the standard.
Four line segments forming the form 11 (A-B-C-D)
Replacing with four line segments constituting the deformed outline frame 12
Execute by That is, the reference outer frame 11 (ABC
-D) is calculated by using the equation
It is read by the frame shape reading means 4 or given in advance.
Deformation from the shape data of multiple obtained desired deformation outline frames
For each of the equations of the four line segments that make up the outer frame 12,
Can be easily implemented by replacing them to be equal
It is self-evident. In addition, the deformation direction of the deformed outer frame 12
One of the line segments (upper or left) is described by F (t)
fcurve, the other (bottom or right) is described by G (t)
The linear direction of the deformed outer frame 12
One of the line segments (left or top) is `` aline '' and the other (right
Or below) is called a line (FIG. 4e). Here, the u axis of the parameter coordinates 14 and
It is assumed that the parameter coordinate value does not change even if the v axis changes.
Then, when the deformation parameter coordinate value of the pixel P is calculated,
As shown in FIG.
In the process of changing from A'-B 'to curve D'-C'
Of the curve that occurs, Represents the j-th line in the v-axis direction
A curve F (Lj0-Lj1) is calculated, and the calculated curve is calculated.
F is Lj (u)(= (Ljx (u), Lji (u)))
WhenWhen expressed, On the curve F, i-th in the u-axis direction
Parametersui determined by the point P '(Ljx (u
i), Lji (ui)) are the deformation parameter coordinate values of the point P
BecomesTherefore, each pixel on the deformed outline 12
P ′ is the mutual of each pixel P on the reference outline frame 11.
To the reference outer frame 11
Maintain the relative positional relationship of the original image data
In this way, the original image data can be transformed into the desired shape.
Can be done. Then, the coordinate values of the deformation parameters are
Convert as integer float mesh coordinates on target 15
Thereby, the deformation ends.That is, each picture of the original image
The relative positions of the xel to the reference outer frame 11 and
While maintaining the same positional relationship,
The transformation is completed by positioning each pixel of the original image.
You. ThisOf the integer as the real coordinates 15 after the transformation of
The mesh mesh coordinates are shown in FIG. Next, vertical conversion of the original image data and
The method of calculating the intermediate curve in the horizontal transformation will be described.
You. FIG. 5 is a diagram for explaining a method of calculating an intermediate curve.
FIG. As shown in FIG. 5, the curves A0-A3 are A (t) = (1-t)3A0 + (1-t)2・ T ・ A
1+ (1-t) · t2・ A2 + t3・ A3 Curve B0-B3 B (t) = (1-t)3・ B0 + (1-t)2・ T ・ B
1+ (1-t) · t2.B2 + t 3・ B3 It is assumed that Then, from the curves A0-A3 to B0-B
3 is represented by F (t) (where 0 ≦
t ≦ 1), F (t) = (1-t)3・ F0 + (1-t)2・ T ・ F
1+ (1-t) · t2・ F2 + t3・ F3 Can be described as Here, the intermediate curve F (t) is described.
Generally describe the description parameters F0, F1, F2, and F3.
To state: F0 = (1-u) · A0 + u · B0 F1 = (1-u) · A1 + u · B1 F2 = (1-u) · A2 + u · B2 F3 = (1-u) · A3 + u · B3 (Where 0 ≦ u ≦ 1). In this equation, u isVerticalIn case of directional deformation
Value of v (coordinates in the v-axis direction in parameter coordinates)
Value)sideIn the case of directional deformation, the value of u
Using the coordinate values in the u-axis direction in the parameter coordinates).
The intermediate curve F at each deformation parameter coordinate 16 and
And deformation parameter coordinate value P ′ (u, v) (= (Ljx
(Ui), Lji (ui))) can be calculated.
You. This transforms the parameter coordinates of each pixel
Convert to transformation parameter coordinate values in parameter coordinates
Float mesh of each pixel on real coordinates 15
It can be developed as coordinates. Next, FIG.
6 to FIG. FIG. 6 is a schematic diagram for explaining column division.
FIG. 7 is a schematic diagram illustrating line division, and FIG.
FIG. 9 is a schematic diagram for explaining, and FIG. 9 illustrates band setting.
FIG. 10 is an explanatory diagram, and FIG.
FIG. 11 is an explanatory diagram illustrating a block. The image deformation drawing unit setting includes a deformation outer frame.
Integer float mesh coordinates on 12 real coordinates 15
Each pixel that has been expanded is temporarily stored as shown in FIG.
Column processing, and then each band is divided into
By dividing the lines as shown in FIG.
2 (real coordinate float mesh coordinates 16)
As shown in FIG. 8, the desired four pixels P (shown in FIG.
)), The minimum unit 17 for deformation processing (block)
This is done by dividing into The setting of the band is as shown in FIG.
For example, the start points P00 and P01 have already been set.
Settings, P10 and P11 are set on the picurve
Number of cells (flpxl) and pixels on gcurve
Both numbers (glpxl) are above a predetermined threshold
Done by gradually expanding the processing bandwidth up to
You. This specific threshold value depends on image quality and processing speed.
Can be determined from the balance of
It is good to be about. When setting up a band for the first time
The positions of P00 and P01 as starting points are
Each will be located on aline. The setting of the blocks is as shown in FIG.
For example, the start points B00 and B10 are already set.
Is set, B01 and B11 are set in the linear direction (B00
-B01) pixel number (cpxl) and linear direction
Both (B10-B11) pixel count (blpxl)
Increases the processing bandwidth until the threshold is exceeded
It is done by going. The value of this specific threshold
Can be determined based on the balance between image quality and processing speed
However, for example, it may be set to about three pixels. In addition,
When setting the lock for the first time, B00 as the starting point
And B10 are located on fcurve
Will do. As described above, the band and the block
Is set, and as shown in FIG.
Consisting of B00-B01-B11-B10 formed
The square is defined as the minimum unit 17 (block) of the deformation processing. That is, as shown in FIG.
The lock has the deformation curves j and j + i, the straight lines i and i +
1. Next, the acquisition of the original image density value will be described.
You. The original image density value is obtained by
In the present embodiment, as a density value for filling
Considering the processing speed of filling each block,
The four pixels (B00, B01, B11, B1)
0) corresponding to the upper left pixel (B00)
By acquiring the image density value (density value: G00) of the image
Is performed. The original image density value (G
00) is stored in the memory before the block is deformed.
The original image density value (G00)
It has become so. That is, the minimum unit 17 of the deformation process
(Block: B00-B01-B11-B10) determined
At that point, the position coordinates of the corresponding original image are uniquely determined,
Easily obtain the density value of the original image corresponding to pixel (B00).
Can be obtained.Specifically, as an image
It is assumed that N pixels and M pixels are arranged vertically. number
From the 0th to (N-1) th in the horizontal direction,
In the vertical direction, counting from 0th to (M-1) th
, The n-th pixel P in the horizontal direction and the m-th pixel P
Is (n-1, m-1) (see c in FIG. 4).
See). Then, obtain the density value of the original image from the position coordinates of the original image
If so, the image density value corresponds to the pixel coordinate value.
State and already stored (generally,
At this point, such a response can already be taken.
ing). Examples of image data with 256 gradations
And take it up, the density value of the above position coordinates (0,0)
Assume that G (0,0) is stored at address a in the memory. This
Here, G (0,0) is the density corresponding to the position coordinates (0,0).
Indicates a degree value. Dark of position coordinates (1, 0)
If the degree value is stored at address a + 1, the position coordinates
The density value G (n, m) of (n, m) is the density of the address Nm + n.
Can be extracted as a degree value. Further, the deformation process
Minimum unit 17 (block: B00-B01-B11-B
10) is, for example, the same image density value (or color
-Image value) to specify the rectangle to be drawn
You. Next, FIG. 12 and FIG.
13 will be described. FIG. 12 illustrates a rectangular rectangle surrounding a block.
FIG. 13 is a drawing for explaining the deformation outline frame.
FIG. The image drawing is performed in each of the blocks 17 described above.
With the corresponding original image density values,
This is performed by outputting to a desired output device. The filling is performed as shown in FIG.
A square (B00-B01-B1) forming the block 17
1-B10), instead of painting this square (B
00-B01-B11-B10) on the real coordinates 15
Fill the rectangle (Q0-Q1-Q2-Q3)
This is done by: Block 17 is a rectangular rectangle
To paint the block 17 directly
The diagonal lines are processed at the same time.
When using a computer, the processing speed of the computer
This is to prevent the processing speed from becoming too slow.
Computer (a very expensive and specialized computer for scientific calculations)
However, it is not always necessary when using a computer. The rectangular quadrangle has its minimum value.
Is (xmin, ymin), and the maximum value is (xmax, ymin).
y0), Q0 = (xmin, ymi
n), Q1 = (xmin, ymax), Q2 = (xma
(x, ymax), Q3 = (xmax, ymin)
Can easily calculate the maximum / minimum value of coordinates.
Can be. Further, as shown in FIG.
Filling of the deformed outline frame by the shape
Fill with a rectangle of each rectangle as they overlap
Overwrite the overlapping part when
Image by filling the inside of the deformed outline
The processing speed of depiction can be increased. Next, such an image data editing method will be described.
Algorithm (Processing Structure) FIGS. 14 and 15
According to the flowchart shown in FIG.
Further explanation will be given. FIGS. 14 and 15 show an image data editing method.
FIG. 1 is a flowchart illustrating the algorithm of FIG.
4 shows one of the divided flowcharts, and FIG.
The flowchart is divided into two parts, and FIG.
It is a schematic diagram showing a Bezier function and its parameters,
FIG. 17 is an explanatory diagram for explaining the cubic Bezier function.
FIG. 8 is an explanatory diagram for explaining a method of calculating the distance of the curve.
19 is an explanatory diagram for explaining an example of a method for calculating the distance of a curve.
FIG. 20 illustrates another example of a method for calculating the distance of a curve.
FIG. 21 illustrates a linear cubic Bezier function.
FIG. Here, the deformation of the cubic Bezier function is
This will be briefly described with reference to FIG. The cubic Bezier function is shown in FIG.
As shown, two end points P0, P3 and two
There is a point P2. The positions of these two curve control points P1 and P2
By changing the position, the cubic Bezier function is transformed. Ingredient
Physically, when changing the positions of the two points P1 and P2,
First, at the user interface level,
Perform an operation such as clicking the mouse near the point
The change mode of the point is entered by the neighborhood judgment. Press mouse
With the mouse down, change its position by moving the mouse
When the mouse is released, the position changes anew
The position is registered and the point change mode is released.
To generate a new cubic Bezier curve
become.Further, as an example of the modification of the reference outline frame, the reference outline
Transform one linear part of the frame into a cubic Bezier function
The operation will be described with reference to FIG. Bezier parame
Data P0 (P0x, P1y), P1 (P1x, P1
y), P2 (P2x, P2y), P3 (P3x, P3
y), the curve L (Lx, Ly) is 0 ≦ t ≦
L = P0 (1-t) using t being 1 Three + P1t (1-
t) Two + P2t Two (1−t) + P3t Three Can be written as
Wear. Then, one line of image elements is plotted on the curve L shown in FIG.
By changing this curve, the corresponding pixel
Will change. The actual operation is as follows
P2 that is not normally needed only when performing the deformation below and
The coordinates of P1 are displayed.
Click near 2 (about 5 pixels) to specify the operating point
Then move the mouse to change its position
You. Click again after confirming the changed point,
Once the position is determined A Bezier curve according to these coordinates is generated again
Pixels that correspond to successive points on this curve (pixels
Is completed by arranging the data of (1). As shown in FIG. 14 and FIG.
When the processing structure of the data editing method is started,
In step ST20, initial settings are performed first, and the next
Proceed to step ST21. The initial setting in step ST20 is as follows.
This is accomplished by sequentially performing the contents of the following eight items. (1) pxlcnt of original image
Setting of the number of cells) and base (number of pixels in the linear direction)
(Set according to the deformation direction). That is, vertical deformation and horizontal deformation
Select the direction deformation. This gives the integer mesh coordinates
The pixels of the original image are stored in the reference outline frame 11 consisting of
can do. 2) Deformation pair (fcurve, gcurv)
e) Coefficient of curve parameter (cubic Bezier parameter)
Calculation of the value (for calculating the intermediate curve). Here, the coefficient value is "shape
The operation coefficient of the parameter is referred to as "
Let the parameters of the cubic Bezier function B (t) be P0, P
1, P2 and P3, B (t) = (-P0 + 3P1-3P2 + P3) t3+3
(P0-2P1 + P2) t2+3 (-P0 + P1) t +
P0 = M3t3+ M2t2+ M1t + M0 M3, M2, M1, and M0 when expressed as follows. Toes
The line segment in the deformation direction of the deformed outer frame 12 is
It will be described as parameter. (3) The cubic Bezier curve (fcurve)
Calculation of the number of continuous contour pixels (fccpxl) (e, FIG. 4
(FIG. 9). Here, the number of continuous contour pixels (fccpxl)
The calculation is to calculate the distance of the curve. The calculation of the distance of the curve will be described.
Generally, it is difficult to calculate the distance of a curve programmatically.
Despite the difficulty, the third-order Bezier function is as shown in FIG.
Determined by four parameters P0, P1, P2, and P3
And the function B (t) can be defined as
make use of, B (t) = (-P0 + 3P1-3P2 + P3) t3+3
(P0-2P1 + P2) t2+3 (-P0 + P1) t +
P0 It can be expressed as. Then, the first derivative by t is B ′
(T) is the curve distance DH Can be represented by However, the actual calculation is performed by a program.
Has processing time and other issues.
Considering the complexity, as shown in FIG.
Decompose into straight lines, and treat the sum of the straight line distances as curve distances
Is desirable. That is, to calculate the curve distance,
It is good to choose from the two methods shown in the following. The first method for calculating the curve distance is shown in FIG.
A representative point on the curve in advance to form a polygonal line
The number corresponding to the sum of the straight-line distances is defined as the number of division points.
Things. To improve the accuracy in this case, a straight line
The degree (number of divisions) may be increased. The second method of calculating the curve distance is shown in FIG.
In this way, a division point is formed according to the curvature of the curve,
The sum of the line distances is defined as a curve distance. (4) The cubic Bezier curve (gcurve)
Calculation of the number of continuous contour pixels (gcpxl) (same as (3))
Mr). (5) Continuous contour pic of straight line
Calculation of the number of cells (alpxl) (e in FIG. 4, FIG. 9). here
The calculation of the number of continuous contour pixels (alpxl) is directly
It is to calculate the distance of the line. The calculation of the distance of a straight line will be described.
As shown in FIG. 21, the start point / end point of the straight line is P0
(P0x, P0y) and P1 (P1x, P1y)
In this case, the distance between the two points is Can be represented by This is easily calculated programmatically.
Can be issued. (6) Continuous contour picture of a straight line (bline)
Calculation of the number of cells (blpxl) (similar to (5)). (7) Processing accuracy (rounding error recovery value: X
(ERR, YERR) setting. The setting of the processing accuracy means the appropriate processing described above.
An integer forming the reference outer frame 11 by the accuracy setting unit 10
Transform each pixel developed on mesh coordinates 13 of
Integer float mesh coordinates 15 forming the outer frame 12
It is developed continuously without any gaps above. The above (2) to (7) are integer flow numbers.
Deformable outline frame 1 consisting of auto mesh coordinates 15 (real coordinates)
Second, the pixels of the original image can be developed. (8) Initial setting for loop processing. Toes
The band processing for dividing the deformed outer frame 12 into columns.
The left end point of the first band (P00 (left
The coordinate values of (upper), P01 (lower left) are set. Next, in step ST21, all
It is determined whether or not all the processing has been completed (processing completed?).
In the case of ES (processing end), the processing ends, and NO (processing
Is not completed), the next step ST22
Proceed to. Next, in step ST22, the process
Initialize the band and proceed to the next step ST23
You. Initial processing band in step ST22
The setting is accomplished by performing the following three items in order.
Is performed. (1) Right end point of processing band (shown in FIG. 9)
Set coordinate values of P10 (upper right), P11 (lower right)
You. To set the right end point of this processing band
Is (A) Terminate processing units in the upper and lower directions of deformation, and
Calculate value (t0) (B) Corresponding coordinate values (P10, P10) on the cubic Bezier curve
11) Ask This is done by: Specifically, the known pixel number
P00(Coordinates of the upper left point P00 on fcurve in FIG. 9)
value)From processing bandwidth(Set the distance between pixels to 1 or more)To
Accordingly, the pixel number P10 at the right end point(The upper right point P in FIG. 9
00 coordinate value on fcurve)As well as
The curve distance from xell number P00 to P10Fig. 17
According to the method shown in FIG.4e.And
Figure 9By dividing by the number of continuous contour pixels shown in
Ask for. Subsequently, the A'-B 'cubic Bezier curve relation shown in FIG.
Let t = t0 be the number t parameterThe cubic Bezier function
Substituting for B (t)The coordinate value of P10 is obtained. Likewise
The t parameter of the D'-C 'cubic Bezier function shown in FIG.
Assuming that t = t0, the coordinate value of P11 is obtained. (2) Straight line in the deformation direction (P00-P10)
Of the number of continuous contour pixels (flpxl) of FIG.
Here, the calculation of the number of continuous contour pixels (flpxl) means
This is to calculate the distance of a straight line. How to calculate the distance of a straight line
The method is the same as described above. (3) Straight line in the deformation direction (P01-P11)
Of the number of continuous contour pixels (glpxl) of FIG. 9 (FIG. 9).
Here, the calculation of the number of continuous contour pixels (glpxl) means
This is to calculate the distance of a straight line. Next, at step ST23, fl
Whether the distance of pxl is longer than the distance of glpxl (fl
pxl> glpxl? ) Is determined, and NO (flpxl
If the distance is shorter than the glpxl distance),
Proceed to step ST24a, and proceed to step ST24a.
And the longer glpxl distance is predetermined.
Whether or not it is smaller than the threshold of
Is smaller and the processing is unsuitable)
Is larger than the maximum value), the next step ST26
(FIG. 15), and the determination in step ST24a is YE
If S (less than the threshold), the next step
Proceeds to ST25a, and ends in step ST25a.
It is determined whether it is a processing unit and not one point.
In the case of ES (final processing unit), the next step ST2
6 (FIG. 15), and NO (not the final processing unit)
In this case, the process returns to step ST21 and proceeds to step ST24a.
Is NO, or the determination in step ST25a is Y
Repeat until ES is reached. If the determination in step ST23 is YES (f
lpxl distance is greater than glpxl distance)
Proceeds to the next step ST24b and proceeds to step S24b.
At T24b, the longer flpxl distance is preset.
Whether it is smaller than a predetermined threshold (preset
Is smaller than the width of the band that has been processed and is not processing)
If NO (greater than the threshold), the next step
Proceeding to step ST26 (FIG. 15), step ST24b
If the determination is YES (smaller than the threshold),
Proceeds to step ST25b
Is the final processing unit and whether it is not 1 point
And if YES (final processing unit), the next step
Proceeds to step ST26, NO (not final processing unit)
In the case of, the process returns to step ST21 and proceeds to step ST24.
b is NO, or the determination in step ST25b is
Repeat until YES. That is, from step ST23 to step ST23
By ST25 (25a, 25b), the distance of flpxl
And the distance of glpxl are both greater than the threshold.
Until the band width is determined as the processing unit.
I have decided. Next, in step ST26, the process
Whether all blocks in the symmetric band have been processed
(End of processing?), And if YES (End of processing)
Proceeds to step ST32, which will be described later, and returns NO (the processing ends).
If not, the process proceeds to the next step ST27.
Run. Next, in step ST27, the processing block
Performs lock initialization and proceeds to the next step ST28.
You. The first processing block in step ST27
The period is set by performing the following four items in order.
Will be performed. (1) Initial setting for loop processing. Toes
And the band obtained by dividing the deformed outer frame 12 into columns is further divided into rows.
End point of the first block in the block processing
B00 (upper left), B10 (upper right) shown in FIG.
Is set. (2) End point coordinate value of minimum unit 17 for deformation processing
(Real numbers: B00, B01, B11, B10).
That is, the deformed outer frame 12 (float mesh coordinates 15)
Area within the desired four pixels (B00, B01, B
11, B10) (B00-B0)
1-B11-B10) The minimum unit 17 of the transformation process
Set the coordinate values of four pixels to be (block)
You. (3) Straight line in the straight line direction (B00-B01)
Calculation of the number of continuous contour pixels (cpxl) (FIG. 10). This
Here, the calculation of the number of continuous contour pixels (cpxl) refers to a straight line
Is calculated. How to calculate the distance of a straight line
This is the same as described above. (4) Straight line in the straight line direction (B10-B11)
Calculation of the number of continuous contour pixels (dpxl) (FIG. 10). This
Here, the calculation of the number of continuous contour pixels (dpxl) means a straight line
Is calculated. How to calculate the distance of a straight line
This is the same as described above. Next, in step ST28, cp
xl is longer than the distance of dpxl (cpxl
> Dpxl? ) And NO (the distance of cpxl is dp
xl), the next step ST
29a, and in step ST29a, the longer one
Is greater than a predetermined threshold value.
Whether it is small (smaller than the preset width of block 17)
To determine if the processing is inconsistent) and determine NO (from the threshold
In the case of (large), the process proceeds to the next step ST31,
If the determination in step ST29a is YES (less than the threshold value)
I), the process proceeds to the next step ST30a,
Is the final processing unit in step ST30a, and
Judge whether it is not 1 point, YES (final processing unit)
In the case of, the process proceeds to the next step ST31, and
If it is not the final processing unit), return to step ST26.
The determination in step ST29a is NO, or
It repeats until the judgment of step ST30a becomes YES. If the determination in step ST28 is YES (c
pxl distance is greater than dpxl distance)
Proceeds to the next step ST29b, and proceeds to step ST29b.
29b, the longer cpxl distance is preset.
Whether the threshold value is smaller than a predetermined threshold value.
Is smaller than the width of the lock 17 and the processing is incompatible)
If NO (greater than the threshold), the next step
Proceeds to step ST31, and the determination in step ST29b is Y
In the case of ES (less than the threshold), the next step
The process proceeds to step ST30b, and the
Judge whether it is the final processing unit and whether it is not 1 point,
If YES (final processing unit), the next step ST
31 and if NO (not the final processing unit)
Returning to step ST26, the judgment of step ST29b is
No, or the determination in step ST30b is YES.
Repeat until That is, from step ST28 to step
By ST30 (30a, 30b), the distance of cpxl
Until both the distances dpxl and dpxl are greater than the threshold.
The processing is repeated and the minimum unit of deformation processing 17 (block)
Width (size) is determined. Next, in step ST31, drawing
/ Print output processing is performed and the process proceeds to the next step ST32.
You. Drawing / Printing Output in Step ST31
The processing is accomplished by sequentially performing the following five items.
Is performed. (1) Obtaining an image density value. In other words, the transformation
Pixels that form the logical minimum unit 17 (block)
(B00, B01, B11, B10)
Original image density value (image density) corresponding to pixel (B00)
Value: G00) is defined as the density value of the entire block. (2) A rectangle surrounding the minimum unit 17 for deformation processing
Calculation of (fmax, fmin). Here, the transformation processing minimum
Calculation of rectangle (fmax, fmin) surrounding unit 17
Is a square (B00-B01-
B11-B10) to form a rectangular square.
is there. (3) Addition of rounding error recovery value and painting
Determine the fixed integer rectangular area. This forms block 17
Surround the square (B00-B01-B11-B10)
The four end points of the rectangular quadrangle form the deformed outline frame 12
Coordinates on float mesh coordinates 15 (real coordinates)
And a square (B00-B0) as shown in FIG.
1-B11-B10).
-Q2-Q3) to form integer float mesh coordinates
15 and are continuously developed without gaps. (4) Integer rectangular area is painted with density value G00
Crush This is the integer flow that forms the deformed outer frame 12.
4 expanded to coordinates on the port mesh coordinates 15 (real coordinates)
A rectangle surrounding the square (B00-B01-B11-B10)
The density value of the original image is inside the square (Q0-Q1-Q2-Q3)
(Image density value: G00). (5) Updating of vertical coordinate values (B00 <-B0)
1, B10 <-B11). This is the next block 17
Block 17 in order to perform the processing of
Block B01 and B11 to be processed next.
To be replaced with the upper end points B00 and B10 of step 17
It is. Next, in step ST32, the transformation
Updating the coordinate values in the upper direction (P00 <-P10, P01 <-
P11), and return to step ST21 for all the processing.
From step ST21 to step ST32 until
Is to be repeated. The upper part of the deformation direction in step ST32
Update coordinate value (P00 <-P10, P01 <-P11)
Will be filled in for the next band.
The right end points P10 and P11 of the selected band are processed next.
To the left end points P00 and P01 of the band
Things. As described above,Each on the deformed outline frame 12
Each pixel has the phase of each pixel on the reference outline 11.
Because we can easily reflect each other's positional relationship,Base
The relative position of the original image data to the quasi-outer frame 11 is maintained.
The original image data into the desired shape.
Can be formed by pixels such as photos
Original image data can be circular, elliptical, sector, square
Freely transform into shapes, strips, cylinders, arches, etc.
Possible and excellent image quality after deformation
It can be. A modification which is a modification of the reference outer frame 11 is shown.
As shown in FIG. 22, the shape of the external shape frame 12 is trapezoidal, circular,
Default deformation of shape, cylinder or arch, fan, etc.
Shape, and change this default deformed shape and trapezoid
Shape, deform ellipses from circles, cylindrical or arched
Change the shape of the arch to the depth of the arch, or
Default deformation such as arbitrary deformation by int operation
It is preferable to use a modified deformed shape whose shape has been modified. In addition, color image editing
FIG. 23 shows a modified example. The original picture used in the present invention is as described above.
Image information (density value) of depth as image data
Floor consisting of a set of points (pixels)
Not only black and white or color photos with tones
Image data of original images that can be binarized such as characters and figures
(Vector data or dot data)
Can be. That is, from the binary image image,
Support a very wide range of original images up to the color image
be able to. FIG. 2 shows a modification of the binary image image.
It is shown in FIG. The present invention is limited to the above embodiment.
It is not a thing and can be changed as needed. [0121] As described above, the image data of the present invention
EditionGatheringAccording to the method, the reference outer frame is deformed into a desired shape.
The original image data for the reference outline frame.Ofrelative
Deform the original image data while maintaining the positional relationship.
From the binary image,
Original image data consisting of color images
Fan shape, square shape, strip shape, cylindrical shape, arch shape
It can be freely deformed as well as the image of the deformed image
Extremely good that the quality can be excellent
It works.

【図面の簡単な説明】 【図1】本発明に係る画像データ編集装置の要部の構成
を示すブロック図 【図2】本発明に係る画像データ編集を示すフローチャ
ート 【図3】基準外形枠の変形時の線分を組み合わせを説明
する説明図であり、aは原画像の一例を示すモノクロ写
、bは基準外形枠を示す線図、cは基準外形枠の縦方
向変形時の線分の組み合わせを示す線図、dは縦方向変
形後の変形外形枠を示す線図、eは縦方向変形した画像
を示すディスプレー上に表示した中間画像例を示す図
fは基準外形枠の横方向変形時の線分の組み合わせを示
す線図、gは横方向変形後の変形外形枠を示す線図、h
は横方向変形した画像を示すディスプレー上に表示した
中間画像例を示す図 【図4】縦方向変形について説明する説明図であり、a
は基準外形枠に収納されたピクセルを示し、bは基準外
形枠上のピクセルを示し、cは基準外形枠上のピクセル
の位置を示し、dはパラメータ座標上のピクセルの位置
を示し、e変形外形枠を示し、fは変形パラメータ座標
上のピクセルの位置を示し、gは変形外形枠上に変換さ
れたピクセルの位置を示す。 【図5】中間曲線の算出方法を説明する説明図 【図6】列分割を説明する模式図 【図7】行分割を説明する模式図 【図8】ブロックを説明する模式図 【図9】バンドの設定を説明する説明図 【図10】ブロックの設定を説明する説明図 【図11】ブロックを説明する説明図 【図12】ブロックを囲む矩形の四角形を説明する説明
図 【図13】変形外形枠の塗りつぶしを説明する説明図 【図14】本発明に係る画像データ編集方法のアルゴリ
ズムを説明するフローチャートを2分割した一方 【図15】本発明に係る画像データ編集方法のアルゴリ
ズムを説明するフローチャートを2分割した他方 【図16】3次ベジエ関数およびそのパラメータを示す
模式図 【図17】3次ベジエ関数を説明する説明図 【図18】曲線の距離の計算方法を説明する説明図 【図19】曲線の距離の計算方法の一例を説明する説明
図 【図20】曲線の距離の計算方法の他例を説明する説明
図 【図21】直線状の3次ベジエ関数を説明する説明図 【図22】基準外形枠および変形外形枠の形状例を示す
図 【図23】本発明方法に従った原画像の一例を示すモノ
クロ写真およびその変形例を示すディスプレー上に表示
した中間画像例を示す図 【図24】本発明方法に従った2値のイメージ画像の変
形例を示す図 【図25】従来の射影変形を用いた変形後の画像を示す
図 【符号の説明】 1 画像データ編集装置 2 原画像データ読み取り手段 3 パラメータ座標形成手段 4 変形外形枠形状読み取り手段 5 変形パラメータ座標形成手段 6 実座標算出手段 7 画像変形描画単位設定手段 8 原画像濃度値取得手段 9 画像描画手段 10 処理精度設定部 11 基準外形枠 12 変形外形枠 13 整数のメッシュ座標(x−y座標) 14 パラメータ座標 15 整数のフロートメッシュ座標(実座標) 16 変形パラメータ座標 17 変形処理最小単位(ブロック)
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a configuration of a main part of an image data editing apparatus according to the present invention. FIG. 2 is a flowchart showing image data editing according to the present invention. is an explanatory view illustrating a combination of a line segment of time variations, a is shown to monochrome photographs of an example of an original image
True, b is shown to diagram the reference outline frame, c is the reference longitudinal deformation combining indicate to diagrams of a line segment when the outline frame, d is shown to diagram the deformation outline frame after longitudinal deformation, e is a diagram showing an intermediate image example of displaying an image longitudinal deformation on indicates to display,
f indicates a combination of line segments when the reference outer frame is deformed in the horizontal direction.
To the diagram, g is shown to diagram the deformation outline frame after lateral deformation, h
Is displayed on the display showing the image deformed in the horizontal direction .
FIG . 4 is a diagram illustrating an example of an intermediate image. FIG . 4 is an explanatory diagram illustrating vertical deformation.
Denotes a pixel stored in the reference outline frame, b denotes a pixel on the reference outline frame, c denotes a pixel position on the reference outline frame, d denotes a pixel position on the parameter coordinates, and e denotes a deformation. The outline frame is shown, f indicates the position of the pixel on the deformation parameter coordinates, and g indicates the position of the pixel converted on the deformation outline frame. FIG. 5 is an explanatory diagram illustrating a calculation method of an intermediate curve. FIG. 6 is a schematic diagram illustrating column division. FIG. 7 is a schematic diagram illustrating row division. FIG. 8 is a schematic diagram illustrating blocks. FIG. 10 is an explanatory diagram for explaining setting of a block. FIG. 11 is an explanatory diagram for explaining a block. FIG. 12 is an explanatory diagram for explaining a rectangular rectangle surrounding a block. FIG. 14 is an explanatory diagram illustrating the filling of the outer frame. FIG. 14 is a flowchart illustrating the algorithm of the image data editing method according to the present invention divided into two parts. FIG. 15 is a flowchart illustrating the algorithm of the image data editing method according to the present invention. FIG. 16 is a schematic diagram illustrating a cubic Bezier function and its parameters. FIG. 17 is an explanatory diagram illustrating a cubic Bezier function. FIG. 18 is a diagram illustrating a method of calculating a distance of a curve. FIG. 19 is an explanatory diagram illustrating an example of a method of calculating a distance of a curve. FIG. 20 is an explanatory diagram illustrating another example of a method of calculating a distance of a curve. FIG. 21 is a diagram illustrating a linear cubic Bezier function. FIG. 22 is a diagram showing examples of shapes of a reference outer frame and a deformed outer frame. FIG. 23 is a diagram showing an example of an original image according to the method of the present invention.
Displayed on the display showing the black-and-white photo and its modification
Description Figure [a code indicating the image of FIG. FIG. 25 after deformation using a conventional projection deformation showing a modified example of FIG. 24 shows images of the binary according to the present invention a method of indicating an intermediate image example 1 image data editing device 2 original image data reading means 3 parameter coordinate forming means 4 deformed outline frame shape reading means 5 deformation parameter coordinate forming means 6 real coordinate calculating means 7 image deformation drawing unit setting means 8 original image density value obtaining means 9 Image rendering means 10 Processing accuracy setting unit 11 Reference outer frame 12 Deformed outer frame 13 Integer mesh coordinates (xy coordinates) 14 Parameter coordinates 15 Integer float mesh coordinates (real coordinates) 16 Deformation parameter coordinates 17 Deformation processing minimum unit ( block)

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−206554(JP,A) 特開 平2−78368(JP,A) 特開 平3−196187(JP,A) 特開 平4−373084(JP,A) (58)調査した分野(Int.Cl.7,DB名) H04N 1/387 G06T 3/00 ────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-62-206554 (JP, A) JP-A-2-78368 (JP, A) JP-A-3-196187 (JP, A) JP-A-4-206 373084 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) H04N 1/387 G06T 3/00

Claims (1)

(57)【特許請求の範囲】 【請求項1】 原画像の画像情報としての原画像データ
をコンピュータで処理可能な単位のピクセルの集合体と
し、これらのピクセルを略矩形の基準外形枠を座標軸と
する整数のメッシュ座標として前記基準外形枠に収納
し、この基準外形枠に収納した各ピクセルの座標値を前
記基準外形枠の座標軸の原点から座標軸毎に最も離間し
た位置のピクセルの座標値をそれぞれ1とするパラメー
タ座標値に変換して前記メッシュ座標上の各ピクセルを
座標軸の最大値を1とする略矩形のパラメータ座標に展
開し、前記基準外形枠を少なくとも関数により記述可能
な所望の形状の変形外形枠に変形させてこの変形外形枠
を座標軸とする実座標とし、この実座標を当該実座標の
座標軸の原点から座標軸毎に最も離間した位置の座標値
をそれぞれ1とする変形パラメータ座標とし、その後、
前記各ピクセルのパラメータ座標値を変形パラメータ座
標における変形パラメータ座標値に変換して、前記各ピ
クセルを前記実座標上に整数のフロートメッシュ座標と
して展開するとともに、前記実座標内の領域を複数の変
形処理最小単位としてのブロックに分割し、前記ブロッ
ク毎にそのブロック内に位置するピクセルのうちの1つ
のピクセルの原画の画像濃度値を取得し、前記実座標内
の領域を、前記ブロックを囲む前記実座標上の矩形毎
に、前記取得した原画の画像濃度値をもって塗りつぶす
ことを特徴とする画像データ編集方法。
(57) [Claims] [Claim 1] Original image data as image information of an original image
Is a set of pixels that can be processed by a computer
These pixels are referred to as coordinate axes with a substantially rectangular reference outline frame.
Stored in the reference outer frame as integer mesh coordinates
And the coordinate values of each pixel stored in this reference
The maximum distance for each coordinate axis from the origin of the coordinate axes of the reference outer frame
Parameter where the coordinate value of the pixel at the position
And convert each pixel on the mesh coordinates
Expanded into a substantially rectangular parameter coordinate where the maximum value of the coordinate axis is 1.
Open, the reference outline frame can be described by at least a function
Deformed into a deformed outer frame of a desired shape
Is the actual coordinate with the coordinate axis, and this actual coordinate is
Coordinate value of the position farthest away from the origin of each coordinate axis for each coordinate axis
Are the deformation parameter coordinates each of which is 1, and then
The parameter coordinate value of each pixel is transformed parameter
The coordinates are transformed into deformation parameter coordinates on
Xel on the real coordinates with integer float mesh coordinates
And expand the area within the real coordinates
Divided into blocks as the minimum unit for shape processing, and
One of the pixels located in that block
The image density value of the original image of the pixel of
Area for each rectangle on the real coordinates surrounding the block
Is painted with the image density value of the obtained original image.
An image data editing method, characterized in that:
JP25881393A 1993-09-10 1993-09-10 How to edit image data Expired - Fee Related JP3449563B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP25881393A JP3449563B2 (en) 1993-09-10 1993-09-10 How to edit image data
JP2000007612A JP3612257B2 (en) 1993-09-10 2000-01-17 Image data editing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25881393A JP3449563B2 (en) 1993-09-10 1993-09-10 How to edit image data

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2000007612A Division JP3612257B2 (en) 1993-09-10 2000-01-17 Image data editing device

Publications (2)

Publication Number Publication Date
JPH07273967A JPH07273967A (en) 1995-10-20
JP3449563B2 true JP3449563B2 (en) 2003-09-22

Family

ID=17325402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25881393A Expired - Fee Related JP3449563B2 (en) 1993-09-10 1993-09-10 How to edit image data

Country Status (1)

Country Link
JP (1) JP3449563B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4957424B2 (en) 2006-12-08 2012-06-20 セイコーエプソン株式会社 Item editing method, item editing apparatus and program thereof
JP4501959B2 (en) * 2007-05-10 2010-07-14 セイコーエプソン株式会社 Image processing apparatus and image processing method
CN106157341B (en) 2015-03-30 2019-05-14 阿里巴巴集团控股有限公司 Generate the method and device of synthesising picture
JP2017005583A (en) * 2015-06-12 2017-01-05 株式会社メイクソフトウェア Image forming device, image forming method and computer program
CN106408508B (en) * 2015-07-30 2019-07-09 腾讯科技(深圳)有限公司 A kind of anamorphose processing method and processing device

Also Published As

Publication number Publication date
JPH07273967A (en) 1995-10-20

Similar Documents

Publication Publication Date Title
JP2793466B2 (en) Variable image enlargement method and apparatus
JPH0660173A (en) Method and apparatus for reducing picture
JP3449563B2 (en) How to edit image data
JPH0561954A (en) Image processor
JPH04284246A (en) Coloring treatment method of picrure region
JP3612257B2 (en) Image data editing device
JP4392082B2 (en) Engraving style halftone image generation method and apparatus
JPS6282472A (en) Picture processing system
JP2911464B2 (en) Image processing method
JP3002972B2 (en) 3D image processing device
JP3517982B2 (en) Drawing device
JP2000076432A (en) Image data interpolation device and method therefor, and medium having recorded image data interpolation program thereon
US6400369B1 (en) Information processing method and apparatus for generating texture-data for computer graphics
JP4138018B2 (en) System for modeling a three-dimensional shape of an object by shading a two-dimensional image of the object and a method for realizing the same by a computer
JPH0668247A (en) Method and device for varying power of digital image data
JP3560124B2 (en) Image data interpolation device, image data interpolation method, and medium recording image data interpolation program
JP2580441B2 (en) Figure processing method
JPH09326920A (en) Digital image processing method in the unit of sub pixel
JPH0661089B2 (en) Two-dimensional representation method of three-dimensional object
JPH05216969A (en) Graphic processing method
JPH0955881A (en) Picture shading method
JPH05210716A (en) Graphic processing method
JPH06110442A (en) Character and figure processor and method for deforming character of figure
JPH1153513A (en) Method and device for setting region in image
JPH08102850A (en) Picture processor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20010703

LAPS Cancellation because of no payment of annual fees