JP5620313B2 - Image processing apparatus, method, and program - Google Patents

Image processing apparatus, method, and program Download PDF

Info

Publication number
JP5620313B2
JP5620313B2 JP2011059559A JP2011059559A JP5620313B2 JP 5620313 B2 JP5620313 B2 JP 5620313B2 JP 2011059559 A JP2011059559 A JP 2011059559A JP 2011059559 A JP2011059559 A JP 2011059559A JP 5620313 B2 JP5620313 B2 JP 5620313B2
Authority
JP
Japan
Prior art keywords
area
deformation
region
object area
unit
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
JP2011059559A
Other languages
Japanese (ja)
Other versions
JP2012194893A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2011059559A priority Critical patent/JP5620313B2/en
Publication of JP2012194893A publication Critical patent/JP2012194893A/en
Application granted granted Critical
Publication of JP5620313B2 publication Critical patent/JP5620313B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/80Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/38Circuits or arrangements for blanking or otherwise eliminating unwanted parts of pictures

Landscapes

  • Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)

Description

本発明の実施形態は、画像処理装置、方法、及びプログラムに関する。   Embodiments described herein relate generally to an image processing apparatus, a method, and a program.

処理対象となる原画像において、一のオブジェクト領域(建物や人物等)を検出し、当該オブジェクト領域を拡大しつつ、それ以外の領域を歪ませることにより、当該原画像のサムネイル画像を生成する画像処理装置がある。   An image that generates a thumbnail image of the original image by detecting one object region (building, person, etc.) in the original image to be processed and distorting the other region while enlarging the object region There is a processing device.

従来の画像処理装置では、オブジェクト領域が複数ある場合、一のオブジェクト領域を拡大すると、他のオブジェクト領域が歪んでしまう場合があり、ユーザにとって、原画像を特定しやすいサムネイル画像を生成することが困難であった。   In a conventional image processing apparatus, when there are a plurality of object areas, if one object area is enlarged, the other object areas may be distorted, and it is possible to generate a thumbnail image that makes it easy for the user to specify the original image. It was difficult.

このような画像処理装置では、ユーザが原画像を特定しやすいサムネイル画像を生成することができるものが望まれている。   Such an image processing apparatus is desired to be able to generate a thumbnail image that allows a user to easily specify an original image.

特開2006−313511号公報JP 2006-313511 A 特許第3482923号公報Japanese Patent No. 3482923

中村 徳裕、阿部 英彦、西尾 孝治、小堀 研一、“Delaunay三角形分割を用いた解像度変換に関する一手法”、画像電子学会誌、Vol.35、No.5、2005.Norihiro Nakamura, Hidehiko Abe, Koji Nishio, Kenichi Kobori, “A method for resolution conversion using Delaunay triangulation”, Journal of the Institute of Image Electronics Engineers of Japan, Vol.35, No.5, 2005. M. Kass, A. Witkin, and D. Terzopoulos, "Snakes: Active Contour Models." International Journal of Computer Vision, Vol.1, No.4, pp. 321-331, 1988.M. Kass, A. Witkin, and D. Terzopoulos, "Snakes: Active Contour Models." International Journal of Computer Vision, Vol.1, No.4, pp. 321-331, 1988.

本発明が解決しようとする課題は、ユーザが原画像を特定しやすいサムネイル画像を生成することができる画像処理装置、方法、及びプログラムを提供することである。   The problem to be solved by the present invention is to provide an image processing apparatus, method, and program capable of generating a thumbnail image that allows a user to easily specify an original image.

上記課題を解決するために、本発明の実施形態に係る画像処理装置は、検出部と、設定部と、算出部と、変形部とを備える。   In order to solve the above problems, an image processing apparatus according to an embodiment of the present invention includes a detection unit, a setting unit, a calculation unit, and a deformation unit.

検出部は、処理対象となる原画像から、第1オブジェクト領域および第2オブジェクト領域を検出する。設定部は、前記原画像から、前記第1オブジェクト領域を含み、前記第2オブジェクト領域を含まない変形領域を設定する。算出部は、前記変形領域内で、前記第1オブジェクト領域のサイズを拡大可能な拡大位置を探索するとともに、当該拡大位置での拡大倍率を算出する。変形部は、前記第1オブジェクト領域を探索された前記拡大位置において前記拡大倍率で拡大し、かつ前記変形領域内の残りの部分を変形処理するとともに、前記第2オブジェクト領域には変形処理を行わないか、変形処理を軽減することによって、変形した原画像を生成する。   The detection unit detects the first object region and the second object region from the original image to be processed. The setting unit sets, from the original image, a deformation area that includes the first object area and does not include the second object area. The calculation unit searches for an enlargement position where the size of the first object area can be enlarged in the deformation area, and calculates an enlargement magnification at the enlargement position. The deforming unit enlarges the first object area at the searched enlargement position at the enlargement magnification and performs a deformation process on the remaining part of the deformation area, and performs a deformation process on the second object area. The deformed original image is generated by reducing the deformation process.

第1の実施の形態に係る画像処理装置1による画像処理の説明図。Explanatory drawing of the image processing by the image processing apparatus 1 which concerns on 1st Embodiment. 原画像の説明図。Explanatory drawing of an original image. 画像処理装置1を表すブロック図。1 is a block diagram illustrating an image processing apparatus 1. FIG. 画像処理装置1の処理を表すフローチャート。4 is a flowchart showing processing of the image processing apparatus 1. 算出部14の処理を表すフローチャート。7 is a flowchart showing processing of the calculation unit 14. 算出部14の処理の説明図。Explanatory drawing of the process of the calculation part. 算出部14の処理の一部を表すフローチャート。10 is a flowchart showing a part of processing of a calculation unit 14; 候補点P’mを表す一例図。An example figure showing candidate point P'm. 区分部151の処理の説明図。Explanatory drawing of the process of the classification | category part 151. FIG. 領域変形部152の処理を表すフローチャート。The flowchart showing the process of the area | region deformation | transformation part 152. FIG. 領域305の変形処理の説明図。Explanatory drawing of the deformation | transformation process of the area | region 305. FIG. 領域306の変形処理の説明図。Explanatory drawing of the deformation | transformation process of the area | region 306. FIG. 対象オブジェクト領域301の拡大処理を表すフローチャート。5 is a flowchart showing enlargement processing of a target object area 301. 対象オブジェクト領域301の拡大処理の説明図。Explanatory drawing of the expansion process of the target object area | region 301. FIG. 第2の実施の形態における設定部13の処理を表すフローチャート。The flowchart showing the process of the setting part 13 in 2nd Embodiment. メッシュの一例図。An example figure of a mesh.

(第1の実施の形態)
第1の実施の形態に係る画像処理装置1は、原画像から、当該原画像のサムネイル画像を生成するためのものである。画像処理装置1は、例えば、テレビ、PC(パーソナルコンピュータ)、携帯情報端末、デジタルカメラ等、画像を表示可能な装置に用いられ得る。画像処理装置1は、原画像の中でユーザが注目する対象オブジェクトを含み、かつ他のオブジェクト領域を含まない変形領域を設定し、変形領域内において対象オブジェクトを移動及び拡大した変形画像を生成する。この変形画像を縮小することにより、サムネイル画像が得られる。
(First embodiment)
The image processing apparatus 1 according to the first embodiment is for generating a thumbnail image of an original image from the original image. The image processing apparatus 1 can be used for an apparatus capable of displaying an image, such as a television, a PC (personal computer), a portable information terminal, and a digital camera. The image processing apparatus 1 sets a deformation area that includes a target object that the user pays attention to in the original image and does not include other object areas, and generates a deformation image in which the target object is moved and enlarged in the deformation area. . A thumbnail image is obtained by reducing the deformed image.

図1は、画像処理装置1による画像処理の説明図である。画像処理装置1は、原画像において処理対象とする対象オブジェクト領域301を、変形領域302内において、その大きさが最も大きくなる位置に移動し、拡大する(図1(a)から図1(c)は、その過程を示す)。変形領域302とは、原画像の一部の領域であって、オブジェクト301の移動及び拡大を許可する領域である。   FIG. 1 is an explanatory diagram of image processing by the image processing apparatus 1. The image processing apparatus 1 moves and enlarges the target object region 301 to be processed in the original image to a position where the size of the target object region 301 becomes the largest in the deformation region 302 (FIG. 1 (a) to FIG. 1 (c). ) Shows the process). The deformation area 302 is a partial area of the original image and is an area where the movement and enlargement of the object 301 are permitted.

