JP2018136797A - Embedded graph simplification device, embedded graph simplification method, and computer program - Google Patents
Embedded graph simplification device, embedded graph simplification method, and computer program Download PDFInfo
- Publication number
- JP2018136797A JP2018136797A JP2017031509A JP2017031509A JP2018136797A JP 2018136797 A JP2018136797 A JP 2018136797A JP 2017031509 A JP2017031509 A JP 2017031509A JP 2017031509 A JP2017031509 A JP 2017031509A JP 2018136797 A JP2018136797 A JP 2018136797A
- Authority
- JP
- Japan
- Prior art keywords
- vertex
- alignment
- embedded graph
- optimization problem
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 54
- 238000004590 computer program Methods 0.000 title claims description 7
- 238000005457 optimization Methods 0.000 claims abstract description 112
- 239000013598 vector Substances 0.000 claims description 100
- 230000014509 gene expression Effects 0.000 claims description 68
- 239000011159 matrix material Substances 0.000 claims description 64
- 238000012545 processing Methods 0.000 claims description 52
- 230000008859 change Effects 0.000 claims description 38
- 238000009472 formulation Methods 0.000 claims description 15
- 239000000203 mixture Substances 0.000 claims description 15
- 238000000354 decomposition reaction Methods 0.000 claims description 13
- 230000002194 synthesizing effect Effects 0.000 claims description 3
- 230000015572 biosynthetic process Effects 0.000 abstract 1
- 238000003786 synthesis reaction Methods 0.000 abstract 1
- 230000006870 function Effects 0.000 description 171
- 238000011156 evaluation Methods 0.000 description 18
- 230000008569 process Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 11
- 238000013507 mapping Methods 0.000 description 11
- 238000004422 calculation algorithm Methods 0.000 description 7
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000013459 approach Methods 0.000 description 3
- 230000006866 deterioration Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000010129 solution processing Methods 0.000 description 2
- 238000005452 bending Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、埋め込みグラフ単純化装置、埋め込みグラフ単純化方法、及びコンピュータプログラムに関する。 The present invention relates to an embedded graph simplification device, an embedded graph simplification method, and a computer program.
ネットワークや地理情報学、画像工学などの諸分野において、埋め込みグラフというデータ構造が存在する。埋め込みグラフとは、複数の頂点とその頂点同士を結ぶ辺の集合であるグラフと、その頂点位置を合わせて定義したものである。例えばネットワークでは、ネットワークノードを頂点、ネットワークリンクを辺に対応させてグラフを構成できる。
このとき、ネットワークノードの物理的な位置や、ネットワークを可視化する際のノード座標を頂点位置に対応させると、埋め込みグラフを見出すことができる。また、地理情報学であれば、国境や県境、海岸線、湖岸線等の境界線データは一般に、埋め込みグラフとしてデータが保持されている。境界線上に密に頂点をプロットして辺を結ぶことで、境界線を表現している。また、画像工学分野であれば、形状や領域に関するデータの保持に埋め込みグラフが使用される。例えばベクター画像におけるオブジェクト形状、深度マップにおける深度境界線、自然画像の被写体形状やテクスチャ領域形状等のデータは、埋め込みグラフとして表現される。形状や領域の境界上に頂点をプロットすることで、境界線を辺により表現している。
Data structures called embedded graphs exist in various fields such as networks, geographic informatics, and image engineering. An embedded graph is defined by combining a graph, which is a set of edges connecting a plurality of vertices and their vertices, and the vertex positions. For example, in a network, a graph can be constructed by associating network nodes with vertices and network links with edges.
At this time, the embedded graph can be found by associating the physical position of the network node or the node coordinates when visualizing the network with the vertex position. In addition, in the case of geographic informatics, border line data such as borders, prefectural borders, coast lines, lake shore lines, etc. are generally held as embedded graphs. The boundary line is expressed by densely plotting vertices on the boundary line and connecting the edges. In the field of image engineering, an embedded graph is used to hold data on shapes and areas. For example, data such as an object shape in a vector image, a depth boundary line in a depth map, a subject shape of a natural image, and a texture region shape are represented as an embedded graph. By plotting the vertices on the boundary of the shape or area, the boundary line is expressed by an edge.
以上で例示した埋め込みグラフにおいては、埋め込みグラフの形状をできるだけ保ちつつ、頂点数や辺数を可能な限り削減して単純化すること(以下、埋め込みグラフの単純化、あるいは単に単純化と呼ぶ)に大きなメリットがある。 In the embedded graph illustrated above, the shape of the embedded graph is maintained as much as possible, and the number of vertices and the number of edges are reduced as much as possible (hereinafter referred to as simplification of the embedded graph or simply simplified). Has a great advantage.
ネットワークにおいては、頂点数、辺数が多いほど詳細なデータを表現できる一方で、一見してネットワーク構成の概要を掴むことが困難になり、加えてデータ量が膨大になるため描画に大きな負荷がかかる。このネットワークについての埋め込みグラフを単純化できれば、ネットワーク構成を視覚的に分かりやすく提示でき、頂点数、辺数を減らしてデータ圧縮し、描画の負荷を低減することが可能になる。地理情報学においては、境界線上に密に頂点をプロットすることで正確に境界線を表現するが、データ量は膨大になってしまう。境界線データを単純化することで、データ量を削減して伝送や蓄積が可能な他、境界を簡略した視覚的に分かりやすい地理情報を生成することができる。また画像工学においては、頂点数、辺数が多いほど形状や領域のデータを詳細に保持して正確に表現可能である一方で、データ量が膨大になり、伝送や蓄積に要する符号量が増えてしまう。この形状や領域を単純化できれば、表現の正確性を可能な限り保ちながら、頂点数、辺数を削減して符号量を削減できる。 In a network, more data can be expressed as the number of vertices and the number of sides increases. On the other hand, it becomes difficult to grasp the outline of the network configuration at a glance. Take it. If the embedded graph for this network can be simplified, the network configuration can be presented visually intelligibly, the number of vertices and sides can be reduced, data can be compressed, and the drawing load can be reduced. In geographic informatics, a boundary line is accurately expressed by densely plotting vertices on the boundary line, but the amount of data becomes enormous. By simplifying the boundary line data, it is possible to reduce the amount of data to be transmitted and stored, and to generate visually easy-to-understand geographical information with simplified boundaries. In image engineering, as the number of vertices and sides increases, shape and area data can be retained in detail and expressed accurately, but the amount of data becomes enormous and the amount of code required for transmission and storage increases. End up. If this shape and area can be simplified, the number of vertices and the number of sides can be reduced and the amount of codes can be reduced while maintaining the accuracy of expression as much as possible.
折れ線グラフや多角形等、非常に簡単な埋め込みグラフを単純化する有効な手法として、Ramer−Douglas−Peucker法(非特許文献1以下RDP法)がある。以下、折れ線分にRDP法を適用する場合のアルゴリズムを説明する。この手法では、(1)まず折れ線分の両端頂点を結んだ線分を初期の折れ線分とする。(2)現在の折れ線分と最も距離の離れた頂点を現在の折れ線分に順次加える。(3)最も離れた頂点との距離が予め定めた許容誤差ε(>0)よりも小さくなった時点で処理を終了する。
As an effective method for simplifying a very simple embedded graph such as a line graph or a polygon, there is a Ramer-Doubles-Peucker method (
図13は、RDP法の動作例を示している。図13において、白丸及び破線は入力した埋め込みグラフの折れ線成分を示し、黒丸及び実線は単純化した埋め込みグラフの折れ線成分を示す。図13(A)は初期状態(状態ST0)である。初期状態では、折れ線分の端点を繋いだ線分を初期の折れ線分E1とする。次のステップで加える頂点は、折れ線分E1からもっとも離れた頂点V1である。図13(B)に示すように、状態ST1では、頂点V1を折れ線成分E1に加えて、新しい折れ線成分E2とする。次のステップで加える頂点は、折れ線分E2からもっとも離れた頂点V2である。図13(C)に示すように、状態ST2では、頂点V2を折れ線成分E2に加えて、新しい折れ線成分E3とする。次のステップで加える頂点は、折れ線分E3からもっとも離れた頂点V3である。図13(D)に示すように、状態ST3では、頂点V3を折れ線成分E3に加えて、新しい折れ線成分E4とする。状態ST3では、全ての頂点が折れ線分E4から許容誤差以内の距離となり、ここで、単純化処理は終了となる。 FIG. 13 shows an operation example of the RDP method. In FIG. 13, white circles and broken lines indicate line components of the input embedded graph, and black circles and solid lines indicate line components of the simplified embedded graph. FIG. 13A shows an initial state (state ST0). In the initial state, a line segment connecting the end points of the broken line segment is defined as an initial broken line segment E1. The vertex to be added in the next step is the vertex V1 farthest from the broken line segment E1. As shown in FIG. 13B, in the state ST1, the vertex V1 is added to the polygonal line component E1 to form a new polygonal line component E2. The vertex to be added in the next step is the vertex V2 farthest from the broken line segment E2. As shown in FIG. 13C, in the state ST2, the vertex V2 is added to the polygonal line component E2 to obtain a new polygonal line component E3. The vertex added in the next step is the vertex V3 farthest from the broken line segment E3. As shown in FIG. 13D, in the state ST3, the vertex V3 is added to the polygonal line component E3 to obtain a new polygonal line component E4. In the state ST3, all the vertices are within the allowable error from the broken line segment E4, and the simplification process ends here.
多角形の場合は両端点の代わりに、多角形頂点から適切に2点を選んで初期の折れ線分と設定することで、折れ線分のRDP法を適用可能である。さらにRDP法では、使用者が指定した特定の頂点を、入力埋め込みグラフと同じ頂点位置で、必ず含むように単純化を行うことも可能である。初期の折れ線分作成時に指定頂点を加え、処理を開始すれば良い。 In the case of a polygon, the RDP method can be applied by appropriately selecting two points from polygon vertices and setting them as the initial broken line instead of the end points. Furthermore, in the RDP method, simplification can be performed so that a specific vertex designated by the user is always included at the same vertex position as that of the input embedded graph. The specified vertex is added when the initial line segment is created, and the process is started.
RDP法は形状近似の精度の高さ、実装の容易さなどから最もよく使用される方法である。例えばコンピュータビジョン向けのコンピュータプログラムライブラリであるOpenCVでは、被写体形状の単純化や輪郭の近似処理としてRDP法が採用されている。 The RDP method is most often used because of its high accuracy of shape approximation, ease of mounting, and the like. For example, OpenCV, which is a computer program library for computer vision, employs the RDP method for simplifying a subject shape and approximating a contour.
上述したRDP法では以下の2つの問題が生じる。(1)折れ線分や多角形を除く、複雑な埋め込みグラフへの適用が困難である。(2)単純化した埋め込みグラフの頂点位置は、元の埋め込みグラフの頂点位置を厳密に守るため、頂点位置を微小に変位させてより良い単純化を算出することができない。 The RDP method described above has the following two problems. (1) It is difficult to apply to complicated embedded graphs excluding broken line segments and polygons. (2) Since the vertex position of the simplified embedded graph strictly protects the vertex position of the original embedded graph, it is not possible to calculate better simplification by slightly shifting the vertex position.
上述の(1)の問題について説明する。上述したネットワークや地図・交通解析、画像・映像符号化の例でも見られるように、一般に埋め込みグラフは分岐、複数のループ、非結合グラフ等を持ち、折れ線分や多角形よりも複雑な構造を持つ。RDP法はこのような複雑なグラフを単純化することができない。あるいは折れ線や多角形に分解する前処理と分解したグラフを結合する後処理を行えば、複雑なグラフについてもRDP法を適用できる。しかし分岐数が多い複雑なグラフでは分解数が増えて端点が増えるため、複雑なグラフほど頂点や辺の削減が困難になる。 The above problem (1) will be described. As seen in the network, map / traffic analysis, and image / video coding examples described above, embedded graphs generally have branches, multiple loops, unconnected graphs, etc., and have a more complex structure than line segments and polygons. Have. The RDP method cannot simplify such a complex graph. Alternatively, the RDP method can be applied to complex graphs by performing pre-processing that decomposes into polygonal lines and polygons and post-processing that combines the decomposed graphs. However, since the number of decompositions increases and the number of endpoints increases in a complex graph with a large number of branches, it is more difficult to reduce vertices and edges in a complex graph.
上述の(2)の問題について説明する。RDP法では元の埋め込みグラフの頂点を選択して新しい埋め込みグラフを構成するため、新しい埋め込みグラフの頂点位置は元の埋め込みグラフと同じ頂点位置に必ず限定される。一般に、頂点位置が微小に変位することを許容すればより良い単純化をすることができるが、RDP法ではこれを算出できない。また同じ理由で、使用者が特定頂点に課す制約についても、入力と同じ頂点位置であることしか指定できない。 The above problem (2) will be described. In the RDP method, since a new embedded graph is configured by selecting vertices of the original embedded graph, the vertex positions of the new embedded graph are always limited to the same vertex positions as the original embedded graph. In general, better simplification can be achieved if the vertex position is allowed to be slightly displaced, but this cannot be calculated by the RDP method. For the same reason, the constraint imposed on the specific vertex by the user can only specify that the vertex position is the same as the input.
上記事情に鑑み、本発明は、頂点位置が元の埋め込みグラフの頂点位置に限定されない埋め込みグラフ単純化装置、埋め込みグラフ単純化方法、及びコンピュータプログラムを提供することを目的としている。
また、本発明の副次的な課題は、複雑な埋め込みグラフにおいても頂点や辺を削減可能とすることである。
In view of the above circumstances, an object of the present invention is to provide an embedded graph simplification device, an embedded graph simplification method, and a computer program whose vertex positions are not limited to the vertex positions of the original embedded graph.
Further, a secondary problem of the present invention is to make it possible to reduce vertices and edges even in a complicated embedded graph.
本発明の一態様は、頂点の位置情報を有する埋め込みグラフを単純化する埋め込みグラフ単純化装置であって、各頂点に接続する辺の成す角度が小さくなるように頂点位置を整列する埋め込みグラフ整列部、を備え、前記埋め込みグラフ整列部は、整列のための最適化問題を立式して出力する最適化問題立式部と、前記最適化問題立式部で出力された整列のための最適化問題を求解して、整列された頂点位置を求める最適化問題求解部と、前記最適化問題求解部で求められた頂点位置で、前記埋め込みグラフの頂点の位置情報を置き換える頂点情報置換部と、を備え、前記最適化問題立式部は、整列された埋め込みグラフの頂点位置を変数として用いて、整列された埋め込みグラフが直線に近い度合いを評価する整列正則化関数を生成する整列正則化関数立式部と、整列された後の前記頂点位置の範囲に関する制約条件を生成する制約条件立式部と、前記整列正則化関数立式部が生成した前記整列正則化関数に基づく目的関数と前記制約条件とを合わせて最適化問題を生成する最適化問題生成部と、を備え、前記整列正則化関数立式部は、前記埋め込みグラフに含まれる各頂点に接続する辺の向きおよび大きさを表す辺ベクトルを求め、前記頂点に接続される2つの辺の大きさと前記2つの辺が成す角度とを、前記2つの辺の大きさによる影響が相対的に小さく前記2つの辺が成す角度による影響が相対的に大きくなるように重み付け合成して、前記整列正則化関数を生成する、埋め込みグラフ単純化装置である。 One aspect of the present invention is an embedding graph simplification device that simplifies an embedding graph having vertex position information, and embedding graph alignment that aligns vertex positions so that an angle formed by edges connected to each vertex is reduced. The embedded graph alignment unit includes an optimization problem expression unit that forms and outputs an optimization problem for alignment, and an optimization for alignment output by the optimization problem expression unit. An optimization problem solving unit that solves the optimization problem and obtains aligned vertex positions; and a vertex information replacement unit that replaces the position information of the vertices of the embedded graph with the vertex positions obtained by the optimization problem solving unit; The optimization problem expression unit generates an alignment regularization function that evaluates the degree to which the aligned embedded graph is close to a straight line using a vertex position of the aligned embedded graph as a variable. A regularization function formula part, a constraint condition formula part for generating a constraint condition relating to the range of the vertex positions after being aligned, and an object based on the alignment regularization function generated by the alignment regularization function formula part An optimization problem generation unit that generates an optimization problem by combining a function and the constraint condition, and the alignment regularization function expression unit includes a direction of an edge connected to each vertex included in the embedded graph, and A side vector representing a size is obtained, and the size of the two sides connected to the vertex and the angle formed by the two sides are determined so that the influence of the size of the two sides is relatively small. This is an embedded graph simplification device that generates the alignment regularization function by weighting and synthesizing so that the influence of the formed angle becomes relatively large.
本発明の一態様は、上記の埋め込みグラフ単純化装置であって、前記最適化問題立式部は、整列された埋め込みグラフの頂点位置を変数としたときに、前記変数が元の頂点位置とどれだけ乖離しているかを評価する頂点位置変化損失関数を生成する頂点位置変化損失関数立式部と、整列正則化関数立式部が出力した前記整列正則化関数にトレードオフパラメータを乗算する乗算器と、前記頂点位置変化損失関数と、前記トレードオフパラメータが乗算された整列正則化関数とを線形結合して目的関数を生成する加算器と、を備え、前記最適化問題生成部は、前記加算器が出力した前記目的関数と前記制約条件とを合わせて最適化問題を生成する、埋め込みグラフ単純化装置である。 One aspect of the present invention is the above-described embedded graph simplification device, wherein the optimization problem equation unit uses the vertex position of the aligned embedded graph as a variable, and the variable is the original vertex position. A vertex position change loss function formula part that generates a vertex position change loss function that evaluates how far apart, and a multiplication that multiplies the alignment regularization function output by the alignment regularization function formula part by a trade-off parameter. And an adder that linearly combines the vertex position change loss function and the aligned regularization function multiplied by the trade-off parameter to generate an objective function, and the optimization problem generator includes the optimization problem generator An embedded graph simplification device that generates an optimization problem by combining the objective function output from an adder and the constraint condition.
本発明の一態様は、上記の埋め込みグラフ単純化装置であって、前記埋め込みグラフ整列部によって整列された埋め込みグラフから、接続する辺の成す角度が小さい頂点を選定し、前記接続する辺の成す角度が小さい頂点を取り除く不要頂点除去部、をさらに備える、埋め込みグラフ単純化装置である。 One aspect of the present invention is the above-described embedding graph simplification device, wherein a vertex having a small angle between connecting edges is selected from the embedding graph aligned by the embedding graph alignment unit, and the connecting edges are formed. The embedded graph simplification device further includes an unnecessary vertex removal unit that removes a vertex having a small angle.
本発明の一態様は、上記の埋め込みグラフ単純化装置であって、前記整列正則化関数立式部は、前記埋め込みグラフに含まれる頂点のうち接続される辺の数が2である頂点に、当該頂点に接続される各々の辺の大きさと向きを表す辺ベクトル生成線形写像Lm(mは頂点のインデックス,m=1,・・・,M)を生成する辺ベクトル生成線形写像生成部と、前記辺ベクトル生成線形写像生成部が出力した前記辺ベクトル生成線形写像Lmと前記埋め込みグラフの頂点情報を示す変数Uとを入力して、辺ベクトル行列Pm(Pm=LmU)を生成する辺ベクトル行列生成部と、前記辺ベクトル行列生成部が出力した前記辺ベクトル行列Pmの、辺の大きさに対応する第1特異値と、2辺が成す角度に対応する第2特異値と、を求める特異値分解部と、前記第1特異値および前記第2特異値にそれぞれ対応する第1重み値w1および第2重み値w2を用いて、前記第1特異値および前記第2特異値の加重和を生成する加重和生成部と、前記加重和生成部が出力した前記加重和または前記加重和の2乗の、全ての頂点の総和を整列正則化関数として生成する総和生成部と、を備え、前記加重和生成部は、(w2≧w1≧0)の関係を満たす前記第1重み値w1および前記第2重み値w2を用いる、埋め込みグラフ単純化装置である。 One aspect of the present invention is the above-described embedded graph simplification device, in which the alignment regularization function expression unit includes vertices included in the embedded graph having vertices with two connected edges, An edge vector generation linear map generation unit for generating an edge vector generation linear map L m (m is an index of the vertex, m = 1,..., M) representing the size and direction of each edge connected to the vertex; The edge vector generation linear map L m output from the edge vector generation linear map generation unit and the variable U indicating the vertex information of the embedded graph are input, and the edge vector matrix P m (P m = L m U) and the side vector matrix generating unit that generates, the edge vector matrix generating unit the side vector matrix P m outputted, the first singular value corresponding to the magnitude of the sides, the second corresponding to the angle at which the two sides forms Singular value and singularity to find Weighting of the first singular value and the second singular value using a value decomposing unit, and a first weight value w 1 and a second weight value w 2 respectively corresponding to the first singular value and the second singular value A weighted sum generation unit that generates a sum; and a sum generation unit that generates a sum of all vertices of the weighted sum or the square of the weighted sum output by the weighted sum generation unit as an aligned regularization function. The weighted sum generation unit is an embedded graph simplification device that uses the first weight value w 1 and the second weight value w 2 that satisfy the relationship (w 2 ≧ w 1 ≧ 0).
本発明の一態様は、頂点の位置情報を有する埋め込みグラフを単純化する埋め込みグラフ単純化方法であって、各頂点に接続する辺の成す角度が小さくなるように頂点位置を整列する埋め込みグラフ整列処理ステップ、を有し、前記埋め込みグラフ整列処理ステップは、整列のための最適化問題を立式して出力する最適化問題立式処理ステップと、前記最適化問題立式処理ステップで出力された整列のための最適化問題を求解して、整列された頂点位置を求める最適化問題求解処理ステップと、前記最適化問題求解処理ステップで求められた頂点位置で、前記埋め込みグラフの頂点の位置情報を置き換える頂点情報置換処理ステップと、を有し、前記最適化問題立式処理ステップは、整列された埋め込みグラフの頂点位置を変数として用いて、整列された埋め込みグラフが直線に近い度合いを評価する整列正則化関数を生成する整列正則化関数立式処理ステップと、整列された後の前記頂点位置の範囲に関する制約条件を生成する制約条件立式処理ステップと、前記整列正則化関数立式処理ステップで生成した前記整列正則化関数に基づく目的関数と前記制約条件とを合わせて最適化問題を生成する最適化問題生成処理ステップと、を有し、前記整列正則化関数立式処理ステップは、前記埋め込みグラフに含まれる各頂点に接続する辺の向きおよび大きさを表す辺ベクトルを求め、前記頂点に接続される2つの辺の大きさと前記2つの辺が成す角度とを、前記2つの辺の大きさによる影響が相対的に小さく前記2つの辺が成す角度による影響が相対的に大きくなるように重み付け合成して、前記整列正則化関数を生成する、埋め込みグラフ単純化方法である。 One aspect of the present invention is an embedding graph simplification method for simplifying an embedding graph having vertex position information, and embedding graph alignment for aligning vertex positions so that an angle formed by edges connected to each vertex is reduced. The embedded graph alignment processing step is output in the optimization problem formulation processing step for formulating and outputting an optimization problem for alignment, and the optimization problem formulation processing step. An optimization problem solution processing step for finding an optimization problem for alignment and obtaining aligned vertex positions, and vertex position information of the embedded graph at the vertex positions determined in the optimization problem solution processing step And the optimization problem formula processing step uses the vertex position of the aligned embedded graph as a variable. An alignment regularization function formula processing step for generating an alignment regularization function for evaluating the degree of the aligned embedded graph being close to a straight line, and a constraint condition formula for generating a constraint condition regarding the range of the vertex positions after the alignment And an optimization problem generation processing step for generating an optimization problem by combining the objective function based on the alignment regularization function generated in the alignment regularization function formula processing step and the constraint condition. The alignment regularization function equation processing step obtains an edge vector representing the direction and size of an edge connected to each vertex included in the embedded graph, and calculates the size of the two edges connected to the vertex and the 2 The angle formed by two sides is weighted so that the effect of the size of the two sides is relatively small and the effect of the angle formed by the two sides is relatively large. To generate the alignment regularization function, an embedded graph simplification method.
本発明の一態様は、コンピュータを、上記の埋め込みグラフ単純化装置として機能させるためのコンピュータプログラムである。 One embodiment of the present invention is a computer program for causing a computer to function as the above-described embedded graph simplification apparatus.
本発明によれば、複雑な埋め込みグラフにおいても頂点や辺を削減可能で、頂点位置が元の埋め込みグラフの頂点位置に限定されず、埋め込みグラフ単純化が可能となる。 According to the present invention, vertices and edges can be reduced even in a complicated embedded graph, and the vertex position is not limited to the vertex position of the original embedded graph, and the embedded graph can be simplified.
以下、本発明の実施形態について図面を参照して説明する。
[第1実施形態]
図1は、本発明の一実施形態における埋め込みグラフ単純化装置1の構成を示すブロック図である。埋め込みグラフ単純化装置1は、バスで接続されたCPU(Central Processing Unit)やメモリや補助記憶装置などを備え、プログラムを実行する。埋め込みグラフ単純化装置1は、プログラムの実行によって埋め込みグラフ直線整列部11及び不要頂点除去部12を備える装置として機能する。なお、埋め込みグラフ単純化装置1の各機能の全て又は一部は、ASIC(Application Specific Integrated Circuit)やPLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等のハードウェアを用いて実現されてもよい。プログラムは、コンピュータ読み取り可能な記録媒体に記録されてもよい。コンピュータ読み取り可能な記録媒体とは、例えばフレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置である。プログラムは、電気通信回線を介して送信されてもよい。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
FIG. 1 is a block diagram showing a configuration of an embedded
図1において、埋め込みグラフ単純化装置1は、元の埋め込みグラフG=(V,E)とトレードオフパラメータλとを入力して、単純化された埋め込みグラフG*=(V*,E*)を出力する。ここで、埋め込みグラフとは、図1に示すように、異なる位置に配置された複数の点と、当該複数の点同士の接続によって形状を示す二次元データであり、埋め込みグラフ単純化装置1は、より広い概念では、このような二次元データを対象として単純化を行う二次元データ単純化装置であると言える。
In FIG. 1, an embedded
元の埋め込みグラフG=(V,E)において、Vは元の埋め込みグラフGの頂点情報であり、各頂点の頂点ID(IDentification)及び頂点の位置の情報を含む。データ構造の例としてD次元座標空間上に分布するN個の頂点を考えると、各頂点に「1」から「N」の整数の頂点IDを任意に付与して、各頂点の座標値を頂点IDの順に並べたN行D列行列をVとすれば、上記頂点情報の要件を満たす。本実施形態では、この例に倣って、元の頂点情報VをN行D列行列として記述する。なお、N行D列行列のデータ構造以外に、等価に変換可能な別のデータ構造を用いても良い。Eは元の埋め込みグラフGの辺情報で、どの頂点を接続して各辺を成しているかという情報を含む。辺情報Eのデータ構造の例としては、隣接リスト、隣接行列、接続行列、ラプラシアン行列、Tutte行列等がある。これらは、互いに等価に変換できることから、いずれを用いても良い。 In the original embedding graph G = (V, E), V is the vertex information of the original embedding graph G, and includes the vertex ID (IDentification) of each vertex and information on the position of the vertex. As an example of the data structure, when N vertices distributed in the D-dimensional coordinate space are considered, an integer vertex ID from “1” to “N” is arbitrarily assigned to each vertex, and the coordinate value of each vertex is assigned to the vertex. If the N-row D-column matrix arranged in the order of ID is V, the above vertex information requirement is satisfied. In the present embodiment, following this example, the original vertex information V is described as an N-row D-column matrix. In addition to the data structure of the N-row D-column matrix, another data structure that can be converted equivalently may be used. E is edge information of the original embedded graph G, and includes information indicating which vertices are connected to form each edge. Examples of the data structure of the edge information E include an adjacency list, an adjacency matrix, a connection matrix, a Laplacian matrix, and a Tute matrix. Any of these may be used because they can be converted equivalently.
単純化された埋め込みグラフG*=(V*,E*)において、V*は単純化された埋め込みグラフG*の頂点情報であり、E*は単純化された埋め込みグラフG*の辺情報である。単純化された埋め込みグラフG*の頂点情報V*、及び辺情報E*のデータ構造は、上記の元の埋め込みグラフGの頂点情報V及び辺情報Eと同様のデータ構造である。ただし、単純化された埋め込みグラフG*は、元の埋め込みグラフGに比べて頂点数や辺数は減少している。 In the simplified embedded graph G * = (V * , E * ), V * is the vertex information of the simplified embedded graph G * , and E * is the edge information of the simplified embedded graph G *. is there. The data structure of the vertex information V * and the edge information E * of the simplified embedded graph G * is the same data structure as the vertex information V and the edge information E of the original embedded graph G. However, the simplified embedded graph G * has a reduced number of vertices and sides compared to the original embedded graph G.
トレードオフパラメータλは正の実数値であり、大きいほど単純化の度合いを強くし、埋め込みグラフの頂点数が減少するよう調整することができる。 The trade-off parameter λ is a positive real value. The larger the tradeoff parameter λ, the stronger the degree of simplification, and the smaller the number of vertices of the embedded graph can be adjusted.
図1に示すように、埋め込みグラフ単純化装置1は、埋め込みグラフ直線整列部11と、不要頂点除去部12とを備える。埋め込みグラフ直線整列部11は、元の埋め込みグラフG=(V,E)と、トレードオフパラメータλとを入力して、直線整列された埋め込みグラフG’=(V’,E)を出力する。
As shown in FIG. 1, the embedded
なお、本実施形態において「直線整列」とは、埋め込みグラフを構成する一連の頂点の少なくとも一部の並びが、例えばジグザグの形状から、なるべく直線に近い形状になるように頂点位置を変更することである。この直線整列の処理の結果、一連の頂点の並びが真に1本の直線状に並ぶ場合もあり、また、真の直線にはならないものの直線に近い度合いが高まる場合もある。また、「直線整列」のことを単に「整列」とも呼ぶ。 In this embodiment, “straight line alignment” means to change the vertex position so that at least a part of a series of vertices constituting the embedded graph becomes, for example, a zigzag shape as close to a straight line as possible. It is. As a result of this straight line alignment processing, a series of vertexes may be arranged in a truly straight line, or the degree close to a straight line may be increased although it does not become a true straight line. “Linear alignment” is also simply referred to as “alignment”.
埋め込みグラフG’の辺情報Eは、元の埋め込みグラフGの辺情報Eと同一の情報である。頂点情報V’のデータ構造及び頂点IDは、元の頂点情報Vと同一であり、頂点位置のみが頂点情報Vと異なる。また、埋め込みグラフ直線整列部11は、元の埋め込みグラフGよりも直線整列するように変形した埋め込みグラフG’を生成する。例えば、埋め込みグラフ直線整列部11は、図1に示すように埋め込みグラフGの各頂点の座標を微小に動かし、1つの直線上に多くの頂点が並ぶように局所的に線形に整列(以下、局所線形整列という)させていき、埋め込みグラフG’を生成する。換言すると、埋め込みグラフ直線整列部11は、各頂点に接続する辺の成す角度が小さくなるように頂点位置を直線整列する。ここで「各頂点に接続する辺の成す角度が小さくなる」とは、ある特定の頂点に接続する2つの辺の成す角度が180度(直線)に近付くことを意味する。
The edge information E of the embedded graph G ′ is the same information as the edge information E of the original embedded graph G. The data structure and vertex ID of the vertex information V ′ are the same as the original vertex information V, and only the vertex position is different from the vertex information V. Further, the embedded graph straight
また、埋め込みグラフ直線整列部11は、当該変形の際、トレードオフパラメータλが大きいほど直線に整列する度合いを強くする。換言すると、トレードオフパラメータλが大きいほど、埋め込みグラフG’の形状が、より少ない数の直線で表されることになる。
In addition, the embedded graph straight
不要頂点除去部12は、直線整列された埋め込みグラフG’=(V’,E)を入力して、単純化された埋め込みグラフG*=(V*,E*)を出力する。直線整列された埋め込みグラフG’の多くの頂点では、接続する辺の成す角度が小さくなっている。そのため、不要頂点除去部12は、当該角度が予め定めた閾値以下の頂点を選定して取り除く、すなわちデシメーションすることで単純化した埋め込みグラフG*=(V*,E*)を生成する。例えば、図1では、直線整列された埋め込みグラフG’の黒色の点を不要な頂点として取り除き、白色の点で構成させる直線整列された埋め込みグラフG’を生成している例を示している。
The unnecessary
図2は、図1に示す埋め込みグラフ直線整列部11の詳細な構成を示すブロック図である。図2に示すように、埋め込みグラフ直線整列部11は、直線整列のための最適化問題立式部111と、最適化問題求解部112と、頂点情報置換部113とを備える。
FIG. 2 is a block diagram showing a detailed configuration of the embedded graph
直線整列のための最適化問題立式部111は、元の埋め込みグラフG=(V,E)と、トレードオフパラメータλとを入力して、直線整列のための最適化問題を出力する。出力する最適化問題は、目的関数と制約条件を記述した数式であり、式(1)で示される。なお、この最適化問題は、凸最適化問題であってもよく、また非凸最適化問題であってもよい。
The optimization
この式(1)は、これから求めたい直線整列された埋め込みグラフの頂点情報を示す変数をUとして、「subject toの右側の制約を満たす変数Uの中で、minimizeの右側の目的関数値を最小にするN行D列の行列Uを求めよ」という最適化問題を表現している。 This equation (1) is defined as the variable indicating the vertex information of the straight line-aligned embedded graph to be obtained, and the objective function value on the right side of “minimize” is minimized among the variables U satisfying the constraints on the right side of “subject to”. The optimization problem of “find the matrix U of N rows and D columns” is expressed.
目的関数は二つの項の線形結合で構成されている。第一項は、直線整列された埋め込みグラフの頂点情報を変数Uとしたときに、元の埋め込みグラフの頂点情報Vと変数Uとがどれだけ乖離しているかを評価するコスト、すなわち評価値である。すなわち、第一項は、整列による頂点座標の極端な変化を抑制できているかを示す忠実化項といえる。 The objective function consists of a linear combination of two terms. The first term is a cost for evaluating how far the vertex information V of the original embedded graph and the variable U differ from each other when the vertex information of the linearly aligned embedded graph is a variable U, that is, an evaluation value. is there. That is, the first term can be said to be a fidelity term indicating whether extreme changes in vertex coordinates due to alignment can be suppressed.
第二項は、直線整列された埋め込みグラフの頂点情報を変数Uとしたときに、埋め込みグラフ(U,E)が直線整列されている度合いを評価するコスト、すなわち評価値である。すなわち、第二項は、辺の折れ曲がりに対するペナルティ、換言すると直線整列のなめらかさを示す正則化項といえる。 The second term is a cost for evaluating the degree to which the embedded graph (U, E) is aligned in a straight line when the vertex information of the embedded graph aligned in a straight line is a variable U, that is, an evaluation value. In other words, the second term can be said to be a regularization term indicating a penalty for side bending, in other words, a smoothness of straight line alignment.
制約条件は、直線整列された埋め込みグラフの頂点情報を示す変数Uの可動範囲を表している。この最適化問題は、後続の最適化問題求解部112により解を求めることで、直線整列された頂点情報V’が生成されるよう設計されている。
The constraint condition represents the movable range of the variable U indicating the vertex information of the embedded graph arranged in a straight line. This optimization problem is designed so that the vertex information V ′ aligned in a straight line is generated by obtaining a solution by the subsequent optimization
式(1)において、fは頂点位置変化損失関数であり、gは辺ベクトル角評価関数である。頂点位置変化損失関数f及び辺ベクトル角評価関数gは、微分可能であるか、または近接写像計算可能な関数である。Lmは辺ベクトル生成線形写像である。Cは制約集合である。制約集合Cは、射影が計算可能な集合である。 In Expression (1), f is a vertex position change loss function, and g is an edge vector angle evaluation function. The vertex position change loss function f and the edge vector angle evaluation function g are differentiable functions or functions that can be calculated by proximity mapping. L m is an edge vector generation linear mapping. C is a constraint set. The constraint set C is a set whose projection can be calculated.
最適化問題求解部112は、最適化問題を入力として、その解を求め、直線整列された頂点情報V’を出力する。解を求めるためのアルゴリズムは任意に選択することができる。例えば、PDS法(Primal Dual Splitting Method)では、頂点位置変化損失関数fの勾配計算、あるいは近接写像、辺ベクトル角評価関数gの勾配計算、あるいは近接写像、辺ベクトル生成線形写像Lmとその共役写像Lm T(m=1,…,M)、制約集合Cへの射影、四則演算を組み合わせた反復で、最適化問題を求解することができる。なお、PDS法については、以下の参考文献1に記載されている。
The optimization
[参考文献1]:Condat, “A Generic Proximal Algorithm for Convex Optimization -Application to Total Variation Minimization”, Signal Process IEEE, vol. 21, no. 8, pp. 985-989, 2014. [Reference 1]: Condat, “A Generic Proximal Algorithm for Convex Optimization-Application to Total Variation Minimization”, Signal Process IEEE, vol. 21, no. 8, pp. 985-989, 2014.
頂点情報置換部113は、直線整列された頂点情報V’と、元の埋め込みグラフG=(V,E)とを入力して、元の頂点情報Vを直線整列された頂点情報V’に置き換え、直線整列された埋め込みグラフG’=(V’,E)を出力する。つまり、頂点情報置換部113は、最適化問題求解部112で求められた頂点位置で、埋め込みグラフの頂点の位置情報を置き換える。
The vertex
図3は、図2に示した直線整列のための最適化問題立式部111の詳細な構成を示すブロック図である。図3に示すように、直線整列のための最適化問題立式部111は、頂点辺情報分解部1111と、頂点位置変化損失関数立式部1112と、直線整列正則化関数立式部1113と、乗算器1114と、加算器1115と、制約条件立式部1116と、最適化問題生成部1117とを備える。
FIG. 3 is a block diagram showing a detailed configuration of the optimization
頂点辺情報分解部1111は、元の埋め込みグラフG=(V,E)を入力し、元の頂点情報Vと元の辺情報Eに分解して出力する。
The vertex edge
頂点位置変化損失関数立式部1112は、元の頂点情報Vを入力して、頂点位置変化損失関数fを出力する。頂点位置変化損失関数fは、直線整列された埋め込みグラフの頂点情報を変数Uとしたときに、元の頂点情報Vと変数Uとがどれだけ乖離しているかを評価するコストである。頂点位置変化損失関数fは、変数Uと元の頂点情報Vとの絶対値残差や二乗残差を評価する。頂点位置変化損失関数fとしては、式(2)〜(4)に例示するような関数を用いることができる。
The vertex position change loss
式(2)〜(4)において、vn,d及びun,dは、それぞれ、頂点情報Vの行列や変数Uの行列のn行d列成分であり、頂点IDがnである頂点情報の第d軸成分の値を表す。なお、式(3)及び式(4)におけるvecは、行列の要素を列ベクトルに並べ替える関数である。なお、頂点位置変化損失関数fとして用いる関数は、凸関数であってもよく、非凸関数であってもよい。 In equations (2) to (4), v n, d and u n, d are the n-row and d-column components of the matrix of vertex information V and the matrix of variable U, respectively, and vertex information whose vertex ID is n Represents the value of the d-th axis component. Note that “vec” in the equations (3) and (4) is a function for rearranging the elements of the matrix into column vectors. The function used as the vertex position change loss function f may be a convex function or a non-convex function.
直線整列正則化関数立式部1113は、辺情報Eを入力して、各頂点に接続する辺の成す角度を評価する直線整列正則化関数(整列正則化関数)を出力する。直線整列正則関数は、一連の頂点の並びが直線に近い度合いを評価するための関数である。直線整列正則化関数は、式(5)に例示するようなものを用いることができる。
The straight line alignment regularization
式(5)に示す関数は、直線整列された埋め込みグラフの頂点情報を変数Uとしたときに、変数Uを用いた埋め込みグラフ(U,E)が直線整列されている度合いを評価するコストである。このコストは、辺ベクトル生成線形写像Lm(m=1,…,M)と、辺ベクトル角評価関数gと、累積演算Σとで構成される。辺ベクトル生成線形写像Lm(m=1,…,M)は、直線整列された埋め込みグラフの頂点情報を示す変数Uから、次数(接続する辺の数)が2の頂点毎に接続する辺の大きさと向きを表すベクトル(辺ベクトル)を生成する操作を行う。辺ベクトル角評価関数gは、抽出した辺ベクトルの成す角度を核ノルムで評価する。累積演算Σは、これらの評価値を足し合わせる。以下に、この算出法を説明する。 The function shown in equation (5) is a cost for evaluating the degree to which the embedded graph (U, E) using the variable U is linearly aligned when the vertex information of the embedded graph aligned in a straight line is the variable U. is there. This cost is composed of an edge vector generation linear map L m (m = 1,..., M), an edge vector angle evaluation function g, and a cumulative operation Σ. The edge vector generation linear map L m (m = 1,..., M) is an edge connected to every vertex whose degree (number of edges to be connected) is 2 from the variable U indicating the vertex information of the line-aligned embedded graph. An operation for generating a vector (side vector) representing the size and orientation of the. The edge vector angle evaluation function g evaluates the angle formed by the extracted edge vectors using a nuclear norm. The cumulative operation Σ adds these evaluation values. Hereinafter, this calculation method will be described.
まず、整数Mは、埋め込みグラフGの頂点のうち、次数が2である頂点の個数であり、辺情報Eより算出する。そして、M個ある次数2の頂点に(m=1,…,M)の番号を付与し、その頂点IDをcurr_id(m)、隣接する2つの頂点の頂点IDをそれぞれprev_id(m)、next_id(m)とする。
First, the integer M is the number of vertices whose degree is 2 among the vertices of the embedded graph G, and is calculated from the edge information E. Then, a number of (m = 1,..., M) is given to
辺ベクトル生成線形写像Lm(m=1,…,M)は、(curr_id(m),prev_id(m))の辺ベクトルと、(curr_id(m),next_id(m))の辺ベクトルとを算出し、算出されたこれらの辺ベクトルを2行D列の行列に並べて格納する操作である。この2行D列の行列を辺ベクトル行列Pmと呼ぶことにする。 The edge vector generation linear map L m (m = 1,..., M) includes an edge vector of (curr_id (m), prev_id (m)) and an edge vector of (curr_id (m), next_id (m)). This is an operation of calculating and storing these calculated side vectors in a 2 × D matrix. A matrix of two lines D column is called a side vector matrix P m.
辺ベクトル生成線形写像Lmは、直線整列された埋め込みグラフの頂点情報を示す変数Uを入力して、辺ベクトル行列Pm=LmUを出力する。辺ベクトル生成線形写像Lmを式で記述すると、式(6)の通りである。 The edge vector generation linear map L m receives a variable U indicating vertex information of the line-aligned embedded graph and outputs an edge vector matrix P m = L m U. The side vector generation linear map L m is described by an equation as shown in Equation (6).
この辺ベクトル生成線形写像Lmは、式(7)で示す2行N列の疎行列を変数Uの左から掛ける操作とも等しいため、辺ベクトル生成線形写像Lmと式(7)の行列は同一のものであるとみなせる。 The edge vector generation linear mapping L m, since also equal operation multiplying a sparse matrix of 2 rows and N columns shown in equation (7) from the left of the variable U, the matrix side vector generation linear mapping L m and the formula (7) are the same Can be regarded as
辺ベクトル角評価関数gは、2行D列の辺ベクトル行列Pmに対し、各辺ベクトルの成す角の大きさを評価する。辺ベクトル角評価関数gには、式(8)や式(9)で例示するような関数を用いることができる。 The side vector angle evaluation function g evaluates the size of the angle formed by each side vector with respect to the side vector matrix P m of 2 rows and D columns. As the side vector angle evaluation function g, a function exemplified by Expression (8) or Expression (9) can be used.
式(8)及び式(9)において、σ1(Pm)とσ2(Pm)は、辺ベクトル行列Pmの2つの特異値を表す。式(8)及び式(9)に示す関数は、2つの辺ベクトルの成す角度が小さいほど関数値が小さくなり、角度が大きいほど関数値が大きくなる。 In Expression (8) and Expression (9), σ 1 (P m ) and σ 2 (P m ) represent two singular values of the edge vector matrix P m . In the functions shown in Expression (8) and Expression (9), the function value decreases as the angle formed by the two side vectors decreases, and the function value increases as the angle increases.
乗算器1114は、式(5)の直線整列正則化関数とトレードオフパラメータλを乗算した関数を出力する。
The
加算器1115は、頂点位置変化損失関数fと乗算器1114が出力した関数を線形結合して、式(1)のminimizeの右側の目的関数を出力する。
The
制約条件立式部1116は、元の埋め込みグラフG=(V,E)を入力し、式(1)のsubject toの右側の制約条件式を出力する。制約条件式は、使用者が予め定めた制約であり、式(10)のように幾つかの頂点情報を限定する制約や、式(11)や式(12)のように頂点情報の可動範囲を限定する制約などを課することができる。
The constraint
式(11)及び式(12)において、ε(n)は、使用者が予め定めた、頂点IDがnである頂点に対する可動範囲の最大値である。なお、これらの制約条件式(10)〜(12)のいくつかを組み合わせて制約条件式とすることもできる。また、制約条件を全く課さないという制約条件式を定めることもできる。 In Expression (11) and Expression (12), ε (n) is the maximum value of the movable range for the vertex whose vertex ID is n, which is predetermined by the user. It should be noted that some of these constraint formulas (10) to (12) can be combined into a constraint formula. It is also possible to define a constraint equation that does not impose any constraint.
最適化問題生成部1117は、目的関数と制約条件式を入力して、直線整列のための最適化問題を生成する。すなわち、最適化問題生成部1117は、加算器1115から出力された目的関数の左側に最小化を表す「minimize」を加え、制約条件立式部1116から出力された制約条件式の左側に制約を表す「subject to」を加えて、(1)式に示した最適化問題を出力する。
The optimization
上記の辺ベクトル角評価関数gとして、式(8)の核型ノルム関数を適用することにより効果的に埋め込みグラフを直線整列できる。以下、辺ベクトル角評価関数gとして式(8)の核型ノルム関数が適用される場合の最適化問題求解部112について説明する。この場合、前述したPDS法を用いると、最適化問題求解部112において、式(1)に示す最適化問題の解を求めるために、次式(13)に示されるような局所線形整列問題を解くアルゴリズムが適用される。
The embedded graph can be effectively linearly aligned by applying the kernel type norm function of Expression (8) as the above edge vector angle evaluation function g. Hereinafter, the optimization
式(13)において、太文字で示される行列Xは、前述した式(1)における変数Uに相当する。3つ目の演算式である次式(14)において、括弧内の式(15)の部分は、後述する行列Yとなる。すなわち、式(14)は、行列Yに対して、2行D列の行列の特異値分解と、閾値処理と、2行D列の行列×D行D列の行列×D行D列の行列とを含む計算である核型ノルム関数の近接写像計算を適用し、当該計算を反復することを示している。 In Expression (13), the matrix X indicated by bold letters corresponds to the variable U in Expression (1) described above. In the following equation (14), which is the third arithmetic expression, the part of the equation (15) in parentheses is a matrix Y described later. That is, the equation (14) is obtained by dividing the matrix Y with a singular value decomposition of a matrix with 2 rows and D columns, threshold processing, a matrix with 2 rows and D columns × a matrix with D rows and D columns × a matrix with D rows and D columns. It is shown that the close mapping calculation of the karyotype norm function, which is a calculation including the above, is applied and the calculation is repeated.
ここで、直線整列正則化関数立式部1113のさらに詳細な構成について説明する。
図4は、図3に示した直線整列正則化関数立式部1113の詳細な機能構成を示すブロック図である。図4に示すように、直線整列正則化関数立式部1113は、辺ベクトル生成線形写像生成装置11131と、辺ベクトル行列生成装置11132と、特異値分解装置11133と、特異値インデクスについての和の生成装置11134と、頂点インデクスについての総和の生成装置11135とを備える。
Here, a more detailed configuration of the straight line alignment regularization
FIG. 4 is a block diagram showing a detailed functional configuration of the straight line alignment regularization
辺ベクトル生成線形写像生成装置11131は、辺情報Eに基づいて、辺ベクトル生成線形写像Lm(m=1,…,M)を生成し出力する。
The edge vector generation
辺ベクトル行列生成装置11132は、辺ベクトル生成線形写像生成装置11131から出力される辺ベクトル生成線形写像Lmに基づいて、辺ベクトル行列Pm=LmUを生成し出力する。この辺ベクトル行列Pmは、上の説明における式(6)で示したものである。
The edge
特異値分解装置11133は、辺ベクトル行列Pm=LmUを入力し、この辺ベクトル行列Pmの2つの特異値σ1(Pm)およびσ2(Pm)を求め、出力する。
The singular
特異値インデクスについての和の生成装置11134は、特異値分解装置11133から出力された2つの特異値の和である{σ1(Pm)+σ2(Pm)}を算出し、出力する。
The
頂点インデクスについての総和の生成装置11135は、特異値インデクスについての和の生成装置11134から出力される特異値の和{σ1(Pm)+σ2(Pm)}を入力し、頂点インデクスについての総和を算出する。
The
頂点インデクスについての総和の生成装置11135からの出力は、式(16)あるいは式(17)で表される。
The output from the
つまり、頂点インデクスについての総和の生成装置11135は、特異値インデクスについての和の生成装置11134が出力した前記和または前記和の2乗の、全ての頂点の総和を直線整列正則化関数として生成する。これら式(16)および式(17)が、式(5)に示した直線整列正則化関数にあたるものである。なお、式(16)および式(17)は、辺ベクトル角評価関数gとして、それぞれ、式(8)および式(9)に示したものを用いる場合に対応する。
That is, the
次に、図5、図6及び図7を用いて、本実施形態の埋め込みグラフ単純化装置1による単純化処理を説明する。
Next, simplification processing by the embedded
図5は、埋め込みグラフ単純化装置1による埋め込みグラフ単純化処理のフローチャートである。埋め込みグラフ直線整列部11は、元の埋め込みグラフG=(V,E)と、トレードオフパラメータλとを入力して、直線整列された埋め込みグラフG’=(V’,E)を出力する(ステップS11)。不要頂点除去部12は、直線整列された埋め込みグラフG’=(V’,E)を入力して、単純化された埋め込みグラフG*=(V*,E*)を出力する(ステップS12)。
FIG. 5 is a flowchart of an embedded graph simplification process performed by the embedded
図6は、図5のステップS11において行われる埋め込みグラフ直線整列部11による埋め込みグラフ直線整列処理を詳細化したフローチャートである。直線整列のための最適化問題立式部111は、元の埋め込みグラフG=(V,E)と、トレードオフパラメータλとを入力して、直線整列のための最適化問題を出力する(ステップS111)。最適化問題求解部112は、直線性列のための最適化問題を入力として、直線整列された頂点情報V’を出力する(ステップS112)。頂点情報置換部113は、直線整列された頂点情報V’と元の埋め込みグラフG=(V,E)を入力して、直線整列された埋め込みグラフG’=(V’,E)を出力する(ステップS113)。
FIG. 6 is a flowchart detailing the embedded graph straight line alignment processing by the embedded graph straight
図7は、図6のステップS111において行われる直線整列のための最適化問題立式部111による直線整列のための最適化問題立式処理を詳細化したフローチャートである。頂点辺情報分解部1111は、元の埋め込みグラフG=(V,E)を入力して、頂点情報Vと辺情報Eに分解して出力する(ステップS1111)。頂点位置変化損失関数立式部1112は、頂点情報Vを入力して、頂点位置変化損失関数fを出力する(ステップS1112)。直線整列正則化関数立式部1113は、辺情報Eを入力して、直線整列正則化関数を出力する(ステップS1113)。乗算器1114は、直線整列正則化関数とトレードオフパラメータλとを入力し、これら2つを乗算した関数を出力する(ステップS1114)。加算器1115は、頂点位置変化損失関数fと乗算器1114が出力した関数を線形結合して、目的関数を出力する(ステップS1115)。制約条件立式部1116は、元の埋め込みグラフG=(V,E)を入力し、制約条件式を出力する(ステップS1116)。最適化問題生成部1117は、目的関数と制約条件式を入力して、直線整列のための最適化問題を生成して出力する(ステップS1117)。
FIG. 7 is a flowchart detailing the optimization problem formulation process for linear alignment performed by the optimization
次に具体例を挙げて、図1に示す埋め込みグラフ単純化装置1、図2に示す埋め込みグラフ直線整列部11、及び図3に示す直線整列のための最適化問題立式部111が、図5、図6及び図7に示す処理を行うときの動作を説明する。
Next, the embedding
ここでは、画像領域の符号化のための埋め込みグラフ単純化を考え、埋め込みグラフは2次元平面上に埋め込まれたグラフ、頂点位置変化損失関数fは式(4)のコスト、辺ベクトル角評価関数gは式(8)のコスト、制約条件は画像縁に位置する頂点を式(10)の形で制約するものとする。最適化問題求解部のアルゴリズムにはPDS法を用いるものとする。 Here, the embedding graph simplification for encoding the image region is considered, the embedding graph is a graph embedded on a two-dimensional plane, the vertex position change loss function f is the cost of the equation (4), the edge vector angle evaluation function g is the cost of equation (8), and the constraint condition is that the vertex located at the image edge is constrained in the form of equation (10). It is assumed that the PDS method is used for the algorithm of the optimization problem solving unit.
埋め込みグラフ単純化装置1の入力である、元の埋め込みグラフG=(V,E)は、図8に示す2次元平面上に埋め込まれたグラフとする。図8における丸の記号は埋め込みグラフの各頂点の位置を表し、丸の記号の右下の数字が頂点IDを表している。また頂点位置は、図8における下方向を第1座標軸方向、右方向を第2座標軸方向とする直交座標系で記述する。例えば図8で最も左上にある頂点は頂点IDが「2」で、その座標は(1,0)である。頂点情報VはN行2列行列とし、行番号が頂点ID、列番号が座標軸番号を示す。例えば頂点IDが「2」の頂点についての情報は、頂点情報Vを示す行列の2行目に格納されており、(v2,1=1)であり、(v2,2=0)である。
The original embedded graph G = (V, E), which is the input of the embedded
頂点と頂点を結ぶ実線は、埋め込みグラフの各辺を表している。例えばIDが「ID=2」の頂点と「ID=3」の頂点の間には、この2頂点を結ぶ辺が存在する。辺情報Eは隣接リストとして格納されている。埋め込みグラフ単純化装置1の入力である、トレードオフパラメータλは、1.5などの任意の実数値を選ぶことができる。
A solid line connecting the vertices represents each side of the embedded graph. For example, an edge connecting the two vertices exists between the vertex having the ID “ID = 2” and the vertex having the “ID = 3”. The edge information E is stored as an adjacent list. As the trade-off parameter λ, which is an input of the embedded
埋め込みグラフ直線整列部11が行う処理ステップS11では、直線整列された埋め込みグラフG’=(V’,E)を出力する。この例では、直線整列された埋め込みグラフG’=(V’,E)として、図9のような埋め込みグラフを出力する。図9における丸の記号は、図8と同様に、埋め込みグラフの各頂点の位置を表し、丸の記号の右下の数字が頂点IDを表している。図8と図9とを比較すれば分かるように、埋め込みグラフ直線整列部11が行う処理ステップS11により、各頂点の間の辺情報は維持され、埋め込みグラフが直線整列するように、頂点の位置が変動している。また、頂点IDが(ID=1,2,42、…,141)の頂点については、制約条件により、変動位置が制約されている。
In processing step S11 performed by the embedded graph straight
不要頂点除去部12が行う処理ステップS12では、埋め込みグラフG’の頂点のうち、接続する辺の成す角度が小さくなっている頂点を予め定めた閾値(例えばπ/100ラジアン)で選定し、この頂点を取り除いて単純化された埋め込みグラフG*=(V*,E*)を生成する。
In processing step S12 performed by the unnecessary
埋め込みグラフ直線整列部11が行う処理ステップS11の詳細な動作について述べる。直線整列のための最適化問題立式部111が行う処理ステップS111では、例えば式(13)の最適化問題を生成する。
The detailed operation of the processing step S11 performed by the embedded graph
ここでは、頂点位置変化損失関数fは、式(4)のコストを用い、辺ベクトル角評価関数gは式(8)のコストを用いている。また、制約条件は、画像外縁に位置する頂点はその外縁上の移動しかできない事とし、式(10)の形式で頂点IDが(ID=1,2,42、…,141)の頂点について制約している。 Here, the vertex position change loss function f uses the cost of equation (4), and the edge vector angle evaluation function g uses the cost of equation (8). Further, the constraint condition is that the vertex located at the outer edge of the image can only be moved on the outer edge, and the vertex ID of the vertex (ID = 1, 2, 42,..., 141) in the form of Expression (10) is restricted. doing.
最適化問題求解部112が行う処理ステップS112では、式(18)の最適化問題をPDS法で解き、頂点情報V*を生成する。
In processing step S112 performed by the optimization
式(18)に対するPDS法では、式(4)の頂点位置変化損失関数fの近接写像、式(8)の辺ベクトル角評価関数gの近接写像、辺ベクトル生成線形写像Lmとその共役写像Lm T(m=1,…,132)、制約集合Cの制約条件を表す集合への射影を計算する必要がある。これらが計算可能であれば反復演算により解を求めることができる。 In the PDS method for Expression (18), the proximity map of the vertex position change loss function f in Expression (4), the proximity map of the edge vector angle evaluation function g in Expression (8), the edge vector generation linear map L m and its conjugate map. L m T (m = 1,..., 132), the projection of the constraint set C to the set representing the constraint condition needs to be calculated. If these can be calculated, a solution can be obtained by iterative calculation.
式(4)の頂点位置変化損失関数fの近接写像は、ある任意のステップサイズμ(>0)に対して、式(19)により計算できる。 The proximity map of the vertex position change loss function f in equation (4) can be calculated by equation (19) for a given arbitrary step size μ (> 0).
ここで関数signは、入力した行列の各要素の符号を抽出して−1,0,+1に対応させ、入力と同じサイズの行列に格納して出力する関数である。また、丸で示す演算子はアダマール積で、左右の行列の要素同士を掛けあわせて同じサイズの行列に格納して出力する演算である。また、関数maxは、入力した2つの実数の値を比較して、大きい方を出力する関数である。 Here, the function sign is a function that extracts the sign of each element of the input matrix, associates it with -1, 0, +1, stores it in a matrix of the same size as the input, and outputs it. An operator indicated by a circle is a Hadamard product, which is an operation of multiplying the elements of the left and right matrices, storing them in a matrix of the same size, and outputting them. The function max is a function that compares two input real numbers and outputs the larger one.
式(8)の辺ベクトル角評価関数gの近接写像は、ある任意のステップサイズμに対して、式(20)により計算できる。 The proximity map of the edge vector angle evaluation function g in Expression (8) can be calculated by Expression (20) for a certain arbitrary step size μ.
ここで関数diagは、入力したベクトルを対角要素に並べた対角行列を出力する関数である。またS(P),T(P),σ(P)は行列Pの特異値分解であり、式(21)が成立する。 Here, the function diag is a function that outputs a diagonal matrix in which input vectors are arranged in diagonal elements. S (P), T (P), and σ (P) are singular value decompositions of the matrix P, and Equation (21) is established.
辺ベクトル生成線形写像Lmとその共役写像Lm T(m=1,…,132)は、式(7)の行列やその転置行列を左から掛ける操作により計算可能である。 The edge vector generation linear map L m and its conjugate map L m T (m = 1,..., 132) can be calculated by multiplying the matrix of Expression (7) and its transposed matrix from the left.
制約集合Cの制約条件を表す集合は式(22)である。 A set representing a constraint condition of the constraint set C is Expression (22).
よって、Cへの射影は、式(23)により計算できる。 Therefore, the projection onto C can be calculated by equation (23).
頂点情報置換部113が行う処理ステップS113では直線整列された頂点情報V’と元の埋め込みグラフG=(V,E)を入力して、直線整列された埋め込みグラフG’=(V’,E)を出力する。すなわち、頂点情報置換部113が行う処理ステップS113は、元の埋め込みグラフGの頂点情報Vを直線整列された頂点情報V’に置き換え、直線整列された埋め込みグラフG’を生成する。
In processing step S113 performed by the vertex
直線整列のための最適化問題立式部111が行う処理ステップS111の詳細な動作について述べる。頂点辺情報分解部1111が行う処理ステップS1111では、元の埋め込みグラフG=(V,E)を入力して、頂点情報Vと辺情報Eに分解して出力する。
The detailed operation of the processing step S111 performed by the optimization
頂点位置変化損失関数立式部1112が行う処理ステップS1112では、元の頂点情報Vを入力して、頂点位置変化損失関数fを出力する。頂点位置変化損失関数fとしては、例えば式(4)のコストを使用する。
In processing step S1112 performed by the vertex position change loss
直線整列正則化関数立式部1113が行う処理ステップS1113では、元の辺情報Eを入力して、式(5)の直線整列正則化関数を出力する。辺ベクトル生成線形写像Lm(mは頂点のインデックス,m=1,…,M)は、辺情報Eから各次数2の頂点の隣接頂点IDを得ることで、式(7)の行列として生成することができる。また、辺ベクトル角評価関数gとしては、例えば式(8)のコストを使用する。
In processing step S1113 performed by the straight line alignment regularization
乗算器1114が行う処理ステップS1114では、式(5)の直線性列正則化関数とトレードオフパラメータλを乗算した関数を出力する。
In processing step S1114 performed by the
加算器1115が行う処理ステップS1115では、頂点位置変化損失関数fと乗算器1114が出力した関数を線形結合して、式(18)のminimizeの右側の目的関数を出力する。
In processing step S1115 performed by the
制約条件立式部1116が行う処理ステップS1116では、元の埋め込みグラフG=(V,E)を入力し、式(18)のsubject toの右側の制約条件式を出力する。
In processing step S1116 performed by the constraint
最適化問題生成部1117が行う処理ステップS1117は、目的関数と制約条件式を入力して、直線整列のための最適化問題を生成する。すなわち、最適化問題生成部1117が行う処理ステップS1117は、目的関数と制約条件式それぞれの左側に、最小化を表す「minimize」と、制約を表す「subject to」を加えて出力する。
In processing step S1117 performed by the optimization
このように図7で示した処理手順に従って直線整列のための最適化問題を生成し、図6で示した処理手順に従って埋め込みグラフの直線整列を行い、図5で示した処理手順に従って埋め込みグラフを単純化することができる。 In this way, an optimization problem for line alignment is generated according to the processing procedure shown in FIG. 7, the embedded graph is aligned according to the processing procedure shown in FIG. 6, and the embedded graph is converted according to the processing procedure shown in FIG. It can be simplified.
[第2実施形態]
次に、第2実施形態について説明する。なお、前述の実施形態と同様の事項については記載を省略し、以下では本実施形態に特有の事項について説明する。
[Second Embodiment]
Next, a second embodiment will be described. In addition, description is abbreviate | omitted about the matter similar to the above-mentioned embodiment, and the matter peculiar to this embodiment is demonstrated below.
第1実施形態による局所線形正則化法を用いた場合、多数の頂点から構成される急峻なカーブを短絡してグラフ形状を大きく劣化させるという問題が生じる場合がある。この原因は直線整列正則化関数立式部における特異値和にある。入力行列の2つの特異値のうち、第1特異値は入力行列の列ベクトルの大きさに寄与し、第2特異値は列ベクトルの成す角度に寄与している。ここで入力行列の列ベクトルは隣接する2つの辺ベクトルであるため、核ノルムを正則化することで、これらの辺ベクトル同士が成す角度を0度あるいは180度に近付けると同時に、ベクトルの大きさを小さくする効果が働いてしまう。このように各辺ベクトルの大きさを小さくする効果が働くことで、急峻なカーブを短絡し、グラフ形状を大きく劣化させてしまう場合がある。 When the local linear regularization method according to the first embodiment is used, there may be a problem that a steep curve composed of a large number of vertices is short-circuited to greatly deteriorate the graph shape. This is due to the singular value sum in the straight line regularization function equation part. Of the two singular values of the input matrix, the first singular value contributes to the size of the column vector of the input matrix, and the second singular value contributes to the angle formed by the column vector. Here, since the column vector of the input matrix is two adjacent side vectors, by making the kernel norm regular, the angle formed by these side vectors approaches 0 degree or 180 degrees and at the same time, the magnitude of the vector The effect of reducing the value will work. As described above, the effect of reducing the size of each side vector works, so that a steep curve may be short-circuited and the graph shape may be greatly deteriorated.
本実施形態は、グラフが多数の頂点から構成され、その形状が急峻なカーブを有する場合においても、単純化処理の結果として短絡化によりグラフ形状を大きく劣化させるという問題を回避するものである。 The present embodiment avoids the problem of greatly degrading the graph shape due to short-circuiting as a result of the simplification process even when the graph is composed of a large number of vertices and the shape has a steep curve.
図10は、本実施形態における直線整列のための最適化問題立式部111の機能構成を示すブロック図である。図10に示すように、本実施形態における直線整列のための最適化問題立式部111は、第1実施形態における直線整列のための最適化問題立式部111と類似の構成を有する。ただし、本実施形態における直線整列のための最適化問題立式部111は、直線整列正則化関数立式部1113に代えて、直線整列加重正則化関数立式部1118を備える。つまり、図10の直線整列のための最適化問題立式部111は、直線整列加重正則化関数立式部1118を除いて、図3の直線整列のための最適化問題立式部111と同一構成、同一処理である。このため直線整列加重正則化関数立式部1118以外の各部についての説明を省略する。直線整列加重正則化関数立式部1118は、グラフの頂点について直線整列の処理を行う際に、2種類の特異値それぞれに重みを付けた加算を行う。
FIG. 10 is a block diagram illustrating a functional configuration of the optimization
ここで直線整列加重正則化関数立式部1118を詳細に説明する。図11は、直線整列加重正則化関数立式部1118の詳細な機能構成を示すブロック図である。図11に示すように、直線整列加重正則化関数立式部1118は、辺ベクトル生成線形写像生成装置11131と、辺ベクトル行列生成装置11132と、特異値分解装置11133と、特異値インデクスについての加重和の生成装置11184と、頂点インデクスについての総和の生成装置11135とを備える。つまり、直線整列加重正則化関数立式部1118は、直線整列正則化関数立式部1113における特異値インデクスについての和の生成装置11134に代えて、特異値インデクスについての加重和の生成装置11184を備える。図11に示す特異値インデクスについての加重和の生成装置11184以外の各部の機能は、図4において同一符号を有する各部の機能と同一であり、ここでは説明を省略する。
Here, the straight line alignment weight regularization
直線整列加重正則化関数立式部1118は、埋め込みグラフに含まれる各頂点に接続する辺の向きおよび大きさを表す辺ベクトルを求め、頂点に接続される2つの辺の大きさと2つの辺が成す角度とを、2つの辺の大きさによる影響が相対的に小さく、2つの辺が成す角度による影響が相対的に大きくなるように重み付け合成して、直線整列正則化関数を生成する。
The straight line alignment weighted regularization
特異値インデクスについての加重和の生成装置11184は、特異値分解装置11133の出力である特異値と、重みw1(第1重み値)およびw2(第2重み値)とを入力して、特異値の加重和を生成し出力する。特異値インデクスについての加重和の生成装置11184が求める特異値の加重和は、式(24)で示す通りである。
The weighted
つまり、重みw1は、頂点に接続される2つの辺の大きさに対応する第1特異値(σ1)にかかる重みである。また、重みw2は、これらの2つの辺が成す角度に対応する第2特異値(σ2)にかかる重みである。 That is, the weight w 1 is a weight applied to the first singular value (σ 1 ) corresponding to the size of the two sides connected to the vertex. The weight w 2 is a weight applied to the second singular value (σ 2 ) corresponding to the angle formed by these two sides.
式(24)における重みw1およびw2としては、(w2≧w1≧0)という関係を満たす値を与えるようにする。なお、w2とw1との関係として、(w2>w1)としてもよい。また、w1と0との関係として、(w1>0)としてもよい。第1実施形態の方法においては直線整列正則化したグラフが、指数関数をグラフ化した形状に収束する場合があり得る。一方、本実施形態の方法は、ベクトルの角度の重みw2をベクトルの大きさの重みw1以上(重みw1,w2はいずれも非負値)とするため、そのような場合を回避することができる。つまり、本実施形態では、(w2≧w1≧0)としたため、グラフデータを単純化したときに、元のデータに関係なく指数関数をグラフ化した形状に単純化されることを避ける。つまり、ベクトルの角度の重みがベクトルの大きさの重みよりも大きくなるようにしている。 As the weights w 1 and w 2 in the equation (24), values satisfying the relationship (w 2 ≧ w 1 ≧ 0) are given. Note that the relationship between w 2 and w 1 may be (w 2 > w 1 ). Further, the relationship between w 1 and 0 may be (w 1 > 0). In the method of the first embodiment, a graph that is regularized in line alignment may converge to a shape in which an exponential function is graphed. On the other hand, the method according to the present embodiment avoids such a case because the vector angle weight w 2 is set to be equal to or greater than the vector magnitude weight w 1 (the weights w 1 and w 2 are both non-negative values). be able to. That is, in this embodiment, since (w 2 ≧ w 1 ≧ 0), when the graph data is simplified, it is avoided that the exponential function is simplified to a graph shape regardless of the original data. That is, the weight of the vector angle is set larger than the weight of the vector size.
特異値インデクスについての加重和の生成装置11184が上記のように加重加算を行うようにしたため、本実施形態において、頂点インデクスについての総和の生成装置11135が出力する総和値の例は、式(25)および式(26)に示す通りである。
Since the weighted
以上説明した本実施形態によれば、グラフが多数の頂点から構成され、そのグラフの形状が急峻なカーブを有する場合にも、グラフ単純化処理の結果として頂点の並びを短絡してグラフ形状を大きく劣化させるという問題を回避することができる。 According to the present embodiment described above, even when the graph is composed of a large number of vertices and the shape of the graph has a steep curve, as a result of the graph simplification processing, the arrangement of the vertices is short-circuited to change the graph shape. The problem of significant deterioration can be avoided.
その理由は次の通りである。即ち、辺ベクトル行列Pm=の2つの特異値のうち、第1特異値σ1(Pm)は入力行列の列ベクトルの大きさに寄与し、第2特異値σ2(Pm)は入力行列の列ベクトルの成す角度に寄与している。入力行列の列ベクトルは隣接する2つの辺ベクトルであるため、核ノルムを正則化すると、辺ベクトルの成す角度を0度あるいは180度に近付けると同時に、ベクトルの大きさを小さくする効果が働いてしまう。すると、各辺ベクトルの大きさを小さくする効果が働くことで、急峻なカーブを短絡し、グラフ形状を大きく劣化させてしまう場合があった。一方で、本実施形態の方法では、上記特異値の和計算に重み付けを付けることにより、第1特異値による影響を小さくし、第2特異値による影響を大きくする。これにより、各辺ベクトルの大きさを小さくする効果を抑制し、急峻なカーブの短絡を抑制する。つまり、本実施形態による方法では、単純化する対象のグラフが急峻なカーブを含む場合においても、短絡が少なく、劣化が生じにくい。 The reason is as follows. That is, of the two singular values of the edge vector matrix P m =, the first singular value σ 1 (P m ) contributes to the size of the column vector of the input matrix, and the second singular value σ 2 (P m ) is This contributes to the angle formed by the column vectors of the input matrix. Since the column vector of the input matrix is two adjacent side vectors, regularizing the nuclear norm brings the effect of reducing the size of the vector at the same time that the angle formed by the side vectors approaches 0 or 180 degrees. End up. Then, the effect of reducing the size of each side vector works, so that a steep curve is short-circuited and the graph shape may be greatly deteriorated. On the other hand, in the method of the present embodiment, the influence of the first singular value is reduced and the influence of the second singular value is increased by weighting the sum calculation of the singular values. Thereby, the effect of reducing the size of each side vector is suppressed, and a short-circuit of a steep curve is suppressed. That is, in the method according to the present embodiment, even when the graph to be simplified includes a steep curve, there are few short circuits and deterioration is unlikely to occur.
図12は、本実施形態による埋め込みグラフ単純化装置1が回避する問題を説明するための概略図である。同図において、一点鎖線で示す折れ線は、埋め込みグラフ単純化装置1への入力となるグラフの例の形状を示す。また、小さな丸印(頂点)と、これらの丸印を順次接続する実線による直線(辺)は、第1実施形態によるグラフの単純化の処理を行った場合、一つの処理結果の可能性を示す。図示するように、この結果の特に矢印で指し示す部分は、元のグラフを大幅に短絡させており、形状が劣化していると見なせる。本実施形態では、前述の通り第1特異値による影響を小さくして第2特異値による影響を大きくすることにより、グラフの形状劣化を回避することができる。なお、ここでは2次元平面上のグラフに単純化処理を適用した場合の例を示しているが、多次元(3次元以上)の空間におけるグラフに単純化処理を適用してもよいことは言うまでもない。
FIG. 12 is a schematic diagram for explaining a problem that the embedded
上記のいずれかの実施形態の構成による埋め込みグラフ単純化装置1は、異なる位置に配置される複数の頂点と、複数の頂点同士の接続とによって形状を示すグラフを入力データとし、埋め込みグラフ直線整列部11において、頂点位置変化損失関数立式部1112が、二次元データの形状がより少ない直線の組み合わせによって示されるように複数の頂点を移動させて直線上に整列させる場合、移動前後の頂点の位置の乖離度合いを示すコストを算出する頂点位置変化損失関数を生成する。また、直線整列正則化関数立式部1113または直線整列加重正則化関数立式部1118が、複数の頂点を直線上に整列させる場合、複数の頂点により形成される直線形状のなめらかさを示すコストを算出する直線整列正則化関数を生成する。最適化問題生成部1117は、頂点位置変化損失関数と、直線整列正則化関数と、制約条件式とに基づいて、式(1)に示す直線整列のための最適化問題を生成する。最適化問題求解部112は、直線整列のための最適化問題を解く過程で用いるアルゴリズムに含まれる行列Yを、核型ノルム関数の近接写像高速計算部1122により行列Zに変換させ、行列Zにより、制約条件下で、頂点位置変化損失関数が算出するコストと、直線整列正則化関数が算出するコストとの和が最小となる頂点の位置を算出する。頂点情報置換部113は、算出された位置に頂点を動かす。不要頂点除去部12は、移動後の頂点同士の接続によって形成される辺の成す角度に基づいて前記点の中から不要な点を選別して除去する。これにより、複雑な埋め込みグラフにおいても頂点や辺を削減可能で、頂点位置が元の埋め込みグラフの頂点位置に限定されないようにすることができる。また、核型ノルム関数の近接写像高速計算部1122が、行列Yを行列Zに変換することにより、以下に示すように演算時間の削減を図ることが可能となる。
The embedded
[変形例]
ここで、上述した各実施形態に適用可能な変形例について説明する。
上述した各実施形態では、埋め込みグラフ単純化装置1は、埋め込みグラフ直線整列部11と不要頂点除去部12とを備えていた。この変形例として、埋め込みグラフ単純化装置1が不要頂点除去部12を持たず、埋め込みグラフ直線整列部11による直線整列の処理のみを行うようにしてもよい。この場合も、埋め込みグラフを単純化できるという効果を得ることができる。
[Modification]
Here, the modification applicable to each embodiment mentioned above is demonstrated.
In each of the embodiments described above, the embedded
また、上述した各実施形態では、直線整列のための最適化問題立式部111が、頂点位置変化損失関数立式部1112と直線整列正則化関数立式部1113(または直線整列加重正則化関数立式部1118)の両方を備えていた。そして、これら両方において立式される関数を重み付け加算(重みは、トレードオフパラメータλによる)して、目的関数を生成していた。この変形例として、直線整列のための最適化問題立式部111が、頂点位置変化損失関数立式部1112を持たず、直線整列正則化関数立式部1113のみにおいて立式される関数を用いて、目的関数を生成するようにしてもよい。このような変形例では、単純化処理による頂点位置の変化がより大きくなる場合もあり得るが、頂点の直線整列という所定の効果を得ることはできる。
In each of the embodiments described above, the optimization
なお、各実施形態および変形例で説明した埋め込みグラフ単純化装置1の全部または一部の機能を実現するためのプログラム(コンピュータプログラム)をコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
A program (computer program) for realizing all or part of the functions of the embedded
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case, and a program that holds a program for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
以上、本発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計変更等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes design changes and the like without departing from the gist of the present invention.
1…埋め込みグラフ単純化装置、11…埋め込みグラフ直線整列部(埋め込みグラフ整列部)、12…不要頂点除去部、111…直線整列のための最適化問題立式部(最適化問題立式部)、112…最適化問題求解部、113…頂点情報置換部、1111…頂点辺情報分解部、1112…頂点位置変化損失関数立式部、1113…直線整列正則化関数立式部(整列正則化関数立式部)、1114…乗算器、1115…加算器、1116…制約条件立式部、1117…最適化問題生成部、1118…直線整列加重正則化関数立式部(整列正則化関数立式部)、11131…辺ベクトル生成線形写像生成装置(辺ベクトル生成線形写像生成部)、11132…辺ベクトル行列生成装置(辺ベクトル行列生成部)、11133…特異値分解装置(特異値分解部)、11134…特異値インデクスについての和の生成装置、11135…頂点インデクスについての総和の生成装置(総和生成部)、11184…特異値インデクスについての加重和の生成装置(加重和生成部)
DESCRIPTION OF
Claims (6)
各頂点に接続する辺の成す角度が小さくなるように頂点位置を整列する埋め込みグラフ整列部、
を備え、
前記埋め込みグラフ整列部は、
整列のための最適化問題を立式して出力する最適化問題立式部と、
前記最適化問題立式部で出力された整列のための最適化問題を求解して、整列された頂点位置を求める最適化問題求解部と、
前記最適化問題求解部で求められた頂点位置で、前記埋め込みグラフの頂点の位置情報を置き換える頂点情報置換部と、
を備え、
前記最適化問題立式部は、
整列された埋め込みグラフの頂点位置を変数として用いて、整列された埋め込みグラフが直線に近い度合いを評価する整列正則化関数を生成する整列正則化関数立式部と、
整列された後の前記頂点位置の範囲に関する制約条件を生成する制約条件立式部と、
前記整列正則化関数立式部が生成した前記整列正則化関数に基づく目的関数と前記制約条件とを合わせて最適化問題を生成する最適化問題生成部と、
を備え、
前記整列正則化関数立式部は、前記埋め込みグラフに含まれる各頂点に接続する辺の向きおよび大きさを表す辺ベクトルを求め、前記頂点に接続される2つの辺の大きさと前記2つの辺が成す角度とを、前記2つの辺の大きさによる影響が相対的に小さく前記2つの辺が成す角度による影響が相対的に大きくなるように重み付け合成して、前記整列正則化関数を生成する、
埋め込みグラフ単純化装置。 An embedding graph simplification device for simplifying an embedding graph having vertex position information,
An embedded graph alignment unit that aligns vertex positions so that the angle formed by the edges connected to each vertex is small;
With
The embedded graph alignment unit includes:
An optimization problem formulation section that forms and outputs an optimization problem for alignment;
An optimization problem solving unit for solving the optimization problem for alignment output in the optimization problem equation unit to obtain the aligned vertex positions;
A vertex information replacement unit that replaces the position information of the vertices of the embedded graph with the vertex positions determined by the optimization problem solving unit;
With
The optimization problem formula part is
An alignment regularization function expression that generates an alignment regularization function that evaluates the degree to which the aligned embedded graph is close to a straight line using the vertex position of the aligned embedded graph as a variable;
A constraint expression unit that generates a constraint on the range of the vertex positions after being aligned;
An optimization problem generation unit that generates an optimization problem by combining the objective function based on the alignment regularization function generated by the alignment regularization function expression unit and the constraint condition;
With
The alignment regularization function equation unit obtains an edge vector representing the direction and size of an edge connected to each vertex included in the embedded graph, and the size of the two edges connected to the vertex and the two edges Are generated by weighting so that the influence of the angle between the two sides is relatively small and the influence of the angle between the two sides is relatively large, thereby generating the alignment regularization function. ,
Embedded graph simplification device.
整列された埋め込みグラフの頂点位置を変数としたときに、前記変数が元の頂点位置とどれだけ乖離しているかを評価する頂点位置変化損失関数を生成する頂点位置変化損失関数立式部と、
整列正則化関数立式部が出力した前記整列正則化関数にトレードオフパラメータを乗算する乗算器と、
前記頂点位置変化損失関数と、前記トレードオフパラメータが乗算された整列正則化関数とを線形結合して目的関数を生成する加算器と、
を備え、
前記最適化問題生成部は、前記加算器が出力した前記目的関数と前記制約条件とを合わせて最適化問題を生成する、
請求項1に記載の埋め込みグラフ単純化装置。 The optimization problem formula part is
A vertex position change loss function equation that generates a vertex position change loss function that evaluates how much the variable deviates from the original vertex position when the vertex position of the aligned embedded graph is a variable;
A multiplier that multiplies the alignment regularization function output by the alignment regularization function formulation part by a trade-off parameter;
An adder that linearly combines the vertex position change loss function and the alignment regularization function multiplied by the trade-off parameter to generate an objective function;
With
The optimization problem generation unit generates an optimization problem by combining the objective function output from the adder and the constraint condition.
The embedded graph simplification device according to claim 1.
をさらに備える請求項1または2に記載の埋め込みグラフ単純化装置。 An unnecessary vertex removing unit that selects vertices having a small angle formed by connecting edges from the embedded graph arranged by the embedded graph aligning unit, and removes vertices having a small angle formed by the connecting edges;
The embedded graph simplification device according to claim 1, further comprising:
前記埋め込みグラフに含まれる頂点のうち接続される辺の数が2である頂点に、当該頂点に接続される各々の辺の大きさと向きを表す辺ベクトル生成線形写像Lm(mは頂点のインデックス,m=1,・・・,M)を生成する辺ベクトル生成線形写像生成部と、
前記辺ベクトル生成線形写像生成部が出力した前記辺ベクトル生成線形写像Lmと前記埋め込みグラフの頂点情報を示す変数Uとを入力して、辺ベクトル行列Pm(Pm=LmU)を生成する辺ベクトル行列生成部と、
前記辺ベクトル行列生成部が出力した前記辺ベクトル行列Pmの、辺の大きさに対応する第1特異値と、2辺が成す角度に対応する第2特異値と、を求める特異値分解部と、
前記第1特異値および前記第2特異値にそれぞれ対応する第1重み値w1および第2重み値w2を用いて、前記第1特異値および前記第2特異値の加重和を生成する加重和生成部と、
前記加重和生成部が出力した前記加重和または前記加重和の2乗の、全ての頂点の総和を整列正則化関数として生成する総和生成部と、
を備え、
前記加重和生成部は、(w2≧w1≧0)の関係を満たす前記第1重み値w1および前記第2重み値w2を用いる、
請求項1から3までのいずれか一項に記載の埋め込みグラフ単純化装置。 The alignment regularization function equation part is:
An edge vector generation linear map L m (m is an index of a vertex) representing the size and direction of each edge connected to the vertex of the vertex included in the embedded graph having two connected edges. , M = 1,..., M), an edge vector generation linear map generation unit;
The edge vector generation linear map L m output from the edge vector generation linear map generation unit and the variable U indicating the vertex information of the embedded graph are input, and the edge vector matrix P m (P m = L m U) is obtained. An edge vector matrix generation unit to generate;
A singular value decomposition unit for obtaining a first singular value corresponding to the size of the side and a second singular value corresponding to the angle formed by the two sides of the side vector matrix P m output from the side vector matrix generation unit. When,
A weight for generating a weighted sum of the first singular value and the second singular value by using the first weight value w 1 and the second weight value w 2 respectively corresponding to the first singular value and the second singular value. A sum generation unit;
A sum generation unit that generates the sum of all vertices of the weighted sum output by the weighted sum generation unit or the square of the weighted sum as an aligned regularization function;
With
The weighted sum generation unit uses the first weight value w 1 and the second weight value w 2 satisfying a relationship of (w 2 ≧ w 1 ≧ 0),
The embedded graph simplification device according to any one of claims 1 to 3.
各頂点に接続する辺の成す角度が小さくなるように頂点位置を整列する埋め込みグラフ整列処理ステップ、
を有し、
前記埋め込みグラフ整列処理ステップは、
整列のための最適化問題を立式して出力する最適化問題立式処理ステップと、
前記最適化問題立式処理ステップで出力された整列のための最適化問題を求解して、整列された頂点位置を求める最適化問題求解処理ステップと、
前記最適化問題求解処理ステップで求められた頂点位置で、前記埋め込みグラフの頂点の位置情報を置き換える頂点情報置換処理ステップと、
を有し、
前記最適化問題立式処理ステップは、
整列された埋め込みグラフの頂点位置を変数として用いて、整列された埋め込みグラフが直線に近い度合いを評価する整列正則化関数を生成する整列正則化関数立式処理ステップと、
整列された後の前記頂点位置の範囲に関する制約条件を生成する制約条件立式処理ステップと、
前記整列正則化関数立式処理ステップで生成した前記整列正則化関数に基づく目的関数と前記制約条件とを合わせて最適化問題を生成する最適化問題生成処理ステップと、
を有し、
前記整列正則化関数立式処理ステップは、前記埋め込みグラフに含まれる各頂点に接続する辺の向きおよび大きさを表す辺ベクトルを求め、前記頂点に接続される2つの辺の大きさと前記2つの辺が成す角度とを、前記2つの辺の大きさによる影響が相対的に小さく前記2つの辺が成す角度による影響が相対的に大きくなるように重み付け合成して、前記整列正則化関数を生成する、
埋め込みグラフ単純化方法。 An embedded graph simplification method for simplifying an embedded graph having vertex position information,
Embedded graph alignment processing step for aligning the vertex positions so that the angle formed by the edges connected to each vertex is small;
Have
The embedded graph alignment processing step includes:
Optimization problem formulation processing step that formulates and outputs an optimization problem for alignment, and
An optimization problem finding processing step for solving the optimization problem for alignment output in the optimization problem formula processing step to obtain aligned vertex positions;
Vertex information replacement processing step of replacing the position information of the vertices of the embedded graph with the vertex positions determined in the optimization problem solving processing step;
Have
The optimization problem formula processing step includes:
Using a vertex position of the aligned embedded graph as a variable, generating an aligned regularization function that evaluates the degree to which the aligned embedded graph is close to a straight line;
A constraint expression processing step for generating a constraint on the range of the vertex positions after being aligned; and
An optimization problem generation processing step for generating an optimization problem by combining the objective function based on the alignment regularization function generated in the alignment regularization function formulation processing step and the constraint condition;
Have
In the alignment regularization function equation processing step, an edge vector representing the direction and size of an edge connected to each vertex included in the embedded graph is obtained, and the size of the two edges connected to the vertex and the two The alignment regularization function is generated by weighting and synthesizing the angle formed by the sides so that the influence of the size of the two sides is relatively small and the influence of the angle formed by the two sides is relatively large. To
Embedded graph simplification method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017031509A JP6663372B2 (en) | 2017-02-22 | 2017-02-22 | Embedded graph simplification device, embedded graph simplification method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017031509A JP6663372B2 (en) | 2017-02-22 | 2017-02-22 | Embedded graph simplification device, embedded graph simplification method, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018136797A true JP2018136797A (en) | 2018-08-30 |
JP6663372B2 JP6663372B2 (en) | 2020-03-11 |
Family
ID=63366935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017031509A Active JP6663372B2 (en) | 2017-02-22 | 2017-02-22 | Embedded graph simplification device, embedded graph simplification method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6663372B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114459482A (en) * | 2021-12-30 | 2022-05-10 | 广州极飞科技股份有限公司 | Boundary simplifying method, path planning method, device, equipment and system |
WO2024100707A1 (en) * | 2022-11-07 | 2024-05-16 | 日本電信電話株式会社 | Noise canceling device, noise canceling method, and program |
WO2024100709A1 (en) * | 2022-11-07 | 2024-05-16 | 日本電信電話株式会社 | Optimization device, optimization method, and program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003263103A (en) * | 1996-06-24 | 2003-09-19 | Matsushita Electric Ind Co Ltd | Map information providing system |
JP2004347420A (en) * | 2003-05-21 | 2004-12-09 | Hitachi Ltd | Car navigation device |
US20060007232A1 (en) * | 2004-07-07 | 2006-01-12 | Layne Geary J | System and method for smoothing and compression of polyline data |
JP2007101767A (en) * | 2005-10-03 | 2007-04-19 | Xanavi Informatics Corp | Device for generating summary map |
-
2017
- 2017-02-22 JP JP2017031509A patent/JP6663372B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003263103A (en) * | 1996-06-24 | 2003-09-19 | Matsushita Electric Ind Co Ltd | Map information providing system |
JP2004347420A (en) * | 2003-05-21 | 2004-12-09 | Hitachi Ltd | Car navigation device |
US20060007232A1 (en) * | 2004-07-07 | 2006-01-12 | Layne Geary J | System and method for smoothing and compression of polyline data |
JP2007101767A (en) * | 2005-10-03 | 2007-04-19 | Xanavi Informatics Corp | Device for generating summary map |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114459482A (en) * | 2021-12-30 | 2022-05-10 | 广州极飞科技股份有限公司 | Boundary simplifying method, path planning method, device, equipment and system |
CN114459482B (en) * | 2021-12-30 | 2023-11-21 | 广州极飞科技股份有限公司 | Boundary simplification method, path planning method, device, equipment and system |
WO2024100707A1 (en) * | 2022-11-07 | 2024-05-16 | 日本電信電話株式会社 | Noise canceling device, noise canceling method, and program |
WO2024100709A1 (en) * | 2022-11-07 | 2024-05-16 | 日本電信電話株式会社 | Optimization device, optimization method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP6663372B2 (en) | 2020-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Jia et al. | Non-local robust quaternion matrix completion for large-scale color image and video inpainting | |
EP3255586A1 (en) | Method, program, and apparatus for comparing data graphs | |
Hoeltgen et al. | An optimal control approach to find sparse data for Laplace interpolation | |
Li et al. | Adaptive inpainting algorithm based on DCT induced wavelet regularization | |
JP6663372B2 (en) | Embedded graph simplification device, embedded graph simplification method, and computer program | |
Fukuda et al. | RTNI—A symbolic integrator for Haar-random tensor networks | |
US20090096784A1 (en) | Computer graphics systems and methods for encoding subdivision triangular surfaces | |
US20200293857A1 (en) | Cnn processing device, cnn processing method, and program | |
Glasscock | What is... a graphon | |
CN112184547B (en) | Super resolution method of infrared image and computer readable storage medium | |
Suk et al. | Decomposition of binary images—A survey and comparison | |
Nagy et al. | Memetic algorithms for reconstruction of binary images on triangular grids with 3 and 6 projections | |
Xie et al. | Fourier series expansion based filter parametrization for equivariant convolutions | |
Moghrabi | Implicit extra-update multi-step quasi-newton methods | |
CN110770757A (en) | Information processing apparatus and information processing method | |
Strand et al. | Distances based on neighbourhood sequences in non-standard three-dimensional grids | |
Jobst et al. | Efficient MPS representations and quantum circuits from the Fourier modes of classical image data | |
JP6514145B2 (en) | Embedded graph simplification method, embedded graph simplification apparatus and computer program | |
CN109791687B (en) | Image restoration on arbitrary curved surfaces | |
JP2012043437A (en) | Image processing method and image processing device | |
Normand et al. | Minimal-delay distance transform for neighborhood-sequence distances in 2D and 3D | |
Daleo et al. | Computations and equations for Segre-Grassmann hypersurfaces | |
CN110689513B (en) | Color image fusion method and device and terminal equipment | |
CN114549300A (en) | Image dictionary generation method, image reconstruction method and related device | |
Martinez-Fernandez et al. | Mesh-based multi-frontal solver with reuse of partial LU factorizations for antenna array |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A80 | Written request to apply exceptions to lack of novelty of invention |
Free format text: JAPANESE INTERMEDIATE CODE: A80 Effective date: 20170317 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190227 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200129 |
|
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: 20200212 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200214 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6663372 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |