JP4101129B2 - Image editing method, image editing apparatus, program, and recording medium - Google Patents
Image editing method, image editing apparatus, program, and recording medium Download PDFInfo
- Publication number
- JP4101129B2 JP4101129B2 JP2003192014A JP2003192014A JP4101129B2 JP 4101129 B2 JP4101129 B2 JP 4101129B2 JP 2003192014 A JP2003192014 A JP 2003192014A JP 2003192014 A JP2003192014 A JP 2003192014A JP 4101129 B2 JP4101129 B2 JP 4101129B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- trimming
- movement
- instruction
- image data
- 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 - Lifetime
Links
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
- Studio Circuits (AREA)
- Television Signal Processing For Recording (AREA)
- Editing Of Facsimile Originals (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、画像編集技術に関し、特にデジタルスチルカメラ又はデジタルビデオカメラ等によって撮影した静止画像や動画像を表示及び/又は印刷する際に画像を表示しながら、画像の構図を調整する技術に関する。
【0002】
【従来の技術】
デジタルカメラで撮影した画像データを取り込み、ディスプレイ装置に表示し、マウス又はリモコンなどのポインタ装置を使って画像の任意の領域をトリミング領域として指定し、印刷する機能は一般的である。図6はごく一般的なトリミング処理の例を示している。すなわち、図6においてトリミング前の画像601にトリミング枠602を重ねて表示し、ユーザがトリミング枠602を縮小・拡大、回転、移動させて画像601の希望する部分を指定することで、最終的にユーザの希望する構図となったトリミング画像603を得るというものである。
【0003】
一方、同様のトリミング画像を得るための、異なる操作形式の従来技術としては、例えば下記の特許文献1のように、所定の画像編集ソフトウエアが格納されたデジタル画像編集装置にテレビを接続し、その画面の表示エリアに適合するように画像データを表示し、次に画像データをテレビの表示エリアを越える大きさに拡大し、拡大された画像データを外部からの指示に応じた方向に移動させて表示エリア内に表示されるように、画像データを変更するものが知られている。下記の特許文献2は同様な方法をデジタルカメラに適用したもので、拡大操作用の十字キーと位置指定用の十字キーを具備することを特徴としている。
【0004】
また別の従来技術としては、下記の特許文献3のように、人物の顔が写された画像データを表示し、所定の2箇所を指示手段によって指示し、指定された2点を基に出力紙サイズに最適な顔の大きさ、位置になる画像の拡大/縮小率を求め、所定の位置に画像をプリントする方法も知られている。
【0005】
【特許文献1】
特開2000−83222号公報
【特許文献2】
特開2000−217024号公報
【特許文献3】
特開平11−341272号公報
【0006】
【発明が解決しようとする課題】
しかし、図6のタイプのトリミング操作は、画像全体を見ながらトリミング枠を縮小、移動するために、元の画像のどの部分を切り出そうとしているかはわかり易い反面、実際の印刷領域に印刷された時の構図から得られる印象を把握するのが難しいという欠点がある。
【0007】
これに対して、特許文献1や特許文献2の方式は、印刷後の構図が容易にわかるという点では優れているが、トリミングを行う際には、いったん画像を拡大し、その後、位置を変更するための移動をするため、拡大操作及び移動操作の2ステップになっていた。
【0008】
また、特許文献3は証明写真を作成する際に、印刷する紙の大きさにあわせて、顔の大きさや位置が好適になることを目的としており、ユーザが指定するポイントはあらかじめ頭の頂点と顎の先端のように決められており、一般のスナップショットの画角修正とは用途が異なった。
【0009】
本発明の目的は、ユーザが1ステップの操作を行うだけで、移動及び拡大(縮小)を行うことができる画像編集技術を提供することである。
本発明の他の目的は、印刷時の構図を把握しながらトリミングを行うことができる画像編集技術を提供することである。
【0010】
【課題を解決するための手段】
本発明の一観点によれば、画像データに対するトリミング領域を移動させるための指示を入力する指示ステップと、前記指示に応じてトリミング領域の移動量および拡大率を演算する演算ステップとを有し、前記演算ステップは、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とする画像編集方法が提供される。
本発明の他の観点によれば、画像データに対するトリミング領域を移動させるための指示を入力する指示手段と、前記指示に応じてトリミング領域の移動量および拡大率を演算する演算手段とを有し、前記演算手段は、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とする画像編集装置が提供される。
本発明のさらに他の観点によれば、画像データに対するトリミング領域を移動させるための指示を入力する指示ステップと、前記指示に応じてトリミング領域の移動量および拡大率を演算する演算ステップとをコンピュータに実行させるためのプログラムであって、前記演算ステップは、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とするプログラムが提供される。
本発明のさらに他の観点によれば、画像データに対するトリミング領域を移動させるための指示を入力する指示ステップと、前記指示に応じてトリミング領域の移動量および拡大率を演算する演算ステップとをコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、前記演算ステップは、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とする記録媒体が提供される。
【0011】
本発明によれば、画像表示領域の画像の任意の点を移動指示すると、必要に応じて画像が拡大され、指示された位置まで画像を移動させることができる。例えば、画像中の中央部の人物を右端に寄せたい場合、1回の人物の移動指示操作で所望の移動及び拡大をし、好ましい構図の画像を得ることができる。また、移動指示中に、演算された画像の移動量及び/又は拡大率に応じて画像データを表示することにより、編集後の構図を把握しながらトリミングを行うことができる。
【0012】
【発明の実施の形態】
以下、添付の図面を参照して本発明の好適な実施形態を説明する。
(第1の実施形態)
図1は、本発明の第1〜第5の実施形態による画像編集装置のハードウエア構成を示している。101はコンピュータソフトウエアプログラムを実行するCPU(中央演算処理装置)、102はプログラムを記憶しておくROM(リードオンリメモリ)、103はプログラム実行時に使用するRAM(ランダムアクセスメモリ)、104はプログラム格納用のハードディスクドライブ(HDD)、105はプログラムやデータをフレキシブルディスクや、MO(光磁気ディスク)などの媒体に記憶するための記憶装置、106はプログラムの実行結果や、実行状態を表示するためのディスプレイ装置、107はメモリカードを挿し込みデータの読み書きをするためのメモリカードインタフェース、108はマウス、109はプリンタ、110はバスである。
【0013】
本実施形態では、画像をディスプレイ106に表示するための表示用メモリ座標系と、画像データ上の位置を表現するための画像座標系という二つの座標系を用いて、マウス108が移動した後に画像データから切り出すべき領域、およびディスプレイ106上に表示するために描画する際の拡大率を決定し、最後に表示用メモリ領域へ書き込む。
【0014】
(表示用メモリ座標系の説明)
表示用メモリ座標系を図5の503に示す。x=y=0を原点として図面上、右方向にx軸、下方向にy軸が伸びている。画像は原点(0,0)を画像の左上点として、幅cWidth、高さcHeightの表示領域に描画される。マウスによる座標指定もこの表示用メモリ座標系で行われる。表示中の画像の任意の点をマウスによってドラッグすると、移動前の点(x0,y0)から移動後の点(x1,y1)へマウスの示す座標が変化する(510)。ドラッグは、マウスの左ボタンを押しながらマウスを移動させる操作であり、左ボタンを押した座標が移動前の点(x0,y0)であり、左ボタンを離した座標が移動後の点(x1,y1)である。
【0015】
(画像座標系の説明)
もう一つの座標系である画像座標系を図5の501及び502に示す。501はマウスのドラッグによる移動前の状態を示し、502は移動後の状態を示している。図5において504は画像の外郭、505及び507はトリミング領域を示すトリミング枠、506及び508はマウスにより指定された座標を示す。画像の外郭504のx軸の長さが1になるように、画像座標系は正規化されている。画像座標系におけるマウスの座標506は表示座標系の(x0,y0)に対応し、移動後のマウスの座標508は表示座標系の(x1,y1)に対応している。さらに、ディスプレイ上で画像の任意の点を指定し、そこをつまんで移動(ドラッグ)するということは、画像座標系上でのマウスが指定している点は移動前の点506と移動後の点508で不変、ということである。また、移動前後で画像の外郭504は不変で、トリミング枠は505から507へ左に移動する。
【0016】
例えば、ユーザは、ディスプレイに表示された主被写体の位置を変えることにより、適切な構図を構成するためのトリミングを行うことができる。まず、ユーザは、主被写体が位置する表示座標系(x0,y0)にマウスのポインタを合わせ、その表示座標系(x0,y0)から(x1,y1)にドラッグすることにより、主被写体の位置を真中から右側へ移動させることができる。ドラッグ操作によりマウスポインタを移動させると、主被写体はマウスポインタを追従するように移動する。したがって、移動前及び移動後の画像座標系のマウス位置506及び508は共に同じ主被写体の位置を示すことになる。表示座標系では主被写体を(x0,y0)から(x1,y1)へ右に移動させる指示をしたので、画像座標系では主被写体の位置506,508の位置は変わらず、トリミング枠が移動前のトリミング枠505から移動後のトリミング枠507への左に移動することになる。トリミング枠505及び507は、ディスプレイの表示領域のサイズに合うように拡大率が決定される。トリミング枠505及び507はサイズが同じであり、移動前と移動後では画像の拡大率が同じである。そして、トリミング枠505,507の左上座標と表示座標系(0,0)の位置が一致するようにディスプレイに表示される。
【0017】
次に、図4の表示座標系403、ドラッグ移動前の画像座標系401、及びドラッグ移動後の画像座標系402について説明する。図5の移動前の画像座標系501ではトリミング枠505が画像外郭404の内側にあるのに対し、図4の移動前の画像座標系401ではトリミング枠405の左端が画像外郭404の左端に接している点が異なる。
【0018】
図5と同様に、マウスのドラッグ操作により表示座標系(x0,y0)から(x1,y1)へ移動させる場合を説明する。仮に、図5と同様に、移動前のトリミング枠405を左に移動させようとするとトリミング枠405が画像外郭404をはみ出してしまい、トリミング枠405内に画像データが存在しない領域が入り込んでしまう。そこで、図4に示すように、移動後のトリミング枠407は、左端を画像外郭404の左端に合わせ、トリミング枠407のサイズを移動前のトリミング枠405より小さくする。移動前後のマウス位置406及び408は同じ主被写体を示している。トリミング枠405及び407内の画像は、ディスプレイのサイズに拡大される。したがって、移動後のトリミング枠407内の表示画像の拡大率は、移動前のトリミング枠405内の表示画像の拡大率よりも大きい。すなわち、このトリミング操作により、ディスプレイ上の主被写体は右に移動すると共に拡大する。結果として、移動する処理と拡大する処理を、1ステップのドラッグ操作で行うことができる。
【0019】
以上のように、ドラッグにより移動方向と逆方向の画像の外郭404の端を越えてトリミング枠405の移動指示がされたときに、その越えた移動量に応じて画像を拡大して表示する。また、拡大率にかかわらずに、ドラッグで指示した移動前の点の画像が移動後の点に移動するように表示する。具体的には、指示した移動前の点の画像を移動後の点に移動させ、かつトリミング枠内に空白ができないように、画像の移動量及び拡大率を演算して表示する。
【0020】
図2は、本発明の第1の実施形態による画像編集方法の処理を示すフローチャートである。以下、フローチャートに従い本発明の第1の実施形態を説明する。マウスのドラッグ操作が行われると、以下の処理を開始する。
【0021】
ステップS201では、その時点での、画像座標系上のクリッピング枠(トリミング枠)の位置(Ix,Iy)、幅Iw、高さIhを求める。すなわち、図4及び図5に示すように、画像外郭404,504の左上の点の位置を(0,0)とし、画像座標系におけるクリッピング枠405,505の左上の点の位置を(Ix,Iy)、クリッピング枠405,505の幅と高さを(Iw,Ih)へ代入する。
【0022】
ステップS202では表示メモリ座標系における移動開始前のマウスの位置座標を取得し、(x0,y0)へ代入する。
【0023】
ステップS203ではマウスの動きを捕捉するためにあらかじめ設定された一定時間の待ちを設ける。
【0024】
ステップS204では表示メモリ座標系における移動後のマウスの位置座標を取得し、(x1,y1)へ代入する。
【0025】
ステップS205では、図4及び図5に示すように、新たなクリッピング枠407,507の位置(x',y')、幅w'、高さh'を求めると共に拡大率を求める。x,'y',w',h'の算出方法については後述する。
【0026】
ステップS206では、ステップS205で求めた、x,'y',w',h'で指定される新たなクリッピング枠407,507内の画像を読み出し、もとめた拡大率で表示メモリ座標系へ描画する。これにより、ディスプレイに画像が表示される。
【0027】
ステップS207で、マウスのドラッグが終了したかどうかを判定し、終了していれば処理を終わり、終了していなければステップS201に戻り、同様の処理を繰り返す。処理が終了すると、トリミング後の画像を印刷したり、保存する。クリッピング枠は、印刷される画像領域を示す画像印刷領域である。ユーザがクリッピング枠に表示される画像の印刷を指示すると、クリッピング枠の画像が印刷される。
【0028】
上記の画像編集処理を行うことにより、ドラッグ操作中は、マウスポインタを追従するように主被写体が移動及び/又は拡大して随時表示されるので、印刷時の構図を把握しながらトリミングを行うことができる。
【0029】
次に、ステップS205における、クリッピング枠の位置(x',y')、幅w'、高さh'の算出方法を示す。ここでは説明を容易にするために、マウスの動きを横方向に左から右へ、すなわちX軸の正方向に動かす場合について説明する。逆方向、上下方向、斜め方向についても同様の方法で可能である。
【0030】
新たなクリッピング枠の位置、幅、高さを求める方法は、初期状態において2つの場合に分けて考える。1つは、図4の401に示したように、クリッピング枠405が画像の外郭404と接している場合、すなわちx=0の場合である。もう1つは、図5の501に示したように、クリッピング枠505が画像の外郭504と接していない場合、すなわちx≠0の場合である。
【0031】
図4のx=0の場合は、次式で求められる。
x'=0(画像の左端辺と接しているから)-------(1)
w'=w×x0/x1--------(2)
h'=h×w'/w ---------(3)
y'=y+h×y0/cHeight-h'×y1/cHeight----(4)
【0032】
図5のx≠0の場合は、次式で求められる。
w'=w --------------(5)
x'=x-(x1-x0)×w/cWidth ------(6)
y'=y
h'=h
【0033】
(第1の実施形態の効果)
第1の実施形態によれば、画像データのうちの画像表示領域に表示された画像の任意の点を移動指示すると、移動指示に応じて画像の移動量及び拡大率を演算し、演算された画像の移動量及び拡大率に応じて画像データの所定領域を画像表示領域に表示する。
本実施形態によると、トリミング枠内の印刷領域のみを表示しながら、マウスやペンなどで画像の任意の部分を指定して、そこをつかんだままドラッグしたときに、必要に応じて画像が拡大され、好みの位置まで画像を移動することができる。例えば、中央部に人物が映っている画像をトリミングにより、人物を右端に寄せたい場合、従来は、いったん拡大してから、移動する必要があったが、本実施形態によれば、配置したい位置まで人物の部分をドラッグするだけで、人物が移動し、必要に応じて画像が拡大されるため、1回の操作で好ましい構図の画像を得ることが可能となる。
【0034】
(第2の実施形態)
図7は、本発明の第2の実施形態による画像編集方法の処理を示すフローチャートである。以下、フローチャートに従い本発明の第2の実施形態を説明する。マウスのドラッグ操作が行われると、以下の処理を開始する。
【0035】
ステップS701では、その時点での、画像座標系上のクリッピング枠(トリミング枠)の位置(Ix,Iy)、幅Iw、高さIhを求める。上記と同様に、画像座標系におけるクリッピング枠の左上の点の位置を(Ix,Iy)、クリッピング枠の幅と高さを(Iw,Ih)へ代入する。
【0036】
ステップS702では表示メモリ座標系における移動開始前のマウスの位置座標を取得し(x0,y0)へ代入する。
【0037】
ステップS703ではマウスの動きを捕捉するためにあらかじめ設定された一定時間の待ちを設ける。
【0038】
ステップS704では表示メモリ座標系における移動後のマウスの位置座標を取得し(x1,y1)へ代入する。
【0039】
ステップS705では新たなクリッピング枠の位置(x',y')、幅w'、高さh'を求めると共に拡大率を求める。x,'y',w',h'の算出方法については第1の実施形態と基本的に同様である。その詳細は、後に説明する。
【0040】
ステップS706では、ステップS705で求めた、x,'y',w',h'で指定される新たなクリッピング枠内の画像を読み出し、もとめた拡大率で表示メモリ座標系へ描画する。これにより、ディスプレイ上に画像が表示される。
【0041】
ステップS707で、マウスのドラッグが終了したかどうかを判定し、終了していれば処理を終わり、終了していなければステップS703に戻る。この戻り先が第1の実施形態との明確な差異である。第1の実施形態では先頭のステップS201まで戻っていた。
【0042】
第2の実施形態(図7)のステップS705では、新たなクリッピング枠を、常にステップS701,S702で取得した移動指示開始時の初期の変動しないクリッピング枠情報Ix,Iy,Iw,Ih及びマウス位置(x0,y0)を用いて算出する。これに対して、第1の実施形態(図2)のステップS205では、新たなクリッピング枠を、ステップS201,S202で取得したドラッグ(移動指示)中に変動するクリッピング枠情報Ix,Iy,Iw,Ih及びマウス位置(x0,y0)を用いて算出する。
【0043】
第1及び第2の実施形態は、図4に示すように、表示座標(x0,y0)から(x1,y1)にドラッグしたときに、クリッピング枠405からクリッピング枠407に変化する点は同じである。その後、表示座標(x1,y1)から(x0,y0)へ戻すドラッグ操作を行うときに、第1及び第2の実施形態は異なる。
【0044】
第1の実施形態は、図9に示すように、表示座標(x1,y1)から(x0,y0)へドラッグすると(910)、トリミング枠905からトリミング枠907へ変化する。すなわち、拡大率(画像サイズ)は変わらずにドラッグした主被写体のみが左へ移動する。
【0045】
これに対し、第2の実施形態は、図4のトリミング枠407から元のトリミング枠405へ戻る。すなわち、表示座標系を(x0,y0)→(x1,y1)→(x0,y0)の順でドラッグすると、トリミング枠405→トリミング枠407→トリミング枠405の順で変化する。第2の実施形態は可逆性があり、第1の実施形態は可逆性がない。
【0046】
(第2の実施形態の効果)
本実施形態によると、トリミング枠内の印刷領域のみを表示しながら、マウスやペンなどで画像の任意の部分を指定して、そこをつかんだままドラッグしたときに、必要に応じて画像が拡大され、好みの位置まで画像を移動することができるだけでなく、一連のドラッグ中にマウスの移動方向が逆になったときに、ドラッグ開始の状態を限度として画像を縮小する。これにより、マウスを必要以上に移動させて画像が大きくなりすぎた場合に、マウスを逆方向に移動することで、元の画像の大きさに近づけることが可能となる。
【0047】
(第3の実施形態)
図3は、本発明の第3の実施形態による画像編集方法の処理を示すフローチャートである。以下、フローチャートに従い本発明の第3の実施形態を説明する。マウスのドラッグ操作が行われると、以下の処理が開始する。
【0048】
ステップS301では、初期状態での、画像座標系上のクリッピング枠(トリミング枠)の位置、幅、高さを求める。画像座標系におけるクリッピング枠の左上の点の位置を(Isx,Isy)、クリッピング枠の幅と高さを(Isw,Ish)とする。
【0049】
ステップS302では表示メモリ座標系における移動開始前のマウスの位置座標(sx0,sy0)を取得する。
【0050】
ステップS303 では、その時点での、画像座標系上のクリッピング枠の位置、幅、高さを求める。すなわち、画像座標系におけるクリッピング枠の左上の点の位置を(Ix,Iy)、クリッピング枠の幅と高さを(Iw,Ih)へ代入する。
【0051】
ステップS304では表示メモリ座標系における移動開始前のマウスの位置座標を取得し(x0,y0)へ代入する。
【0052】
ステップS305ではマウスの動きを捕捉するためにあらかじめ設定された一定時間の待ちを設ける。
【0053】
ステップS306では表示メモリ座標系における移動後のマウスの位置座標を取得し(x1,y1)へ代入する。
【0054】
ステップS307では新たなクリッピング枠の位置(x',y')、幅w'、高さh'を求める。x,'y',w',h'の算出方法は後に説明する。ただし、拡大率の計算は行わない。
【0055】
ステップS308では、ステップS307で求めた、x,'y',w',h'で指定される新たなクリッピング枠内の画像を読み出し、表示メモリ座標系へ描画する。第1の実施形態との違いは、ここで拡大処理を行わずにディスプレイに表示することである。この表示の説明は、後に図8を参照しながら説明する。
【0056】
ステップS309で、マウスのドラッグが終了したかどうかを判定し、終了していればステップS310に進み、終了していなければステップS303に戻る。
【0057】
ステップS310では新たなクリッピング枠の位置(x',y')、幅w'、高さh'を求めると共に拡大率を求める。x,'y',w',h'の算出方法は第1及び第2の実施形態と同様である。このとき、元のクリッピング領域としては、ステップS301,S302で取得した、初期状態のクリッピング領域の情報(Isx,Isy,Isw,Ish)及びマウス位置の情報(sx0,sy0)を用いる。
【0058】
ステップS311では、ステップS310で求めた、x,'y',w',h'で指定される新たなクリッピング枠内の画像を読み出し、もとめた拡大率で表示メモリ座標系へ描画する。この表示は、上記の図4及び図5の表示方法と同じである。
【0059】
図8は、上記のステップS308での表示方法を示す。ユーザが表示座標系803において、表示座標(x0,y0)から(x1,y1)へドラッグしながらマウスポインタを移動させる場合を説明する。この際、ユーザは、ドラッグ操作中であり、左ボタンを押しつづけたままである。移動前の画像座標系801は、ステップS303及びS304で取得したトリミング枠805及びマウス位置806を示す。移動後の画像座標系802は、ステップS306,S307で取得するマウス位置808及びトリミング枠807を示す。すなわち、ドラッグ操作中のステップS308では、マウス移動に応じた画像の移動のみを行い、拡大(縮小)は行わない。移動後のトリミング枠807は、画像の外郭804をはみ出し、画像データのない領域を含む。画像データのない領域は、例えば白データとしてディスプレイ上に表示される。そして、ドラッグ操作終了後のステップS311で、第1及び第2の実施形態と同様に、ドラッグに応じた画像の移動及び拡大を行う。
【0060】
次に、ステップS307における移動後の画像座標系802の算出方法を説明する。具体的には、トリミング枠807の位置(x',y')、幅w'、高さh'の算出方法を示す。なお、ここでは説明を容易にするために、マウスの動きを横方向に左から右へ、すなわちX軸の正方向に動かす場合について説明する。逆方向、上下方向、斜め方向についても同様の方法で可能である。
【0061】
x'=x0-x1
y'=y
w'=w
h'=h
【0062】
(第3の実施形態の効果)
第3の実施形態によれば、ドラッグによる移動指示中には演算された画像の移動量に応じて画像サイズを変えずに画像データを表示し、ドラッグによる移動指示終了のドロップ時には演算された画像の移動量及び拡大率に応じて画像データを表示する。
本実施形態によると、トリミング枠内の印刷領域のみを表示しながら、マウスやペンなどで画像の任意の部分を指定して、そこをつかんだままドラッグしたときに、ドラッグ継続中は画像サイズが不変で移動し、好みの位置でドロップすると、必要に応じて画像が拡大される。これは、画像を移動してから、拡大しているという動作がわかり易いという効果がある。
【0063】
(第4の実施形態)
上記の実施形態は表示用メモリ座標系と画像データ上の位置を表現するための画像座標系という二つの座標系を用いて説明していたが、第4の実施形態では、画像データ上の位置を表現するための画像座標系のみでトリミングを行う場合に、トリミング枠の縮小とトリミング枠の移動が同時に行える方法を説明する。
【0064】
図10は、画像上にトリミング枠1001が重ねて表示されており、ユーザはこのトリミング枠を操作して、画像のトリミング位置を決定する。このとき、トリミングの枠の部分をドラッグすれば、トリミングの枠の大きさは変化して、トリミング枠の縮小が行える。また、トリミング枠の内部をドラッグすれば、トリミング枠の移動を行うことができる。したがって、縮小と移動を行う場合には、2ステップの動作となる。
【0065】
そこで、本実施形態では、図10の斜め縞模様で示された分割点エリア1002をドラッグすると縮小と移動を同時に行うことができる方法を説明する。
【0066】
図11の1101はトリミング作業が行われる前の画像全体1103の中のトリミング領域1104と分割点エリア1105を表している。また、1102はトリミング作業後の画像全体1106の中のトリミング領域1107と分割点エリア1108を表している。
【0067】
トリミング作業前のトリミング領域1104は、左上端の位置が(x, y)であり、幅がwであり、高さがhである。トリミング作業後のトリミング領域1107は、左上端の位置が(x', y')であり、幅がw'であり、高さがh'である。
【0068】
また、トリミング作業前の分割点エリア内のドラッグ開始座標を(x0, y0)、 トリミング作業後の分割点エリア内のドラッグ終了座標を(x1, y1 )とする。
【0069】
ドラッグ操作中は常にユーザとしては、分割点エリア内での座標位置は変わらず、分割エリア外の枠の大きさや場所が移動することになる。すなわち、移動前後の点の位置を画像データ上の不動点としてかつ、トリミング領域内に空白ができないように、トリミング領域の位置及び拡大率(縮小を含む)を演算する。
【0070】
ここで、分割点エリア1105をドラッグしたときの動作について、図12のフローチャートで説明する。
【0071】
ドラッグ開始後、ステップS1201において、画像座標系におけるマウスの位置(x0, y0)を取得する。
【0072】
ステップS1202ではマウスの動きを捕捉するためにあらかじめ設定された一定時間の待ちを設ける。
【0073】
ステップS1203では、画像座標系における移動後のマウスの位置(x1, y1)を取得する。
【0074】
ステップS1204では、新たなトリミング領域座標(x',y')、幅(w')、高さ(h')を求める。すなわち、新たなトリミング領域の位置及び拡大率(縮小を含む)を演算する。x,'y',w',h'の算出方法については後述する。
【0075】
ステップS1205では、ステップS1204で求めた、x,'y',w',h'で指定される新たなトリミング領域を描画する。
【0076】
ステップS1206では、マウスのドラッグが終了したかどうかを判定し、終了していれば処理を終わり、終了していなければステップS1201に戻る。すなわち、移動中及び移動後に、新たなトリミング領域の位置及び拡大率を演算して描画する。
【0077】
次にステップS1204における、トリミング領域の枠の位置(x',y')、幅(w')、高さ(h')の算出方法を示す。
【0078】
ここでは説明を容易にするために、マウスの動きを横方向に左から右へ、すなわちX軸の正方向に動かす場合について説明する。逆方向、上下方向、斜め方向についても同様の方法で可能である。
【0079】
新たなトリミング枠の位置、幅、高さを求める方法は、初期状態において2つの場合に分けて考える。1つは、図11の1101に示したように、トリミング枠が画像の外郭と接している場合1101、すなわちx=0の場合である。もう1つは、トリミング枠が画像の外郭と接していない場合すなわちx≠0の場合である。
【0080】
x=0の場合は、次式で求められる。
x'=0(画像の左端辺と接しているから)-------(7)
w'=w×x0/x1--------(8)
h'=h×w'/w ---------(9)
y'=y+h×y0/cHeight-h'×y1/cHeight----(10)
【0081】
一方、x≠0の場合は、トリミング領域の大きさは変わらず、移動のみなので、次式で求められる。
w'=w --------------(11)
x'=x-(x1-x0)×w/cWidth ------(12)
y'=y
h'=h
【0082】
(第4の実施形態の効果)
本実施形態によると、印刷領域のみを表示しながら、マウスやペンなどで印刷領域の特定の部分を指定して、そこをつかんだままドラッグしたときに、必要に応じて印刷領域枠が縮小され、好みの大きさ・位置まで印刷領域を移動することができる。
例えば、中央部に人物が映っている画像をトリミングにより、人物を右端に寄せたい場合、従来は、印刷領域をいったん縮小してから、移動する必要があったが、本実施形態によれば、右上の分割点エリアを人物の位置にまでドラッグするだけで、必要に応じて印刷領域枠が縮小されるため、1回の操作で好ましい構図の画像を得ることが可能となる。
【0083】
(第5の実施形態)
上記の実施形態では、選択したトリミング枠は縮小しかしなかったが、本実施形態ではトリミング開始時のトリミング枠の大きさを記憶しておき、トリミング時の動作によって、トリミング領域枠が拡大・縮小する動作を図13のフローチャートにしたがって、説明する。
【0084】
ステップS1301において、トリミング領域枠を記憶する。
【0085】
ステップS1302において、画像座標系におけるマウスの位置(x0, y0)を取得する。
【0086】
ステップS1303ではマウスの動きを捕捉するためにあらかじめ設定された一定時間の待ちを設ける。
【0087】
ステップS1304では、画像座標系における移動後のマウスの位置(x1, y1)を取得する。
【0088】
ステップS1305では、新たなトリミング領域座標(x',y')、幅(w')、高さ(h')を求める。すなわち、新たなトリミング領域の位置及び拡大率(縮小を含む)を演算する。x,'y',w',h'の算出方法については後述する。
【0089】
ステップS1306では、ステップS1305で求めた、x,'y',w',h'で指定される新たなトリミング領域を描画する。
【0090】
ステップS1307では、マウスのドラッグが終了したかどうかを判定し、終了していれば処理を終わり、終了していなければステップS1302 に戻る。
【0091】
新たなトリミング枠の位置、幅、高さを求める方法は、図14を用いて説明する。
【0092】
ここでは話を簡単にするために、x'座標および幅w'を一次元座標で、右から左に分割点エリアをドラッグした場合の座標を求める方法について説明する。
【0093】
まずトリミング時の画像とトリミング領域枠を表したのが1401である。トリミング枠の幅はwである。(分割点からトリミング枠の左端までの長さ):(分割点からトリミング枠の右端までの長さ)=α:(1−α)で表される。
【0094】
次に、トリミングを行っている途中に移動領域が画像の外にはみ出したものが1402である。このときの座標をxとする。
【0095】
次に、1403で最終的にトリミング枠を縮小して、画像中に収まるようにしたものである。このときの座標と幅をx', w'とすると、以下の式が成り立つ。
x + wα = x'+ w'α
【0096】
ここで、x' = 0なので、w' = (1/α)x+wが成り立ち、これを2次元に拡張することにより、トリミング枠の位置と大きさが取得可能である。
【0097】
以上のようにして、最初のトリミング枠を覚えていることにより、トリミング枠を移動させるだけで、トリミング枠の拡大・縮小を同時に行うことが可能である。
【0098】
ここで、分割点エリアの位置は本実施形態では四カ所であるが、分割点エリアの数は任意に増やすことが可能である。
【0099】
また、本実施形態では、例えば分割点の位置はトリミング枠の三分割点である。三分割点は、(トリミング枠の一端と分割点との間の長さ):(トリミング枠の他端と分割点との間の長さ)=2:1の条件を満たす分割点である。
【0100】
また、分割点エリアの位置は三分割点に限らず、トリミング枠の黄金分割点など、その他の画像の構図上重要な位置に配置しても良い。黄金分割点は、(トリミング枠の一端と分割点との間の長さ):(トリミング枠の他端と分割点との間の長さ)=((√5)−1):2の条件を満たす分割点である。
【0101】
第4の実施形態では、移動中の状態を基にトリミング領域の位置及び拡大率を演算して描画したが、第5の実施形態では、ステップS1301で移動前のトリミング領域枠を記憶し、移動前の状態を基に拡大率を演算して描画する。
【0102】
(第5の実施形態の効果)
本実施形態によると、印刷領域のみを表示しながら、マウスやペンなどで印刷領域の特定の部分を指定して、そこをつかんだままドラッグしたときに、必要に応じて印刷領域枠が拡大・縮小され、好みの大きさ・位置まで印刷領域を移動することができる。
例えば、中央部に人物が映っている画像をトリミングにより、人物を右端に寄せたい場合、従来は、印刷領域をいったん縮小してから、移動する必要があったが、本実施形態によれば、右上の分割点エリアを人物の位置にまでドラッグするだけで、必要に応じて印刷領域枠が縮小されるため、1回の操作で好ましい構図の画像を得ることが可能となる。
また、ドラッグ開始時のトリミング枠を記憶しているため、ドラッグ操作中はドラッグ開始時の矩形に戻ることができる。
【0103】
上記実施形態は、コンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体又はかかるプログラムを伝送するインターネット等の伝送媒体も本発明の実施形態として適用することができる。また、上記のプログラムを記録したコンピュータ読み取り可能な記録媒体等のプログラムプロダクトも本発明の実施形態として適用することができる。上記のプログラム、記録媒体、伝送媒体及びプログラムプロダクトは、本発明の範疇に含まれる。記録媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
【0104】
なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。
【0105】
【発明の効果】
以上説明したように、本発明によれば、画像表示領域の画像の任意の点を移動指示すると、必要に応じて画像が拡大され、指示された位置まで画像を移動させることができる。例えば、画像中の中央部の人物を右端に寄せたい場合、1回の人物の移動指示操作で所望の移動及び拡大をし、好ましい構図の画像を得ることができる。また、移動指示中に、演算された画像の移動量及び/又は拡大率に応じて画像データを表示することにより、編集後の構図を把握しながらトリミングを行うことができる。
【図面の簡単な説明】
【図1】本発明の第1〜第3の実施形態における画像編集装置のハードウエア構成例を示す図である。
【図2】本発明の第1の実施形態のフローチャートである。
【図3】本発明の第3の実施形態のフローチャートである。
【図4】画像座標系と表示メモリ座標系を示す図である。
【図5】画像座標系と表示メモリ座標系を示す図である。
【図6】従来技術によるトリミング例を示す図である。
【図7】本発明の第2の実施形態のフローチャートである。
【図8】画像座標系と表示メモリ座標系を示す図である。
【図9】画像座標系と表示メモリ座標系を示す図である。
【図10】本発明の第4の実施形態における画像座標系での印刷領域と分割点エリアを示す図である。
【図11】本発明の第4の実施形態における画像座標系を示す図である。
【図12】本発明の第4の実施形態のフローチャートである。
【図13】本発明の第5の実施形態のフローチャートである。
【図14】本発明の第5の実施形態を説明する図である。
【符号の説明】
101 CPU
102 ROM
103 RAM
104 ハードディスクドライブ
105 記憶装置
106 ディスプレイ
107 メモリカードインタフェース
108 マウス
109 プリンタ
110 バス[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image editing technique, and more particularly to a technique for adjusting the composition of an image while displaying and / or printing a still image or a moving image taken by a digital still camera or a digital video camera.
[0002]
[Prior art]
A general function is to capture image data captured by a digital camera, display the image data on a display device, designate an arbitrary region of the image as a trimming region using a pointer device such as a mouse or a remote controller, and print the image. FIG. 6 shows an example of a very general trimming process. That is, in FIG. 6, the
[0003]
On the other hand, as a conventional technique of different operation formats for obtaining a similar trimmed image, for example, as in
[0004]
As another prior art, as shown in Patent Document 3 below, image data in which a person's face is copied is displayed, two predetermined locations are indicated by an instruction means, and output is based on the two specified points. A method is also known in which the face size and the enlargement / reduction ratio of an image at a position that are optimal for the paper size are obtained and the image is printed at a predetermined position.
[0005]
[Patent Document 1]
JP 2000-83222 A
[Patent Document 2]
JP 2000-217042 A
[Patent Document 3]
Japanese Patent Laid-Open No. 11-341272
[0006]
[Problems to be solved by the invention]
However, in the trimming operation of the type shown in FIG. 6, it is easy to see which part of the original image is to be cut out in order to reduce and move the trimming frame while looking at the entire image, but it is printed in the actual print area. There is a drawback that it is difficult to grasp the impression obtained from the composition of time.
[0007]
On the other hand, the methods of
[0008]
Patent Document 3 aims to make the size and position of the face suitable for the size of the paper to be printed when creating the ID photo. The point specified by the user is the vertex of the head in advance. It is determined like the tip of the chin, and its use is different from that of general snapshot angle-of-view correction.
[0009]
An object of the present invention is to provide an image editing technique capable of moving and enlarging (reducing) only by a user performing a one-step operation.
Another object of the present invention is to provide an image editing technique capable of performing trimming while grasping the composition at the time of printing.
[0010]
[Means for Solving the Problems]
According to one aspect of the present invention, an instruction step for inputting an instruction for moving a trimming region with respect to image data, and a calculation step for calculating a movement amount and an enlargement ratio of the trimming region according to the instruction, In the calculation step, when the movement of the trimming area is instructed beyond the edge of the image data, the trimming area is reduced according to the amount of movement exceeding the edge of the image data.
According to another aspect of the present invention, there is provided an instruction unit that inputs an instruction for moving a trimming region with respect to image data, and an arithmetic unit that calculates a movement amount and an enlargement ratio of the trimming region according to the instruction. When the movement of the trimming area is instructed beyond the edge of the image data, the calculation means reduces the trimming area according to the amount of movement exceeding the edge of the image data.
According to still another aspect of the present invention, an instruction step for inputting an instruction for moving a trimming area with respect to image data, and a calculation step for calculating a movement amount and an enlargement ratio of the trimming area according to the instruction are performed by a computer. When the movement of the trimming area is instructed beyond the edge of the image data, the calculation step reduces the trimming area according to the amount of movement exceeding the program data. A program is provided.
According to still another aspect of the present invention, an instruction step for inputting an instruction for moving a trimming area with respect to image data, and a calculation step for calculating a movement amount and an enlargement ratio of the trimming area according to the instruction are performed by a computer. A computer-readable recording medium storing a program to be executed in accordance with the amount of movement exceeding when the movement of the trimming area is instructed beyond the edge of the image data A recording medium characterized by reducing a trimming area is provided.
[0011]
According to the present invention, when an arbitrary point of an image in the image display area is instructed to move, the image is enlarged as necessary, and the image can be moved to the instructed position. For example, when it is desired to bring the central person in the image to the right end, a desired movement and enlargement can be performed by a single person movement instruction operation, and an image with a preferred composition can be obtained. Further, by displaying the image data according to the calculated movement amount and / or enlargement ratio of the image during the movement instruction, it is possible to perform trimming while grasping the composition after editing.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
(First embodiment)
FIG. 1 shows a hardware configuration of an image editing apparatus according to first to fifth embodiments of the present invention. 101 is a CPU (central processing unit) that executes a computer software program, 102 is a ROM (read only memory) that stores the program, 103 is a RAM (random access memory) that is used when the program is executed, and 104 is a program storage Hard disk drive (HDD) 105, a storage device for storing programs and data in a medium such as a flexible disk or an MO (magneto-optical disk), and 106 for displaying program execution results and execution status A
[0013]
In the present embodiment, an image is displayed after the
[0014]
(Description of display memory coordinate system)
The display memory coordinate system is indicated by
[0015]
(Description of image coordinate system)
An image coordinate system, which is another coordinate system, is shown at 501 and 502 in FIG.
[0016]
For example, the user can perform trimming to configure an appropriate composition by changing the position of the main subject displayed on the display. First, the user moves the position of the main subject by moving the mouse pointer to the display coordinate system (x0, y0) where the main subject is located and dragging from the display coordinate system (x0, y0) to (x1, y1). Can be moved from the middle to the right. When the mouse pointer is moved by a drag operation, the main subject moves so as to follow the mouse pointer. Accordingly, the mouse positions 506 and 508 in the image coordinate system before and after the movement both indicate the same main subject position. In the display coordinate system, the main subject was instructed to move from (x0, y0) to (x1, y1) to the right, so in the image coordinate system, the main
[0017]
Next, the display coordinate
[0018]
As in FIG. 5, a case will be described in which the display coordinate system (x0, y0) is moved to (x1, y1) by a mouse drag operation. As in FIG. 5, if the
[0019]
As described above, when an instruction to move the
[0020]
FIG. 2 is a flowchart showing the processing of the image editing method according to the first embodiment of the present invention. The first embodiment of the present invention will be described below according to the flowchart. When the mouse is dragged, the following processing is started.
[0021]
In step S201, the position (Ix, Iy), width Iw, and height Ih of the clipping frame (trimming frame) on the image coordinate system at that time are obtained. That is, as shown in FIGS. 4 and 5, the position of the upper left point of the
[0022]
In step S202, the position coordinates of the mouse before the movement start in the display memory coordinate system are acquired and substituted into (x0, y0).
[0023]
In step S203, a predetermined time waiting is set in order to capture the movement of the mouse.
[0024]
In step S204, the position coordinates of the mouse after movement in the display memory coordinate system are acquired and substituted into (x1, y1).
[0025]
In step S205, as shown in FIGS. 4 and 5, the position (x ′, y ′), width w ′, and height h ′ of the new clipping frames 407 and 507 are obtained and the enlargement ratio is obtained. A method of calculating x, 'y', w ', h' will be described later.
[0026]
In step S206, the images in the new clipping frames 407 and 507 designated by x, 'y', w ', and h' obtained in step S205 are read and drawn in the display memory coordinate system at the obtained enlargement ratio. Thereby, an image is displayed on the display.
[0027]
In step S207, it is determined whether or not the mouse drag has ended. If it has ended, the process ends. If not, the process returns to step S201 to repeat the same process. When the processing is completed, the trimmed image is printed or saved. The clipping frame is an image print area indicating an image area to be printed. When the user instructs printing of the image displayed in the clipping frame, the image in the clipping frame is printed.
[0028]
By performing the above image editing process, the main subject is moved and / or enlarged so that it follows the mouse pointer during the drag operation and is displayed at any time, so trimming while grasping the composition at the time of printing Can do.
[0029]
Next, a calculation method of the position (x ′, y ′), width w ′, and height h ′ of the clipping frame in step S205 will be described. Here, for ease of explanation, a case will be described in which the movement of the mouse is moved laterally from left to right, that is, in the positive direction of the X axis. The same method can be used for the reverse direction, the vertical direction, and the diagonal direction.
[0030]
The method for obtaining the position, width and height of a new clipping frame is considered in two cases in the initial state. One is a case where the
[0031]
In the case of x = 0 in FIG.
x '= 0 (because it touches the left edge of the image) ------- (1)
w '= w × x0 / x1 -------- (2)
h '= h × w' / w --------- (3)
y '= y + h × y0 / cHeight-h' × y1 / cHeight ---- (4)
[0032]
In the case of x ≠ 0 in FIG.
w '= w -------------- (5)
x '= x- (x1-x0) × w / cWidth ------ (6)
y '= y
h '= h
[0033]
(Effects of the first embodiment)
According to the first embodiment, when an arbitrary point of the image displayed in the image display area of the image data is instructed to move, the moving amount and the enlargement ratio of the image are calculated according to the moving instruction, and the calculation is performed. A predetermined area of the image data is displayed in the image display area according to the moving amount and enlargement ratio of the image.
According to this embodiment, while displaying only the print area in the trimming frame, when you specify an arbitrary part of the image with a mouse or pen and drag it while holding it, the image is enlarged as necessary The image can be moved to a desired position. For example, when it is desired to bring a person to the right end by trimming an image in which a person is shown in the center, it has been necessary to zoom in and then move, but according to this embodiment, the position to be arranged By simply dragging the person portion, the person moves and the image is enlarged as necessary, so that it is possible to obtain an image with a preferable composition in one operation.
[0034]
(Second Embodiment)
FIG. 7 is a flowchart showing the processing of the image editing method according to the second embodiment of the present invention. The second embodiment of the present invention will be described below according to the flowchart. When the mouse is dragged, the following processing is started.
[0035]
In step S701, the current position (Ix, Iy), width Iw, and height Ih of the clipping frame (trimming frame) on the image coordinate system are obtained. Similarly to the above, the position of the upper left point of the clipping frame in the image coordinate system is substituted into (Ix, Iy), and the width and height of the clipping frame are substituted into (Iw, Ih).
[0036]
In step S702, the position coordinates of the mouse before the start of movement in the display memory coordinate system are acquired and substituted into (x0, y0).
[0037]
In step S703, a predetermined time waiting is set in order to capture the movement of the mouse.
[0038]
In step S704, the position coordinate of the mouse after movement in the display memory coordinate system is acquired and substituted into (x1, y1).
[0039]
In step S705, the position (x ′, y ′), width w ′, and height h ′ of the new clipping frame are obtained, and the enlargement ratio is obtained. The calculation method of x, 'y', w ', h' is basically the same as in the first embodiment. Details thereof will be described later.
[0040]
In step S706, the image in the new clipping frame specified by x, 'y', w ', h' obtained in step S705 is read and drawn in the display memory coordinate system at the obtained enlargement ratio. Thereby, an image is displayed on the display.
[0041]
In step S707, it is determined whether or not the dragging of the mouse has ended. If it has ended, the process ends. If not, the process returns to step S703. This return destination is a clear difference from the first embodiment. In the first embodiment, the process returns to the first step S201.
[0042]
In step S705 of the second embodiment (FIG. 7), the new clipping frame is always obtained as the initial unchanging clipping frame information Ix, Iy, Iw, Ih and the mouse position at the start of the movement instruction acquired in steps S701 and S702. Calculate using (x0, y0). On the other hand, in step S205 of the first embodiment (FIG. 2), the new clipping frame changes the clipping frame information Ix, Iy, Iw, which changes during the drag (movement instruction) acquired in steps S201 and S202. Calculate using Ih and mouse position (x0, y0).
[0043]
As shown in FIG. 4, the first and second embodiments are the same in that the clip changes from the
[0044]
In the first embodiment, as shown in FIG. 9, when the display coordinate (x1, y1) is dragged to (x0, y0) (910), the
[0045]
In contrast, the second embodiment returns from the
[0046]
(Effect of 2nd Embodiment)
According to this embodiment, while displaying only the print area in the trimming frame, when you specify an arbitrary part of the image with a mouse or pen and drag it while holding it, the image is enlarged as necessary Thus, not only can the image be moved to a desired position, but also when the moving direction of the mouse is reversed during a series of drags, the image is reduced with the drag start state as a limit. Thereby, when the mouse is moved more than necessary and the image becomes too large, the size of the original image can be brought close by moving the mouse in the reverse direction.
[0047]
(Third embodiment)
FIG. 3 is a flowchart showing the processing of the image editing method according to the third embodiment of the present invention. The third embodiment of the present invention will be described below according to the flowchart. When a mouse drag operation is performed, the following processing starts.
[0048]
In step S301, the position, width, and height of the clipping frame (trimming frame) on the image coordinate system in the initial state are obtained. The position of the upper left point of the clipping frame in the image coordinate system is (Isx, Isy), and the width and height of the clipping frame are (Isw, Ish).
[0049]
In step S302, the mouse position coordinates (sx0, sy0) before the movement start in the display memory coordinate system are acquired.
[0050]
In step S303, the position, width, and height of the clipping frame on the image coordinate system at that time are obtained. That is, the position of the upper left point of the clipping frame in the image coordinate system is substituted into (Ix, Iy), and the width and height of the clipping frame are substituted into (Iw, Ih).
[0051]
In step S304, the position coordinates of the mouse before starting movement in the display memory coordinate system are acquired and substituted into (x0, y0).
[0052]
In step S305, a predetermined waiting time is set in order to capture the movement of the mouse.
[0053]
In step S306, the position coordinates of the mouse after movement in the display memory coordinate system are acquired and substituted into (x1, y1).
[0054]
In step S307, a new clipping frame position (x ', y'), width w ', and height h' are obtained. A method for calculating x, 'y', w ', h' will be described later. However, the enlargement ratio is not calculated.
[0055]
In step S308, the image in the new clipping frame specified by x, 'y', w ', h' obtained in step S307 is read and drawn in the display memory coordinate system. The difference from the first embodiment is that the image is displayed on the display without performing the enlargement process. This display will be described later with reference to FIG.
[0056]
In step S309, it is determined whether or not the mouse drag is finished. If finished, the process proceeds to step S310, and if not finished, the process returns to step S303.
[0057]
In step S310, the position (x ′, y ′), width w ′, and height h ′ of the new clipping frame are obtained, and the enlargement ratio is obtained. The calculation method of x, 'y', w ', h' is the same as in the first and second embodiments. At this time, as the original clipping region, the information (Isx, Isy, Isw, Ish) of the clipping region in the initial state and the information (sx0, sy0) of the mouse position acquired in steps S301 and S302 are used.
[0058]
In step S311, the image in the new clipping frame specified by x, 'y', w ', h' obtained in step S310 is read and drawn in the display memory coordinate system at the obtained enlargement ratio. This display is the same as the display method shown in FIGS.
[0059]
FIG. 8 shows the display method in step S308 described above. A case where the user moves the mouse pointer in the display coordinate
[0060]
Next, a method for calculating the image coordinate
[0061]
x '= x0-x1
y '= y
w '= w
h '= h
[0062]
(Effect of the third embodiment)
According to the third embodiment, image data is displayed without changing the image size according to the calculated movement amount of the image during the movement instruction by dragging, and the calculated image is dropped when the movement instruction ends by dragging. The image data is displayed according to the movement amount and the enlargement ratio.
According to the present embodiment, when only a print area within the trimming frame is displayed and an arbitrary part of the image is designated with a mouse or a pen and dragged while holding the image, the image size is kept during the dragging. Move invariantly and drop at the desired position, the image will be enlarged as needed. This has the effect that the operation of enlarging after moving the image is easy to understand.
[0063]
(Fourth embodiment)
The above embodiment has been described using two coordinate systems, the display memory coordinate system and the image coordinate system for expressing the position on the image data. In the fourth embodiment, the position on the image data is used. A method for reducing the trimming frame and moving the trimming frame at the same time when trimming is performed only in the image coordinate system for expressing the above will be described.
[0064]
In FIG. 10, a
[0065]
Therefore, in the present embodiment, a method will be described in which reduction and movement can be performed simultaneously by dragging the
[0066]
[0067]
In the
[0068]
Also, the drag start coordinates in the division point area before the trimming operation are (x0, y0), and the drag end coordinates in the division point area after the trimming operation are (x1, y1).
[0069]
During the drag operation, as a user, the coordinate position in the dividing point area does not change, and the size and location of the frame outside the dividing area move. That is, the position and enlargement ratio (including reduction) of the trimming area are calculated so that the positions of the points before and after the movement are fixed points on the image data and no blank is formed in the trimming area.
[0070]
Here, the operation when the
[0071]
After the start of dragging, in step S1201, the position (x0, y0) of the mouse in the image coordinate system is acquired.
[0072]
In step S1202, a predetermined time waiting is set in order to capture the movement of the mouse.
[0073]
In step S1203, the position (x1, y1) of the mouse after movement in the image coordinate system is acquired.
[0074]
In step S1204, new trimming area coordinates (x ′, y ′), width (w ′), and height (h ′) are obtained. That is, the position and enlargement ratio (including reduction) of the new trimming area are calculated. A method of calculating x, 'y', w ', h' will be described later.
[0075]
In step S1205, a new trimming area specified by x, 'y', w ', h' obtained in step S1204 is drawn.
[0076]
In step S1206, it is determined whether or not the drag of the mouse has ended. If it has ended, the process ends. If it has not ended, the process returns to step S1201. In other words, the position and enlargement ratio of the new trimming area are calculated and drawn during and after the movement.
[0077]
Next, a calculation method of the frame position (x ′, y ′), width (w ′), and height (h ′) of the trimming area in step S1204 will be described.
[0078]
Here, for ease of explanation, a case will be described in which the movement of the mouse is moved laterally from left to right, that is, in the positive direction of the X axis. The same method can be used for the reverse direction, the vertical direction, and the diagonal direction.
[0079]
The method for obtaining the position, width, and height of a new trimming frame is considered in two cases in the initial state. One is the
[0080]
When x = 0, it is obtained by the following equation.
x '= 0 (because it touches the left edge of the image) ------- (7)
w '= w × x0 / x1 -------- (8)
h '= h × w' / w --------- (9)
y '= y + h × y0 / cHeight-h' × y1 / cHeight ---- (10)
[0081]
On the other hand, when x ≠ 0, the size of the trimming area does not change and is only moved, and therefore is obtained by the following equation.
w '= w -------------- (11)
x '= x- (x1-x0) × w / cWidth ------ (12)
y '= y
h '= h
[0082]
(Effect of the fourth embodiment)
According to this embodiment, when only a print area is displayed and a specific part of the print area is specified with a mouse or a pen and dragged while holding it, the print area frame is reduced as necessary. The printing area can be moved to a desired size / position.
For example, when it is desired to bring the person to the right end by trimming an image in which the person is reflected in the center, conventionally, it has been necessary to reduce the print area and then move it. By simply dragging the upper right division point area to the position of the person, the print area frame is reduced as necessary, so that an image with a preferable composition can be obtained with a single operation.
[0083]
(Fifth embodiment)
In the above embodiment, the selected trimming frame is only reduced, but in this embodiment, the size of the trimming frame at the start of trimming is stored, and the trimming area frame is enlarged / reduced by the operation at the time of trimming. The operation will be described with reference to the flowchart of FIG.
[0084]
In step S1301, the trimming area frame is stored.
[0085]
In step S1302, the position (x0, y0) of the mouse in the image coordinate system is acquired.
[0086]
In step S1303, a predetermined waiting time is set in order to capture the movement of the mouse.
[0087]
In step S1304, the position (x1, y1) of the mouse after movement in the image coordinate system is acquired.
[0088]
In step S1305, new trimming area coordinates (x ′, y ′), width (w ′), and height (h ′) are obtained. That is, the position and enlargement ratio (including reduction) of the new trimming area are calculated. A method of calculating x, 'y', w ', h' will be described later.
[0089]
In step S1306, a new trimming area specified by x, 'y', w ', h' obtained in step S1305 is drawn.
[0090]
In step S1307, it is determined whether or not the drag of the mouse has ended. If it has ended, the process ends. If it has not ended, the process returns to step S1302.
[0091]
A method for obtaining the position, width, and height of a new trimming frame will be described with reference to FIG.
[0092]
Here, for the sake of simplicity, a method for obtaining coordinates when the dividing point area is dragged from the right to the left with the x ′ coordinate and the width w ′ being one-dimensional coordinates will be described.
[0093]
First,
[0094]
Next,
[0095]
Next, in 1403, the trimming frame is finally reduced so that it fits in the image. If the coordinates and width at this time are x ′ and w ′, the following equation is established.
x + wα = x '+ w'α
[0096]
Here, since x ′ = 0, w ′ = (1 / α) x + w holds, and the position and size of the trimming frame can be acquired by extending this to two dimensions.
[0097]
As described above, by remembering the first trimming frame, it is possible to simultaneously enlarge and reduce the trimming frame simply by moving the trimming frame.
[0098]
Here, although there are four division point areas in this embodiment, the number of division point areas can be arbitrarily increased.
[0099]
In the present embodiment, for example, the position of the dividing point is the three dividing point of the trimming frame. The three division points are division points that satisfy the condition of (length between one end of the trimming frame and the division point) :( length between the other end of the trimming frame and the division point) = 2: 1.
[0100]
Further, the position of the dividing point area is not limited to three dividing points, and may be arranged at an important position in the composition of other images such as a golden dividing point of a trimming frame. The golden dividing point is (the length between one end of the trimming frame and the dividing point) :( the length between the other end of the trimming frame and the dividing point) = ((√5) −1): 2. This is a dividing point that satisfies.
[0101]
In the fourth embodiment, the position and enlargement ratio of the trimming area are calculated and drawn based on the moving state, but in the fifth embodiment, the trimming area frame before the movement is stored and moved in step S1301. Draw by calculating the magnification based on the previous state.
[0102]
(Effect of 5th Embodiment)
According to this embodiment, while displaying only the print area, when a specific part of the print area is specified with a mouse or a pen and dragged while grabbing it, the print area frame is enlarged or reduced as necessary. The print area is reduced and can be moved to a desired size / position.
For example, when it is desired to bring the person to the right end by trimming an image in which the person is reflected in the center, conventionally, it has been necessary to reduce the print area and then move it. By simply dragging the upper right division point area to the position of the person, the print area frame is reduced as necessary, so that an image with a preferable composition can be obtained with a single operation.
Further, since the trimming frame at the start of the drag is stored, the rectangle at the start of the drag can be returned during the drag operation.
[0103]
The above embodiment can be realized by a computer executing a program. Also, means for supplying a program to a computer, for example, a computer-readable recording medium such as a CD-ROM recording such a program, or a transmission medium such as the Internet for transmitting such a program is also applied as an embodiment of the present invention. Can do. A program product such as a computer-readable recording medium in which the above program is recorded can also be applied as an embodiment of the present invention. The above program, recording medium, transmission medium, and program product are included in the scope of the present invention. As the recording medium, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0104]
The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
[0105]
【The invention's effect】
As described above, according to the present invention, when an arbitrary point of an image in the image display area is instructed to move, the image is enlarged as necessary, and the image can be moved to the instructed position. For example, when it is desired to bring the central person in the image to the right end, a desired movement and enlargement can be performed by a single person movement instruction operation, and an image with a preferred composition can be obtained. Further, by displaying the image data according to the calculated movement amount and / or enlargement ratio of the image during the movement instruction, it is possible to perform trimming while grasping the composition after editing.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a hardware configuration example of an image editing apparatus according to first to third embodiments of the present invention.
FIG. 2 is a flowchart of the first embodiment of the present invention.
FIG. 3 is a flowchart of a third embodiment of the present invention.
FIG. 4 is a diagram illustrating an image coordinate system and a display memory coordinate system.
FIG. 5 is a diagram showing an image coordinate system and a display memory coordinate system.
FIG. 6 is a diagram illustrating a trimming example according to a conventional technique.
FIG. 7 is a flowchart of the second embodiment of the present invention.
FIG. 8 is a diagram showing an image coordinate system and a display memory coordinate system.
FIG. 9 is a diagram illustrating an image coordinate system and a display memory coordinate system.
FIG. 10 is a diagram illustrating a print area and a division point area in an image coordinate system according to a fourth embodiment of the present invention.
FIG. 11 is a diagram illustrating an image coordinate system according to a fourth embodiment of the present invention.
FIG. 12 is a flowchart of the fourth embodiment of the present invention.
FIG. 13 is a flowchart of the fifth embodiment of the present invention.
FIG. 14 is a diagram for explaining a fifth embodiment of the present invention.
[Explanation of symbols]
101 CPU
102 ROM
103 RAM
104 Hard disk drive
105 Storage device
106 display
107 Memory card interface
108 mouse
109 printer
110 bus
Claims (12)
前記指示に応じてトリミング領域の移動量および拡大率を演算する演算ステップとを有し、
前記演算ステップは、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とする画像編集方法。An instruction step for inputting an instruction to move the trimming region for the image data;
A calculation step of calculating a movement amount and an enlargement ratio of the trimming region according to the instruction,
In the image editing method, when the movement of the trimming area is instructed beyond the edge of the image data, the calculation step reduces the trimming area in accordance with the movement amount exceeding the edge.
前記指示に応じてトリミング領域の移動量および拡大率を演算する演算手段とを有し、
前記演算手段は、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とする画像編集装置。An instruction means for inputting an instruction for moving a trimming region for image data;
Calculating means for calculating the movement amount and enlargement ratio of the trimming region in accordance with the instruction,
When the movement of the trimming area is instructed beyond the edge of the image data, the calculation means reduces the trimming area according to the amount of movement exceeding the edge of the image data.
前記指示に応じてトリミング領域の移動量および拡大率を演算する演算ステップとをコンピュータに実行させるためのプログラムであって、
前記演算ステップは、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とするプログラム。An instruction step for inputting an instruction to move the trimming region for the image data;
A program for causing a computer to execute a calculation step for calculating a movement amount and an enlargement ratio of a trimming region according to the instruction,
In the calculation step, when the movement of the trimming area is instructed beyond the edge of the image data, the trimming area is reduced according to the amount of movement exceeding the edge of the image data.
前記指示に応じてトリミング領域の移動量および拡大率を演算する演算ステップとをコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、
前記演算ステップは、画像データの端を超えてトリミング領域の移動が指示された場合に、その超えた移動量に応じてトリミング領域を縮小することを特徴とする記録媒体。An instruction step for inputting an instruction to move the trimming region for the image data;
A computer-readable recording medium recording a program for causing a computer to execute a calculation step for calculating a movement amount and an enlargement ratio of a trimming region in accordance with the instruction,
In the recording step, when the movement of the trimming area is instructed beyond the edge of the image data, the trimming area is reduced according to the amount of movement exceeding the edge of the image data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003192014A JP4101129B2 (en) | 2002-09-30 | 2003-07-04 | Image editing method, image editing apparatus, program, and recording medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002286344 | 2002-09-30 | ||
JP2003192014A JP4101129B2 (en) | 2002-09-30 | 2003-07-04 | Image editing method, image editing apparatus, program, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004180267A JP2004180267A (en) | 2004-06-24 |
JP4101129B2 true JP4101129B2 (en) | 2008-06-18 |
Family
ID=32715574
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003192014A Expired - Lifetime JP4101129B2 (en) | 2002-09-30 | 2003-07-04 | Image editing method, image editing apparatus, program, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4101129B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4748401B2 (en) * | 2004-11-19 | 2011-08-17 | 富士フイルム株式会社 | Screen editing device, screen editing method, and screen editing program |
CN101297548A (en) * | 2005-10-26 | 2008-10-29 | 松下电器产业株式会社 | Image reproducing device, image recording device, image reproducing method, image recording method, and semiconductor integrated circuit |
WO2013073196A1 (en) * | 2011-11-18 | 2013-05-23 | 株式会社ニコン | Image editing device, image editing program, electronic information terminal device, pointing device, and input system |
JP6116167B2 (en) * | 2012-09-14 | 2017-04-19 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
JP6222951B2 (en) * | 2013-03-15 | 2017-11-01 | オリンパス株式会社 | Imaging apparatus, imaging system, and imaging method |
WO2014167675A1 (en) * | 2013-04-10 | 2014-10-16 | 株式会社 東芝 | Electronic device |
-
2003
- 2003-07-04 JP JP2003192014A patent/JP4101129B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004180267A (en) | 2004-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1408452B1 (en) | Image editing method, image editing apparatus, program for implementing image editing method, and recording medium recording program | |
EP2040246B1 (en) | Image display control apparatus and image display control method | |
JP2019075796A (en) | Electronic device and program | |
JP5757966B2 (en) | I / O device | |
JP4101129B2 (en) | Image editing method, image editing apparatus, program, and recording medium | |
JP2007041866A (en) | Information processing device, information processing method, and program | |
US20170038953A1 (en) | Display apparatus and display method for displaying main data and data related to that main data, and a memory medium | |
JP2565045B2 (en) | Scenario editing / presentation method and apparatus | |
JP2004128602A (en) | Image editing method, image editing apparatus, program, and recording medium | |
JP5484038B2 (en) | Image processing apparatus and control method thereof | |
JP4405750B2 (en) | Image editing device | |
JP2002209088A (en) | Image edit device and method | |
JP2002073240A (en) | Range designating device, range designating method and recording medium | |
JP4200960B2 (en) | Editing apparatus, editing method, and program | |
JP6026964B2 (en) | Information processing apparatus and control program | |
JP3607913B2 (en) | Image display device | |
KR20070092369A (en) | Image editing apparatus and recording medium thereof, and image editing method | |
JP2005031990A (en) | Image correction device | |
JP4288545B2 (en) | ID photo processing equipment | |
JP2740539B2 (en) | Enlarged reproduction image information creation method and apparatus | |
JP2007249909A (en) | Electronic comic producing device and reproduction control device | |
JP2006139466A (en) | Schedule display device capable of simultaneously displaying content | |
JPH04359379A (en) | Mirror symmetry editing system for graphic editing device | |
JPH0644354A (en) | Objective range display system for screen | |
JP2007011055A (en) | Image display device and image display method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060704 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071128 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071211 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080212 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080311 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080318 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110328 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120328 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130328 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140328 Year of fee payment: 6 |