図2は、本実施形態における原画像の説明図である。2次元に分布する画素値を有する画像は、多数の小領域の集合(メッシュ)としても表現可能である。ここで、メッシュは、複数の頂点及び頂点どうしを接続する稜線(エッジ)で作られる三角形(パッチ)により表現されている。当該パッチは、三角形以外のその他の多角形でも構わない。   FIG. 2 is an explanatory diagram of an original image in the present embodiment. An image having pixel values distributed two-dimensionally can be expressed as a set (mesh) of a large number of small regions. Here, the mesh is expressed by a triangle (patch) made up of a plurality of vertices and ridge lines (edges) connecting the vertices. The patch may be a polygon other than a triangle.

一つの頂点は、位置(x,y)、及び、一つの頂点がどの頂点と接続されているかを示す接続情報(例えば、図2において、「頂点P1は、頂点P2〜頂点P8に接続」といった情報)により表わされてよい。各パッチには、各パッチを識別するためのパッチIDが付されていてよい。メッシュにおける各頂点には、各頂点を識別するための頂点IDが付されていてよい。   One vertex is position (x, y) and connection information indicating which vertex is connected to which vertex (for example, “vertex P1 is connected to vertex P2 to vertex P8 in FIG. 2”). Information). Each patch may be assigned a patch ID for identifying each patch. Each vertex in the mesh may be assigned a vertex ID for identifying each vertex.

例えば、入力画像が、JPEGやビットマップ画像等の画像であって、位置(x,y)および輝度Iで定義される座標空間で表現されている場合には、図示しない変換部を用いてメッシュの原画像に変換すればよい。例えば、非特許文献1記載の手法を用いて、JPEGやビットマップ画像等の画像を上記メッシュの原画像に変換することができる。ここでは、図16に示されるようなxy平面に加えて輝度Iを高さとした3次元座標(x,y,I)で表現されるメッシュであってよい。   For example, when the input image is an image such as a JPEG or bitmap image and is expressed in a coordinate space defined by the position (x, y) and the luminance I, a mesh unit is used by using a conversion unit (not shown). To the original image. For example, an image such as JPEG or a bitmap image can be converted into the original image of the mesh using the method described in Non-Patent Document 1. Here, in addition to the xy plane as shown in FIG. 16, it may be a mesh represented by three-dimensional coordinates (x, y, I) with luminance I as the height.

また、メッシュは、コンピュータグラフィックス(CG)のテクスチャマッピングで使用される2次元のメッシュであってよく、各頂点はマッピング対象となるテクスチャやビットマップ画像等と対応する位置情報を持っていてもよい。   The mesh may be a two-dimensional mesh used in computer graphics (CG) texture mapping, and each vertex may have position information corresponding to the texture to be mapped, bitmap image, or the like. Good.

また、入力画像がカラー画像である場合、各頂点はさらに色成分の情報(例えば、RGB)を含んでいてもよい。   When the input image is a color image, each vertex may further include color component information (for example, RGB).

図3は、画像処理装置1を表すブロック図である。画像処理装置1は、入力部11と、検出部12と、設定部13と、算出部14と、変形部15と、出力部16とを備える。変形部15は、区分部151と、領域変形部152とを含む。   FIG. 3 is a block diagram illustrating the image processing apparatus 1. The image processing apparatus 1 includes an input unit 11, a detection unit 12, a setting unit 13, a calculation unit 14, a deformation unit 15, and an output unit 16. The deformation unit 15 includes a sorting unit 151 and a region deformation unit 152.

入力部11は、処理対象となる原画像を入力する。   The input unit 11 inputs an original image to be processed.

検出部12は、原画像において、一又は複数のオブジェクトを検出し、その中から一の対象オブジェクト領域301を設定する。   The detection unit 12 detects one or a plurality of objects in the original image, and sets one target object region 301 from among the objects.

複数のオブジェクト領域が複数ある場合、検出部12は、ユーザからの指定により、対象オブジェクト領域を設定してもよい。あるいは、公知の画像認識技術を用いて、検出したオブジェクト領域が、人であるか、物であるかを推定し、人のオブジェクト領域を対象オブジェクト領域301に設定してもよい。あるいは、サイズが最も大きいオブジェクト領域を対象オブジェクト領域301に設定してもよい。   When there are a plurality of object areas, the detection unit 12 may set the target object area by designation from the user. Alternatively, a known object recognition technique may be used to estimate whether the detected object area is a person or an object, and the person object area may be set as the target object area 301. Alternatively, the object area having the largest size may be set as the target object area 301.

設定部13は、対象オブジェクト領域301を含み、かつ、他のオブジェクト領域(図1では、オブジェクト領域304)を含まない変形領域302を設定する。本実施形態では、ユーザからの指定に基づき、変形領域302を設定する。例えば、設定部13は、図示しないタッチパネル、マウス、キーボード等を用いて、原画像中でユーザが指定した領域を受け取ると、当該領域が対象オブジェクト領域301を含み、かつ、他のオブジェクト領域を含んでいないかを判定し、判定が真であれば、指定された領域を変形領域302をとして設定する。判定が偽であれば、ユーザに領域の指定を再度促がすようにしてもよい。なお、変形領域302に含まないと判定されるオブジェクト領域は、単一のオブジェクトに限らず、誘目度の高い領域であってもよい
なお、検出部12がオブジェクト領域として検出しなかったオブジェクト(図1では、オブジェクト303)は、変形領域302内に含まれてよい。
The setting unit 13 sets a deformation area 302 that includes the target object area 301 and does not include another object area (the object area 304 in FIG. 1). In the present embodiment, the deformation area 302 is set based on designation from the user. For example, when the setting unit 13 receives an area specified by the user in the original image using a touch panel, a mouse, a keyboard, or the like (not shown), the area includes the target object area 301 and other object areas. If the determination is true, the designated area is set as the deformation area 302. If the determination is false, the user may be prompted to specify an area again. The object area determined not to be included in the deformation area 302 is not limited to a single object but may be an area with a high degree of attraction. 1, the object 303) may be included in the deformation area 302.

算出部14は、変形領域302内の任意の位置を中心として、対象オブジェクト領域301を変形領域302内で拡大する。本実施形態では、メッシュ頂点を移動させることにより、対象オブジェクト領域301を拡大しつつ、変形領域302を歪ませる。   The calculation unit 14 enlarges the target object area 301 in the deformation area 302 with an arbitrary position in the deformation area 302 as the center. In this embodiment, the deformation area 302 is distorted while enlarging the target object area 301 by moving the mesh vertex.

この場合、拡大された対象オブジェクト領域301の大きさが最大となる拡大位置(最適位置)及びその拡大倍率(最大倍率)を算出する。   In this case, an enlargement position (optimum position) at which the size of the enlarged target object region 301 is maximized and its enlargement magnification (maximum magnification) are calculated.

すなわち、算出部14は、変形領域302内における対象オブジェクト領域301の拡大位置の候補を複数選択する。そして、各候補の拡大位置を中心として、対象オブジェクト領域301が変形領域302からはみ出さないように拡大した際に、拡大倍率が最大となる最大倍率とを候補ごとに求める。複数の最大倍率のなかでたとえば最大倍率となる拡大位置を最適位置として選択する。   That is, the calculation unit 14 selects a plurality of candidates for the enlargement position of the target object region 301 within the deformation region 302. Then, for each candidate, a maximum magnification that maximizes the enlargement magnification when the target object region 301 is enlarged so as not to protrude from the deformation region 302 around the enlargement position of each candidate is obtained. Among the plurality of maximum magnifications, for example, an enlargement position having the maximum magnification is selected as the optimum position.

なお、本実施形態におけるオブジェクト領域の位置とは、例えば、オブジェクト猟奇の重心位置であってよい。この場合、算出部14は、オブジェクト領域の形状から重心位置を算出すればよい。   Note that the position of the object area in the present embodiment may be, for example, the position of the center of gravity of the object. In this case, the calculation unit 14 may calculate the centroid position from the shape of the object area.

区分部151は、対象オブジェクト領域301の最適位置までの移動方向に基づき、変形領域302を区分する。区分された変形領域302の各々は、後述の変形部152により、異なる変形処理が行われる。   The sorting unit 151 sorts the deformation area 302 based on the moving direction of the target object area 301 to the optimum position. Each of the divided deformation regions 302 is subjected to different deformation processing by a deformation unit 152 described later.

領域変形部152は、区分された各々の変形領域302に対して、異なる変形処理を施すことにより、対象オブジェクト領域301を最適位置まで移動し、最適位置を中心として、移動した対象オブジェクト領域301を最大倍率で拡大する。これにより、原画像が変形される。   The area deforming unit 152 performs different deformation processing on each of the divided deformation areas 302 to move the target object area 301 to the optimum position, and the moved target object area 301 is centered on the optimum position. Magnify at maximum magnification. Thereby, the original image is deformed.

出力部16は、変形された原画像(変形画像)を提示装置5に出力する。ここで、提示装置5とは、ディスプレイやプリンタ等を含む。提示装置5は、変形画像をサムネイル画像として提示する。   The output unit 16 outputs the deformed original image (deformed image) to the presentation device 5. Here, the presentation device 5 includes a display, a printer, and the like. The presentation device 5 presents the deformed image as a thumbnail image.

入力部11と、検出部12と、設定部13と、算出部14と、変形部15と、出力部16とは、中央演算処理装置(CPU)及びCPUが用いるメモリにより実現されてよい。   The input unit 11, the detection unit 12, the setting unit 13, the calculation unit 14, the deformation unit 15, and the output unit 16 may be realized by a central processing unit (CPU) and a memory used by the CPU.

以上、画像処理装置1の構成について説明した。   The configuration of the image processing apparatus 1 has been described above.

図4は、画像処理装置1の処理を表すフローチャートである。   FIG. 4 is a flowchart showing processing of the image processing apparatus 1.

入力部11は、処理対象となる原画像を入力する(S101)。検出部12は、原画像において、一又は複数のオブジェクトを検出し、その中から一の対象オブジェクト領域301を設定する(S102)。   The input unit 11 inputs an original image to be processed (S101). The detection unit 12 detects one or a plurality of objects in the original image, and sets one target object region 301 from the detected one (S102).

設定部13は、変形領域302を設定する(S103)。算出部14は、変形領域302内の任意の位置を中心として、対象オブジェクト領域301を変形領域302内で拡大する場合の最適位置及び最大倍率を算出する(S104)。   The setting unit 13 sets the deformation area 302 (S103). The calculation unit 14 calculates the optimum position and the maximum magnification when the target object area 301 is enlarged in the deformation area 302 around an arbitrary position in the deformation area 302 (S104).

区分部151は、対象オブジェクト領域301を現在位置から最適位置まで移動する際の移動方向に基づき、変形領域302を区分する(S105)。   The sorting unit 151 sorts the deformation area 302 based on the moving direction when moving the target object area 301 from the current position to the optimum position (S105).

変形部152は、原画像を変形する(S106)。すなわち、変形部152は、区分された各々の変形領域302に対して、異なる変形処理を施すことにより、対象オブジェクト領域301を最適位置まで移動し、最適位置を中心として、移動した対象オブジェクト領域301を最大倍率で拡大する(S106)。出力部16は、変形された原画像(変形画像)を提示装置5に出力する(S107)。   The deformation unit 152 deforms the original image (S106). That is, the deforming unit 152 performs different deformation processing on each of the divided deformation areas 302 to move the target object area 301 to the optimum position, and the moved target object area 301 around the optimum position. Is enlarged at the maximum magnification (S106). The output unit 16 outputs the deformed original image (deformed image) to the presentation device 5 (S107).

以上、画像処理装置1の処理について説明した。   The processing of the image processing apparatus 1 has been described above.

以下、各部について詳述する。   Hereinafter, each part is explained in full detail.

入力部11は、原画像を検出部12と、設定部13と、変形部15とに供給する。検出部12は、原画像において対象オブジェクト領域301を検出する。例えば、検出部12は、特許文献2の手法などで抽出された領域を含むパッチの集合を、対象オブジェクト領域301として検出してよい。   The input unit 11 supplies the original image to the detection unit 12, the setting unit 13, and the deformation unit 15. The detection unit 12 detects the target object region 301 in the original image. For example, the detection unit 12 may detect a set of patches including an area extracted by the method of Patent Literature 2 as the target object area 301.

検出部12は、対象オブジェクト領域301を、設定部13と、算出部14とに通知する。例えば、検出部12は、対象オブジェクト領域301に含まれるパッチのパッチIDを設定部13と算出部14とに通知してよい。   The detection unit 12 notifies the target object region 301 to the setting unit 13 and the calculation unit 14. For example, the detection unit 12 may notify the setting unit 13 and the calculation unit 14 of the patch ID of the patch included in the target object region 301.

設定部13は、変形領域302を設定する。設定部13は、変形領域502を算出部14に通知する。例えば、設定部13は、変形領域502に含まれるパッチのパッチIDを算出部14に通知してよい。   The setting unit 13 sets the deformation area 302. The setting unit 13 notifies the calculation unit 14 of the deformation area 502. For example, the setting unit 13 may notify the calculation unit 14 of the patch ID of the patch included in the deformation area 502.

算出部14は、変形領域302内の任意の位置を中心として、対象オブジェクト領域301を変形領域302内で拡大する場合の最適位置及び最大倍率を算出する。   The calculation unit 14 calculates the optimum position and the maximum magnification when the target object area 301 is enlarged in the deformation area 302 around an arbitrary position in the deformation area 302.

図5は、算出部14の処理を表すフローチャートである。ここでは、対象オブジェクト領域301の位置Pと、拡大倍率Mと、移動方向(角度A)と、移動距離Lとを各々一定の刻み幅で大きくし、変形領域内に収まる範囲で、対象オブジェクト領域301を最大に拡大できるような最適位置Pと、最大倍率Mと、移動方向Aと、移動距離Lとを算出する。   FIG. 5 is a flowchart showing the processing of the calculation unit 14. Here, the position of the target object area 301, the enlargement magnification M, the movement direction (angle A), and the movement distance L are increased by a certain step size, and the target object area is within a range that falls within the deformation area. The optimum position P, the maximum magnification M, the moving direction A, and the moving distance L that can enlarge 301 to the maximum are calculated.

ステップS201にて、算出部14は、対象オブジェクト領域301を拡大させる倍率Mを初期化する(S201)。例えば、M=1.0に初期化してよい。   In step S201, the calculation unit 14 initializes a magnification M for enlarging the target object region 301 (S201). For example, it may be initialized to M = 1.0.

ステップS202にて、算出部14は、対象オブジェクト領域301を移動させる方向(角度A)を初期化する(S202)。例えば、A’=0°に初期化してよい。ここで、角度A’は、原画像における基準ラインからの角度である。図6は、算出部14の処理の説明図である。図6(a)に示すように、例えば、基準ラインは、原画像の水平方向と平行なラインであってよく、左回りを正、右回りを負としてよい。この場合、基準ラインの方向を角度0°としてよい。   In step S202, the calculation unit 14 initializes the direction (angle A) in which the target object region 301 is moved (S202). For example, A ′ = 0 ° may be initialized. Here, the angle A ′ is an angle from the reference line in the original image. FIG. 6 is an explanatory diagram of the processing of the calculation unit 14. As shown in FIG. 6A, for example, the reference line may be a line parallel to the horizontal direction of the original image, and the counterclockwise direction may be positive and the clockwise direction may be negative. In this case, the direction of the reference line may be an angle of 0 °.

ステップS203にて、算出部14は、角度Aが360°未満であるか否かを判定する(S203)。角度A’が360°未満であれば(判定がYES)ステップS204に遷移し、角度A’が360°以上であれば(判定がNO)ステップS205に遷移する。   In step S203, the calculation unit 14 determines whether or not the angle A is less than 360 ° (S203). If the angle A ′ is less than 360 ° (determination is YES), the process proceeds to step S204. If the angle A ′ is 360 ° or more (determination is NO), the process proceeds to step S205.

ステップS204にて、算出部14は、対象オブジェクト領域301を移動させる距離Lを初期化する(S204)。例えば、L’=0に初期化してよい。   In step S204, the calculation unit 14 initializes a distance L for moving the target object region 301 (S204). For example, it may be initialized to L ′ = 0.

ステップS206にて、算出部14は、図6(b)に示すように、予め定められた刻み距離ΔLを距離L’に加える(S206)。   In step S206, the calculation unit 14 adds a predetermined step distance ΔL to the distance L ′ as shown in FIG. 6B (S206).

ステップS207にて、算出部14は、対象オブジェクト領域301を、角度A’の方向に距離L’移動させる(S207)。すなわち、対象オブジェクト領域301に含まれるメッシュの頂点を角度A’の方向に距離L’移動させる。   In step S207, the calculation unit 14 moves the target object region 301 by a distance L ′ in the direction of the angle A ′ (S207). That is, the vertex of the mesh included in the target object region 301 is moved by the distance L ′ in the direction of the angle A ′.

ステップS208にて、移動した対象オブジェクト領域301が変形領域内に含まれているか否かを判定する(S208)。   In step S208, it is determined whether or not the moved target object area 301 is included in the deformation area (S208).

本実施形態では、対象オブジェクト領域301と変形領域302が交わらず、かつ、対象オブジェクト領域301の境界を構成する1点が変形領域302の内部にあれば、対象オブジェクト領域301が変形領域302内に含まれていると判定する。   In the present embodiment, if the target object area 301 and the deformation area 302 do not intersect and one point constituting the boundary of the target object area 301 is inside the deformation area 302, the target object area 301 is in the deformation area 302. It is determined that it is included.

具体的には、対象オブジェクト領域301として、メモリ(不図示)に登録されているパッチの集合の頂点のうち、対象オブジェクト領域301として登録されていないパッチと隣接しているものを探索することにより、対象オブジェクト領域301の境界を構成しているメッシュ頂点U11、U12、・・・、U1nを求めることができる(変形領域302についても同様)。   Specifically, by searching for the target object area 301 that is adjacent to a patch that is not registered as the target object area 301 among the vertices of the set of patches registered in the memory (not shown). The mesh vertices U11, U12,..., U1n constituting the boundary of the target object region 301 can be obtained (the same applies to the deformation region 302).

また、対象オブジェクト領域301の境界を構成している稜線T11、T12・・・、T1i…も求めることができる(変形領域302についても同様にT21、T22、…T2jとする)。ここで、対象オブジェクト領域301および変形領域302の境界の稜線T1i、T2jの中で、互いに交わる組合せがなければ、対象オブジェクト領域301と変形領域302が交わらないと判定する。さらに、変形領域302内に属しているパッチ内部のある点からU11に引いた線分に対して、変形領域302の稜線が交わらないか、あるいは偶数回交わる場合、対象オブジェクト領域301が変形領域302の中に含まれていると判定する。   Further, ridgelines T11, T12,..., T1i... Constituting the boundary of the target object area 301 can also be obtained (T21, T22,... T2j are similarly applied to the deformation area 302). Here, if there is no combination that intersects the ridgelines T1i and T2j of the boundary between the target object area 301 and the deformation area 302, it is determined that the target object area 301 and the deformation area 302 do not intersect. Furthermore, when the ridge line of the deformation area 302 does not intersect with the line segment drawn to U11 from a certain point inside the patch belonging to the deformation area 302 or even times, the target object area 301 becomes the deformation area 302. It is determined that it is included.

移動した対象オブジェクト領域301が変形領域内に含まれていればステップS210に遷移する。含まれていなければステップS209に遷移する。   If the moved target object area 301 is included in the deformation area, the process proceeds to step S210. If not included, the process proceeds to step S209.

ステップS209にて、算出部は、予め定められた刻み角度ΔAを角度A’に加え(S209)、ステップS206に遷移する。   In step S209, the calculation unit adds a predetermined step angle ΔA to the angle A ′ (S209), and proceeds to step S206.

ステップS210にて、算出部14は、対象オブジェクト領域301を、入力された原画像における初期位置から、角度A’の方向に距離L’移動した位置において、対象オブジェクト領域301を最大に拡大できる際の、拡大中心P’と、その際の倍率M’とを算出する。   In step S210, when the calculation unit 14 can enlarge the target object region 301 to the maximum at a position where the target object region 301 is moved by a distance L ′ in the direction of the angle A ′ from the initial position in the input original image. The enlargement center P ′ and the magnification M ′ at that time are calculated.

図7は、ステップS210における算出部14の処理を表すフローチャートである。算出部14は、対象オブジェクト領域301において、拡大中心P’の候補となる複数の候補点P’m(m=1〜s)(sは、候補点の個数である)を設定する(S301)。   FIG. 7 is a flowchart showing the process of the calculation unit 14 in step S210. The calculation unit 14 sets a plurality of candidate points P′m (m = 1 to s) (s is the number of candidate points) that are candidates for the expansion center P ′ in the target object region 301 (S301). .

図8は、候補点P’mを示す一例図である。図8(a)に示すように、例えば、算出部14は、対象オブジェクト領域301内において、対象オブジェクト領域301の重心から、予め定められた間隔で格子状に候補点P’mを設定してもよい。   FIG. 8 is an example diagram showing candidate points P′m. As shown in FIG. 8A, for example, the calculation unit 14 sets candidate points P′m in a lattice pattern at predetermined intervals from the center of gravity of the target object region 301 in the target object region 301. Also good.

算出部14は、m=1に設定する(S302)。算出部14は、候補点P’mを拡大中心として、対象オブジェクト領域301を拡大倍率M’m拡大する(S303)。   The calculation unit 14 sets m = 1 (S302). The calculation unit 14 enlarges the target object region 301 with the enlargement factor M′m with the candidate point P′m as the enlargement center (S303).

具体的には、図8(b)に示すように、拡大中心P’mから、対象オブジェクト領域301内のメッシュの頂点Vまでを結ぶ半直線P’mVがM倍になる点V’(P’mV’=M’m×P’mV)にメッシュの頂点Vを移動する。これを対象オブジェクト領域301内の全てのメッシュの頂点について行なうことにより、対象オブジェクト領域301が拡大される。   Specifically, as shown in FIG. 8B, a point V ′ (P) where a half line P′mV connecting the expansion center P′m to the vertex V of the mesh in the target object region 301 is M times larger. The vertex V of the mesh is moved to “mV” = M′m × P′mV). By performing this operation on all mesh vertices in the target object region 301, the target object region 301 is enlarged.

算出部14は、拡大した対象オブジェクト領域301が変形領域302の中に含まれているか否かを判定する(S304)。ステップS304における判定がYESの場合、算出部14は、拡大倍率M’mに、所定の定数ΔM’(例えば、ΔM’=0.1)を加えた値(M’m+ΔM’)を新たな拡大倍率M’mとして(S305)、ステップS303に遷移する。   The calculation unit 14 determines whether or not the enlarged target object area 301 is included in the deformation area 302 (S304). When the determination in step S304 is YES, the calculation unit 14 newly sets a value (M′m + ΔM ′) obtained by adding a predetermined constant ΔM ′ (for example, ΔM ′ = 0.1) to the enlargement magnification M′m. As the enlargement magnification M′m (S305), the process proceeds to step S303.

ステップS304における判定がNOの場合、算出部14は、拡大倍率M’mを決定する(S306)。例えば、算出部14は、M’m=M’m−ΔMを候補点P’mにおける最終的な拡大倍率として決定してよい。   When the determination in step S304 is NO, the calculation unit 14 determines the enlargement magnification M'm (S306). For example, the calculation unit 14 may determine M′m = M′m−ΔM as the final enlargement magnification at the candidate point P′m.

算出部14は、更新前の拡大倍率M’mよりも、現在の拡大倍率M’mの方が大きいか否かを判定する(S307)。ステップS307における判定がNOの場合、算出部14は、m=sであるか否かを判定する(S311)。すなわち、算出部14は、全てのP’mで評価したか否かを判定する。ステップS311における判定がNOの場合、(m+1)を新たなmとして、ステップS303に遷移する。   The calculation unit 14 determines whether or not the current enlargement magnification M′m is larger than the enlargement magnification M′m before the update (S307). When the determination in step S307 is NO, the calculation unit 14 determines whether m = s (S311). That is, the calculation unit 14 determines whether or not the evaluation is performed for all P′m. When the determination in step S311 is NO, (m + 1) is set as a new m, and the process proceeds to step S303.

ステップS309における判定がYESの場合、算出部14は、拡大倍率M’mを新たな拡大倍率M’としてメモリ(不図示)に書き込み、拡大倍率Mを更新する。また、そのときのP’mを拡大中心P’としてメモリ(不図示)に書き込み、拡大中心P’を更新する(S310)。そして、ステップS311に遷移する。   When the determination in step S309 is YES, the calculation unit 14 writes the enlargement magnification M′m as a new enlargement magnification M ′ in a memory (not shown), and updates the enlargement magnification M. Further, P′m at that time is written as a magnification center P ′ in a memory (not shown), and the magnification center P ′ is updated (S310). And it changes to step S311.

ステップS311における判定がYESの場合、図5におけるステップS211に遷移する。   If the determination in step S311 is YES, the process proceeds to step S211 in FIG.

ステップS211にて、算出部14は、算出した拡大倍率M’が、これまでに更新された拡大倍率Mよりも大きいか否かを判定し(S211)、判定がYESの場合、ステップS212にて、拡大倍率M’を拡大倍率Mとして、メモリ(不図示)を更新する。すなわち、算出部14は、角度A’で移動距離L’のときの、拡大倍率M’を各々算出し、値が最大となる拡大倍率M’を拡大倍率Mとして、メモリ(不図示)を更新する。なお、このときの角度A’を角度A、距離L’を距離Lとしてメモリ(不図示)を更新する。ステップS211における判定がNOの場合、ステップS206に遷移する。   In step S211, the calculation unit 14 determines whether or not the calculated enlargement magnification M ′ is larger than the enlargement magnification M that has been updated so far (S211). If the determination is YES, the calculation unit 14 determines in step S212. The memory (not shown) is updated with the enlargement magnification M ′ as the enlargement magnification M. That is, the calculation unit 14 calculates the enlargement magnification M ′ when the movement distance L ′ is the angle A ′, and updates the memory (not shown) with the enlargement magnification M ′ having the maximum value as the enlargement magnification M. To do. At this time, the memory (not shown) is updated with the angle A ′ as the angle A and the distance L ′ as the distance L. When the determination in step S211 is NO, the process proceeds to step S206.

ステップS205にて、算出部14は、最適位置Pと、最大倍率Mと、移動方向Aと、移動距離Lとを設定し、処理を終了する。   In step S205, the calculation unit 14 sets the optimum position P, the maximum magnification M, the movement direction A, and the movement distance L, and ends the process.

なお、ここでは自動的に最適位置、最大倍率、移動方向、移動距離を算出する方法について述べたが、対象オブジェクトが変形影響領域内に収まる範囲で外部からユーザがこれらの値を与えてもよい。その場合、角度A’、距離L’、位置P’、倍率M’は、外部から与えられた値を固定して図5の処理を行う。 Although the method for automatically calculating the optimum position, maximum magnification, moving direction, and moving distance has been described here, the user may give these values from the outside within the range where the target object is within the deformation affected area. . In this case, the angle A ′, the distance L ′, the position P ′, and the magnification M ′ are fixed as given from the outside, and the process of FIG. 5 is performed.

以上、算出部14の処理について説明した。   The processing of the calculation unit 14 has been described above.

区分部151は、最適位置Pと、最大倍率Mと、移動方向Aと、移動距離Lとに基づいて、対象オブジェクト領域301を現在位置から最適位置Pまで移動する際に、対象オブジェクト領域301が通る軌跡に基づき、変形領域302を区分する。   The sorting unit 151 moves the target object region 301 from the current position to the optimal position P based on the optimal position P, the maximum magnification M, the moving direction A, and the moving distance L. Based on the trajectory, the deformation region 302 is segmented.

図9は、区分部151の処理の説明図である。区分部151は、対象オブジェクト領域301と、変形領域302と、移動方向Aと、に基づき、移動方向Aと平行、かつ、オブジェクト領域301と接し、変形領域302の外周と交わる直線303及び直線304を引く。すなわち、区分部151は、直線303及び直線304によって変形領域302を、領域305と、領域306と、領域307と、領域308とに区分する。区分部151では、それぞれの領域に含まれる頂点に対し、領域305〜308のどの領域に属しているか判別できる属性(領域ID)を与える。   FIG. 9 is an explanatory diagram of the processing of the sorting unit 151. Based on the target object area 301, the deformation area 302, and the movement direction A, the sorting unit 151 is parallel to the movement direction A and touches the object area 301, and intersects with the outer circumference of the deformation area 302. pull. That is, the sorting unit 151 divides the deformation region 302 into a region 305, a region 306, a region 307, and a region 308 by the straight line 303 and the straight line 304. The sorting unit 151 gives an attribute (region ID) that can determine which region of the regions 305 to 308 belongs to the vertexes included in each region.

なお、直線303及び直線304は、対象オブジェクト領域301の境界を構成している複数点のいずれか一点を通り、対象オブジェクト領域301の移動方向Aと平行な複数直線の中から、互いに最も距離の離れた2本の直線として求められる。   Note that the straight line 303 and the straight line 304 pass through any one of a plurality of points constituting the boundary of the target object region 301, and are most distant from each other among a plurality of straight lines parallel to the moving direction A of the target object region 301. It is calculated as two separate straight lines.

また、区分部151は、領域IDを以下のように求めてよい。区分部151は、対象オブジェクト領域301のパッチを通り対象オブジェクト領域301の移動方向Aと平行な直線と、直線303と、直線304との位置関係により、当該パッチを、(i)領域308、(ii)領域305あるいは307、(iii)領域306の3通りに分類する。   Further, the sorting unit 151 may obtain the area ID as follows. The sorting unit 151 assigns the patch to the (i) region 308, (i) based on the positional relationship between the straight line parallel to the moving direction A of the target object region 301, the straight line 303, and the straight line 304. ii) Classification is made into three categories: area 305 or 307, and (iii) area 306.

もし、(ii)領域305あるいは領域307に属していれば、区分部151は、当該パッチと対象オブジェクト領域301の境界を構成している稜線との交点の位置から、当該パッチが領域305あるいは領域307のどちらの領域に属しているかを求める。なお、区分された領域の境界である直線303又は直線304上に存在するパッチについては、それに接するどれか一つの領域の領域IDを与える。   If (ii) it belongs to the region 305 or the region 307, the sorting unit 151 determines that the patch is the region 305 or the region from the position of the intersection between the patch and the ridge line that forms the boundary of the target object region 301. Which area 307 belongs to is determined. For a patch existing on the straight line 303 or the straight line 304 that is the boundary of the divided areas, the area ID of any one area in contact with the patch is given.

なお、直線303及び直線304を引いた後に、その線分に沿うようにメッシュを分割する方法も考えられる。具体的には、直線303及び直線304が通るパッチ(三角形とする)に対して、その線分が通過している線上で分割する。分割によって四角形のパッチが生成されたら、その四角形のパッチを非特許文献1記載のDelaunay三角形分割等の方法により2つの三角形パッチに分割する。   In addition, after drawing the straight line 303 and the straight line 304, the method of dividing | segmenting a mesh so that the line segment may be considered is also considered. Specifically, a patch (a triangle) through which the straight line 303 and the straight line 304 pass is divided on the line through which the line segment passes. When a quadrangular patch is generated by the division, the quadrangular patch is divided into two triangular patches by a method such as Delaunay triangulation described in Non-Patent Document 1.

以上、区分部151の処理について説明した。   The processing of the sorting unit 151 has been described above.

変形部152は、区分された各々の変形領域302に対して、異なる変形処理を施すことにより、対象オブジェクト領域301を最適位置Pまで移動し、最適位置Pを中心として、移動した対象オブジェクト領域301を最大倍率Mで拡大する。   The deformation unit 152 performs different deformation processing on each of the divided deformation areas 302 to move the target object area 301 to the optimal position P, and the target object area 301 moved around the optimal position P is the center. Is enlarged at the maximum magnification M.

図10は、領域変形部152の処理を表すフローチャートである。図10に示すように、区分部151は、ステップS401にて、領域変形部152は、区分部151で付与された領域IDに基づき、各頂点が領域305〜308のどの領域に属すかを判定する(S401)。ステップS402にて、領域変形部152は、領域毎に頂点を移動することにより対象オブジェクト領域301を移動する(S402)。ステップS403にて、領域変形部152は、対象オブジェクト領域301を拡大する(S403)。以下、ステップS402とS403とについて説明する。   FIG. 10 is a flowchart showing the process of the area deforming unit 152. As shown in FIG. 10, in step S <b> 401, the sorting unit 151 determines which region of the regions 305 to 308 each vertex belongs to based on the region ID assigned by the sorting unit 151. (S401). In step S402, the region deformation unit 152 moves the target object region 301 by moving the vertex for each region (S402). In step S403, the area deforming unit 152 enlarges the target object area 301 (S403). Hereinafter, steps S402 and S403 will be described.

ステップS402について説明する。   Step S402 will be described.

領域変形部152は、対象オブジェクト領域301を最適位置Pに移動する。すなわち、対象オブジェクト領域301を移動方向Aに移動距離Lだけ移動させる。このとき、領域変形部152は、対象オブジェクト領域301の移動に伴い、領域305を移動方向Aに引き伸ばし、領域307を移動方向Aに縮めることにより、補間する。また、領域変形部152は、対象オブジェクト領域301の移動に伴い、領域306及び領域308を各々、移動方向Aにずらすことにより補間する。   The area deforming unit 152 moves the target object area 301 to the optimal position P. That is, the target object area 301 is moved in the movement direction A by the movement distance L. At this time, the region deforming unit 152 performs interpolation by expanding the region 305 in the moving direction A and contracting the region 307 in the moving direction A as the target object region 301 moves. Further, the area deforming unit 152 performs interpolation by shifting the area 306 and the area 308 in the movement direction A as the target object area 301 moves.

以下、上記のような変形を実現するためのメッシュ頂点の移動方法について説明する。   Hereinafter, a method for moving mesh vertices for realizing the above-described deformation will be described.

対象オブジェクト領域301内のメッシュ頂点については、全てのメッシュ頂点を移動方向Aに移動距離Lだけ移動することで実現される。 The mesh vertices in the target object region 301 are realized by moving all the mesh vertices in the movement direction A by the movement distance L.

図11は、領域305の変形処理の説明図である。領域変形部152は、移動対象のメッシュ頂点Wから対象オブジェクト領域301の移動方向Aと平行な直線Fを引く。ここで、対象オブジェクト領域301の外周と直線Fとの交点をR1、変形領域302の外周と直線Fとの交点をR2とする(図11(a))。また、移動後の対象オブジェクト領域301の外周と直線Fとの交点をR1’とする(図11(b))。   FIG. 11 is an explanatory diagram of the deformation process for the area 305. The region deforming unit 152 draws a straight line F parallel to the moving direction A of the target object region 301 from the mesh vertex W to be moved. Here, the intersection of the outer periphery of the target object region 301 and the straight line F is R1, and the intersection of the outer periphery of the deformation region 302 and the straight line F is R2 (FIG. 11A). Further, the intersection of the outer periphery of the target object area 301 after movement and the straight line F is defined as R1 '(FIG. 11 (b)).

このとき、R1がR1’に移動するのに伴い、頂点WはR1とR2との間を線形に補間するように移動する。つまり、領域変形部152は、線分R2W:線分WR1=線分R2W’:線分W’R1’となる点W’に、頂点Wを移動させる。領域変形部152は、同様の処理を領域305のメッシュ頂点全てに対して行うことにより、原画像を変形させる。領域変形部152は、領域307のメッシュ頂点についても同様の処理を行なう。   At this time, as R1 moves to R1 ', the vertex W moves so as to linearly interpolate between R1 and R2. That is, the region deforming unit 152 moves the vertex W to a point W ′ where the line segment R2W: line segment WR1 = line segment R2W ′: line segment W′R1 ′. The area deforming unit 152 deforms the original image by performing the same process on all the mesh vertices in the area 305. The region deforming unit 152 performs the same process on the mesh vertices in the region 307.

図12は、領域306の変形処理の説明図である。変形領域302を区分している直線303と対象オブジェクト領域301との接点をQ1とし、直線F’と変形領域302の外周との交点をQ2とする。直線F’は、移動対象のメッシュ頂点U及び接点Q1を通る直線である。また、移動後の対象オブジェクト領域301上で、移動前の対象オブジェクト領域301の点Q1に対応する点をQ1’とする。   FIG. 12 is an explanatory diagram of the deformation process of the area 306. The point of contact between the straight line 303 dividing the deformation area 302 and the target object area 301 is Q1, and the intersection of the straight line F 'and the outer periphery of the deformation area 302 is Q2. The straight line F ′ is a straight line passing through the mesh vertex U to be moved and the contact point Q1. Further, a point corresponding to the point Q1 of the target object area 301 before the movement on the target object area 301 after the movement is defined as Q1 '.

領域変形部152は、点Q1を点Q1’に移動させ、点UをQ1とQ2との間を線形に補間するように移動させる。つまり、Q2U:UQ1=Q2U’:U’Q1’となる点U’に、点Uを移動させる。領域変形部152は、同様の処理を領域306のメッシュ頂点全てに対して行うことにより、原画像を変形させる。領域変形部152は、領域308のメッシュ頂点についても同様の処理を行なう。   The region deforming unit 152 moves the point Q1 to the point Q1 'and moves the point U so as to linearly interpolate between Q1 and Q2. That is, the point U is moved to the point U ′ where Q2U: UQ1 = Q2U ′: U′Q1 ′. The area deforming unit 152 deforms the original image by performing the same process on all the mesh vertices in the area 306. The area deforming unit 152 performs the same process for the mesh vertices in the area 308.

なお、対象オブジェクト領域301が直線303と複数点あるいは辺で接している場合、領域変形部152は、移動対象の頂点Uから最も近い位置にある接点あるいは接線上の点をQ1としてよい。   When the target object region 301 is in contact with the straight line 303 at a plurality of points or sides, the region deforming unit 152 may set a point on the contact or tangent closest to the vertex U to be moved as Q1.

ステップS403について説明する。   Step S403 will be described.

領域変形部152は、移動させた対象オブジェクト領域301を、最適位置Pを拡大中心として、倍率Mで拡大する。すなわち、領域変形部152は、対象オブジェクト領域301の移動後の画像のメッシュ頂点を拡大倍率Mに従って移動させることにより、対象オブジェクト領域301を拡大する。図13は、領域変形部152による対象オブジェクト領域301の拡大処理を表すフローチャートである。図14は、対象オブジェクト領域301の拡大処理の説明図である。   The area deforming unit 152 enlarges the moved target object area 301 at the magnification M with the optimum position P as the enlargement center. That is, the area deforming unit 152 enlarges the target object area 301 by moving the mesh vertices of the image after the movement of the target object area 301 according to the enlargement magnification M. FIG. 13 is a flowchart showing enlargement processing of the target object area 301 by the area deforming unit 152. FIG. 14 is an explanatory diagram of the enlargement process of the target object area 301.

ステップS501にて、領域変形部152は、移動させた対象オブジェクト領域301において、選択が完了していない一の頂点を処理対象の頂点(処理対象頂点V)として選択する(S501)。   In step S501, the region deforming unit 152 selects one vertex that has not been selected in the moved target object region 301 as a processing target vertex (processing target vertex V) (S501).

ステップS502にて、領域変形部152は、最適位置Pから処理対象頂点Vに半直線PVを引き、半直線PVと対象オブジェクト領域301の外周との交点D1、及び半直線PVと変形領域302の輪郭との交点D2を求める(S502)。   In step S <b> 502, the region deforming unit 152 draws a half line PV from the optimum position P to the processing target vertex V, and an intersection D <b> 1 between the half line PV and the outer periphery of the target object region 301, and the half line PV and the deformed region 302. An intersection point D2 with the contour is obtained (S502).

半直線PVと対象オブジェクト領域301との交点D1、及び半直線PVと変形領域302との交点D2は、図14(a)に示す関係となる。   The intersection D1 between the half line PV and the target object area 301 and the intersection D2 between the half line PV and the deformation area 302 have the relationship shown in FIG.

ステップS503にて、領域変形部152は、選択した移動対象頂点Vが、対象オブジェクト領域301内にあるか否かを判定する(S503)。ステップS503における判定がYESの場合、ステップS504にて、領域変形部152は、「PV’(ベクトル)=拡大倍率M×PV(ベクトル)」となる点V’の位置に、選択した移動対象頂点Vを移動させる(S504)。   In step S503, the region deformation unit 152 determines whether or not the selected movement target vertex V is in the target object region 301 (S503). When the determination in step S503 is YES, in step S504, the region deformation unit 152 selects the selected moving target vertex at the position of the point V ′ where “PV ′ (vector) = enlargement magnification M × PV (vector)”. V is moved (S504).

そして、ステップS507にて、領域変形部152は、対象オブジェクト領域301の移動後の画像において、全てのメッシュ頂点を選択したか否かを判定する(S507)。例えば、領域変形部152は、移動対象頂点Vとして選択した頂点の頂点IDをメモリ(不図示)に記憶させておくことにより、ステップS507における判定を行なってもよい。   In step S507, the region deforming unit 152 determines whether all mesh vertices have been selected in the image after movement of the target object region 301 (S507). For example, the region deforming unit 152 may perform the determination in step S507 by storing the vertex ID of the vertex selected as the movement target vertex V in a memory (not shown).

ステップS507における判定がYESの場合、領域変形部152は、画像の変形が終了したことを提示部16に通知し、処理を終了する。ステップS507における判定がNOの場合、ステップS501に遷移する。   When the determination in step S507 is YES, the region deformation unit 152 notifies the presentation unit 16 that the image deformation has ended, and the process ends. If the determination in step S507 is no, the process proceeds to step S501.

ステップS503における判定がNOの場合、ステップS505にて、領域変形部152は、選択した移動対象頂点Wが、変形領域302内かつ対象オブジェクト領域301外にあるか否かを判定する(S505)。ステップS505における判定がNOの場合、ステップS507に遷移する。ステップS505における判定がYESの場合、ステップS506にて、「D1’V’:V’D2=D1V:VD2」となる点V’の位置に移動対象頂点Vを移動させる(S506)。ここでD1’とは、拡大倍率Mで拡大した対象オブジェクト領域301の外周と、半直線PV’との交点である。そして、ステップS507に遷移する。これにより、サムネイル画像にするための変形画像が生成される(図14(b))。   When the determination in step S503 is NO, in step S505, the region deformation unit 152 determines whether or not the selected movement target vertex W is inside the deformation region 302 and outside the target object region 301 (S505). If the determination in step S505 is no, the process transitions to step S507. When the determination in step S505 is YES, in step S506, the moving target vertex V is moved to the position of the point V ′ where “D1′V ′: V′D2 = D1V: VD2” (S506). Here, D <b> 1 ′ is an intersection of the outer periphery of the target object region 301 enlarged at the enlargement magnification M and the half line PV ′. And it changes to step S507. Thereby, a deformed image for making a thumbnail image is generated (FIG. 14B).

出力部16は、変形画像を提示装置5に出力する。   The output unit 16 outputs the deformed image to the presentation device 5.

提示装置5は、変形画像を縮小し、サムネイル画像として提示する。例えば、提示部16は、サムネイル画像をレンダリングして表示するディスプレイであってよい。この場合、提示装置5は、メッシュの各頂点が持つ色情報を用いて、パッチ内を補間することにより、レンダリングしてよい(非特許文献1参照)。   The presentation device 5 reduces the deformed image and presents it as a thumbnail image. For example, the presentation unit 16 may be a display that renders and displays thumbnail images. In this case, the presentation device 5 may perform rendering by interpolating the inside of the patch using color information of each vertex of the mesh (see Non-Patent Document 1).

(変形例)
なお、本実施の形態において、原画像は、メッシュで表現されるものであるとしたが、ピクセル画像であっても構わない。この場合、検出部12と、設定部13と、算出部14とは、上述のメッシュの頂点を、各ピクセルの中心点として同様の処理を行なえばよい。
(Modification)
In the present embodiment, the original image is represented by a mesh, but may be a pixel image. In this case, the detection part 12, the setting part 13, and the calculation part 14 should just perform the same process by making the vertex of the above-mentioned mesh into the center point of each pixel.

また、変形部15は、メモリ(不図示)に記憶された各ピクセルの輝度及び色情報を書き換えることによって画像変形を行なう。すなわち、上述のメッシュの頂点の移動先を決定する方法と同様に、各ピクセルの中央点の移動先を仮に算出する。各ピクセルの中央点の移動先として算出された座標にピクセルの輝度及び色情報を持たせたものを参照点とし、その参照点を補間することで各ピクセルの輝度及び色情報を書き換え、変形後の画像を生成する。   The deforming unit 15 performs image deformation by rewriting the luminance and color information of each pixel stored in a memory (not shown). That is, the movement destination of the center point of each pixel is temporarily calculated in the same manner as the method for determining the movement destination of the vertex of the mesh described above. The coordinates calculated as the destination of the center point of each pixel are given the pixel brightness and color information as a reference point, and the reference point is interpolated to rewrite the brightness and color information of each pixel. Generate an image of

本実施形態により、ユーザが原画像を特定しやすいサムネイル画像を生成することができる。   According to the present embodiment, it is possible to generate a thumbnail image that allows the user to easily specify the original image.


(第2の実施の形態)
第2の実施の形態に係る画像処理装置では、設定部13が自動的に変形領域302を設定する点が、前実施形態の場合と異なる。

(Second Embodiment)
The image processing apparatus according to the second embodiment is different from the previous embodiment in that the setting unit 13 automatically sets the deformation area 302.

本実施形態において、設定部13は、対象オブジェクト領域301を含み、かつ、他のオブジェクト(図1ではオブジェクト304)を含まないように、変形領域302を設定する。例えば、非特許文献2に記載の公知の動的輪郭モデル(Snake法)の手法を用いて、変形領域302を特定してもよい。   In the present embodiment, the setting unit 13 sets the deformation area 302 so as to include the target object area 301 and not include other objects (object 304 in FIG. 1). For example, the deformation region 302 may be specified using a known active contour model (Snake method) described in Non-Patent Document 2.

図15は、本実施形態における設定部13の処理を表すフローチャートである。   FIG. 15 is a flowchart showing processing of the setting unit 13 in the present embodiment.

ステップS601にて、設定部13は、対象オブジェクト301の外周にあるメッシュ頂点の位置に制御点C1〜Cnを用意し、それらを直線で結んだ輪郭を輪郭Cとする(S601)。   In step S601, the setting unit 13 prepares control points C1 to Cn at positions of mesh vertices on the outer periphery of the target object 301, and sets a contour obtained by connecting them as a contour C (S601).

ステップS602にて、設定部13は、初期の倍率rを設定する(S602)。   In step S602, the setting unit 13 sets an initial magnification r (S602).

ステップS603にて、設定部13は、輪郭Cの制御点C1〜Cnを、輪郭Cの重心を中心にして倍率rで拡大(移動)する(S603)。   In step S603, the setting unit 13 enlarges (moves) the control points C1 to Cn of the contour C with the magnification r about the center of gravity of the contour C (S603).

ステップS604にて、設定部13は、メッシュからはみ出す制御点が存在したか否かを判定する(S604)。ステップS604における判定がYESの場合、ステップS605にて、設定部13は、倍率rを予め定められた値の刻み幅だけ減らす(S605)。   In step S604, the setting unit 13 determines whether there is a control point that protrudes from the mesh (S604). When the determination in step S604 is YES, in step S605, the setting unit 13 reduces the magnification r by a predetermined step size (S605).

ステップS604における判定がNOの場合、ステップS606にて、設定部13は、制御点をエネルギー(E =αEint+βEimg)を小さくする位置に移動させる。ここで、Eintは形状エネルギー項(内部エネルギー項)、Eimgは画像エネルギー項(外部エネルギー項)、α及びβは、各エネルギー項に対する重みである。   When the determination in step S604 is NO, in step S606, the setting unit 13 moves the control point to a position where the energy (E = αEint + βEimg) is decreased. Here, Eint is a shape energy term (internal energy term), Eimg is an image energy term (external energy term), and α and β are weights for each energy term.

すなわち、設定部13は、輪郭Cが、短く、滑らかで、隣接するパッチの二面角が小さい稜線に沿うような位置になるように制御点を移動させる。   That is, the setting unit 13 moves the control point so that the contour C is short, smooth, and is positioned along a ridge line where the dihedral angle of the adjacent patch is small.

ステップS607にて、設定部13は、全ての制御点を移動させたか否かを判定する(S607)。ステップS607における判定がNOの場合、ステップS606に遷移する。   In step S607, the setting unit 13 determines whether all the control points have been moved (S607). If the determination in step S607 is no, the process transitions to step S606.

ステップS607における判定がYESの場合、ステップS608にて、設定部13は、ステップS606及びステップS607の処理を予め定められた所定回数繰り返したか否かを判定する(S608)。つまり、エネルギーが小さくなるように制御点C1〜Cnの全てを移動するというサイクルを所定回数繰り返したか否かを判定する。ステップS608における判定がNOの場合、ステップS606に遷移する。   When the determination in step S607 is YES, in step S608, the setting unit 13 determines whether or not the processes in steps S606 and S607 have been repeated a predetermined number of times (S608). That is, it is determined whether or not the cycle of moving all of the control points C1 to Cn is repeated a predetermined number of times so that the energy is reduced. If the determination in step S608 is no, the process transitions to step S606.

ステップS608における判定がYESの場合、ステップS609にて、設定部13は、輪郭Cで囲まれた領域内に含まれるメッシュ頂点で作られるパッチの領域を変形領域302とし(S609)、処理を終了する。   When the determination in step S608 is YES, in step S609, the setting unit 13 sets the patch area created by the mesh vertices included in the area surrounded by the contour C as the deformation area 302 (S609), and ends the process. To do.

以上、本実施形態では、対象オブジェクト領域301を含み、かつ、他のオブジェクト(図1ではオブジェクト304)を含まないように、変形領域302を設定することができるため、ユーザによる変形領域302の指定を省略することができる。   As described above, in this embodiment, since the deformation area 302 can be set so as to include the target object area 301 and not include other objects (the object 304 in FIG. 1), the user can specify the deformation area 302. Can be omitted.

以上、上述した実施の形態により、ユーザが原画像を特定しやすいサムネイル画像を生成することができる画像処理装置、方法、及びプログラムを提供することができる。   As described above, according to the above-described embodiments, it is possible to provide an image processing apparatus, method, and program that can generate a thumbnail image that allows a user to easily specify an original image.

これまで、本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described so far, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

1…画像処理装置
5…提示装置
11…入力部
12…検出部
13…設定部
14…算出部
15…変形部
16…出力部
151…区分部
152…領域変形部
DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus 5 ... Presentation apparatus 11 ... Input part 12 ... Detection part 13 ... Setting part 14 ... Calculation part 15 ... Deformation part 16 ... Output part 151 ... Classification part 152 ... Area deformation part

Claims (7)

処理対象となる原画像から、第1オブジェクト領域および第2オブジェクト領域を検出する検出部と、
前記原画像から、前記第1オブジェクト領域を含み、前記第2オブジェクト領域を含まない変形領域を設定する設定部と、
前記変形領域内で、前記第1オブジェクト領域のサイズを拡大可能な拡大位置を探索するとともに、当該拡大位置での拡大倍率を算出する算出部と、
前記第1オブジェクト領域を探索された前記拡大位置において前記拡大倍率で拡大し、かつ前記変形領域内の残りの部分を変形処理するとともに、前記第2オブジェクト領域には変形処理を行わないか、変形処理を軽減することによって、変形した原画像を生成する変形部と
を備える、画像処理装置。
A detection unit for detecting the first object region and the second object region from the original image to be processed;
A setting unit that sets, from the original image, a deformation area that includes the first object area and does not include the second object area;
Within the deformation area, a search unit that searches for an enlargement position where the size of the first object area can be enlarged, and calculates an enlargement magnification at the enlargement position;
The first object area is enlarged at the searched enlargement position at the enlargement magnification, and the remaining portion in the deformation area is subjected to deformation processing, and the second object area is not subjected to deformation processing or is deformed. An image processing apparatus comprising: a deformation unit that generates a deformed original image by reducing processing.
前記算出部は、
拡大された前記第1オブジェクト領域の大きさが最大となる位置を、前記拡大位置として算出する、請求項1記載の画像処理装置。
The calculation unit includes:
The image processing apparatus according to claim 1, wherein a position where the size of the enlarged first object area is maximum is calculated as the enlarged position.
前記変形部は、
前記第1オブジェクト領域の位置から前記拡大位置までの移動方向に基づき、前記変形領域を区分した区分領域を生成する区分部と、
前記移動方向に移動し、前記移動方向側にある前記区分領域を縮め、前記移動方向とは反対側にある前記区分領域を引き伸ばし、その他の前記区分領域を前記第1オブジェクト領域の移動に合わせて遷移させるように、各前記区分領域を変形させ、
前記変形領域を歪ませつつ、前記拡大位置で前記第1オブジェクト領域を拡大する領域変形部と
を備える、請求項1又は2記載の画像処理装置。
The deformation part is
A partition unit that generates a partition region that partitions the deformation region based on a movement direction from the position of the first object region to the enlarged position;
Move in the moving direction, shrink the segmented area on the moving direction side, stretch the segmented area on the opposite side to the moving direction, and adjust the other segmented areas to the movement of the first object area Transform each said segmented area to transition,
The image processing apparatus according to claim 1, further comprising: a region deformation unit that expands the first object region at the expansion position while distorting the deformation region.
前記原画像は、
位置および輝度で定義される座標空間において、幾何学平面であるパッチの集合であるメッシュにより表現される画像であり、
前記領域変形部は、
前記区分領域におけるパッチの各頂点を移動させることにより、各前記区分領域を変形させる、請求項3記載の画像処理装置。
The original image is
An image represented by a mesh that is a set of patches that are geometric planes in a coordinate space defined by position and brightness,
The region deformation portion is
The image processing apparatus according to claim 3, wherein each of the divided areas is deformed by moving each vertex of the patch in the divided area.
前記原画像は、
位置及び輝度で表わされるピクセル画像であり、
前記領域変形部は、
前記区分領域におけるピクセルの頂点を移動させることにより、各前記区分領域を変形させる、請求項3記載の画像処理装置。
The original image is
A pixel image represented by position and brightness;
The region deformation portion is
The image processing apparatus according to claim 3, wherein each of the partitioned areas is deformed by moving a vertex of a pixel in the partitioned area.
処理対象となる原画像から、第1オブジェクト領域および第2オブジェクト領域を検出し、
前記原画像から、前記第1オブジェクト領域を含み、前記第2オブジェクト領域を含まない変形領域を設定し、
前記変形領域内で、前記第1オブジェクト領域のサイズを拡大可能な拡大位置を探索するとともに、当該拡大位置での拡大倍率を算出し、
前記第1オブジェクト領域を探索された前記拡大位置において前記拡大倍率で拡大し、かつ前記変形領域内の残りの部分を変形処理するとともに、前記第2オブジェクト領域には変形処理を行わないか、変形処理を軽減することによって、変形した原画像を生成する
画像処理方法。
A first object area and a second object area are detected from an original image to be processed;
From the original image, a deformation area that includes the first object area and does not include the second object area is set.
Within the deformation area, search for an enlargement position where the size of the first object area can be enlarged, and calculate an enlargement magnification at the enlargement position,
The first object area is enlarged at the searched enlargement position at the enlargement magnification, and the remaining portion in the deformation area is subjected to deformation processing, and the second object area is not subjected to deformation processing or is deformed. An image processing method for generating a deformed original image by reducing processing.
コンピュータを、
処理対象となる原画像から、第1オブジェクト領域および第2オブジェクト領域を検出する手段と、
前記原画像から、前記第1オブジェクト領域を含み、前記第2オブジェクト領域を含まない変形領域を設定する手段と、
前記変形領域内で、前記第1オブジェクト領域のサイズを拡大可能な拡大位置を探索するとともに、当該拡大位置での拡大倍率を算出する手段と、
前記第1オブジェクト領域を探索された前記拡大位置において前記拡大倍率で拡大し、かつ前記変形領域内の残りの部分を変形処理するとともに、前記第2オブジェクト領域には変形処理を行わないか、変形処理を軽減することによって、変形した原画像を生成する手段と
して機能させる、画像処理プログラム。
Computer
Means for detecting a first object area and a second object area from an original image to be processed;
Means for setting, from the original image, a deformation area that includes the first object area and does not include the second object area;
In the deformation area, searching for an enlargement position where the size of the first object area can be enlarged, and calculating an enlargement magnification at the enlargement position;
The first object area is enlarged at the searched enlargement position at the enlargement magnification, and the remaining portion in the deformation area is subjected to deformation processing, and the second object area is not subjected to deformation processing or is deformed. An image processing program that functions as means for generating a deformed original image by reducing processing.
JP2011059559A 2011-03-17 2011-03-17 Image processing apparatus, method, and program Expired - Fee Related JP5620313B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011059559A JP5620313B2 (en) 2011-03-17 2011-03-17 Image processing apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011059559A JP5620313B2 (en) 2011-03-17 2011-03-17 Image processing apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2012194893A JP2012194893A (en) 2012-10-11
JP5620313B2 true JP5620313B2 (en) 2014-11-05

Family

ID=47086696

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011059559A Expired - Fee Related JP5620313B2 (en) 2011-03-17 2011-03-17 Image processing apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP5620313B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0628438A (en) * 1992-07-10 1994-02-04 Hitachi Ltd Drawing processing system
JP2919428B2 (en) * 1997-04-10 1999-07-12 日本電気株式会社 Image transformation device
JP2001306058A (en) * 2000-04-25 2001-11-02 Hitachi Ltd Graphic element selecting method and its implementation device, and recording medium recorded with its processing program
JP4774816B2 (en) * 2005-04-07 2011-09-14 ソニー株式会社 Image processing apparatus, image processing method, and computer program.

Also Published As

Publication number Publication date
JP2012194893A (en) 2012-10-11

Similar Documents

Publication Publication Date Title
CN109196561B (en) System and method for three-dimensional garment mesh deformation and layering for fitting visualization
JP5561975B2 (en) Method and apparatus for creating surface processing data
CN112070770B (en) High-precision three-dimensional map and two-dimensional grid map synchronous construction method
CN105046735B (en) A kind of three-dimensional surface texture synthetic method based on Primitive Element Distribution
TWI443603B (en) Two dimensional vector graphics triangulation system and method thereof
JP2011186845A (en) Method and apparatus for creating surface processing data
JPH0935061A (en) Image processing method
JP6902881B2 (en) Information processing device and 3D model generation method
US6844876B2 (en) Apparatus and method for generating 3D graphics
WO2014064864A1 (en) Image-rendering device, image-rendering method, and navigation device
JP4977243B2 (en) Image processing apparatus, method, and program
JP2006072490A (en) Tetrahedron mesh generating method and program
CN112002007B (en) Model acquisition method and device based on air-ground image, equipment and storage medium
JP5620313B2 (en) Image processing apparatus, method, and program
CN108898679A (en) A kind of method of component serial number automatic marking
JP5343875B2 (en) Information search apparatus, information search program, and information search method
JP2009146150A (en) Method and device for detecting feature position
JP2009122998A (en) Method for extracting outline from solid/surface model, and computer software program
JP3928016B2 (en) Triangular mesh generation method and program using maximum angle method
JP2017201454A (en) Image processing device and program
JP7343446B2 (en) Model generation device, method and program
JP2014010111A (en) Measurement device, method and program
CN112396706A (en) Editing device and editing method for three-dimensional shape data and storage medium
JP2868643B2 (en) Method for extracting closed area of figure
JP7455546B2 (en) Image processing device, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131025

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140703

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140918

LAPS Cancellation because of no payment of annual fees