JP5781045B2 - Object search apparatus and method - Google Patents

Object search apparatus and method Download PDF

Info

Publication number
JP5781045B2
JP5781045B2 JP2012206049A JP2012206049A JP5781045B2 JP 5781045 B2 JP5781045 B2 JP 5781045B2 JP 2012206049 A JP2012206049 A JP 2012206049A JP 2012206049 A JP2012206049 A JP 2012206049A JP 5781045 B2 JP5781045 B2 JP 5781045B2
Authority
JP
Japan
Prior art keywords
search
node
objects
unit
rendering
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
JP2012206049A
Other languages
Japanese (ja)
Other versions
JP2014059839A (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 JP2012206049A priority Critical patent/JP5781045B2/en
Publication of JP2014059839A publication Critical patent/JP2014059839A/en
Application granted granted Critical
Publication of JP5781045B2 publication Critical patent/JP5781045B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Description

本実施形態は、オブジェクト検索装置およびその方法に関し、たとえばGISやCAD等のアプリケーションの3次元(3D)オブジェクトを管理する方法に関する。   The present embodiment relates to an object search apparatus and method, and relates to a method for managing a three-dimensional (3D) object of an application such as GIS or CAD.

3Dデータベースは、時空間上に配置されたオブジェクトの集合を管理する。範囲を指定したクエリを受け取り、その範囲にあるオブジェクト一覧を返す機能を持つ。ベースとなるデータ構造・インデクスとしては、R-tree、Quad-treeやその拡張が用いられている。   The 3D database manages a set of objects arranged in space-time. Receives a query that specifies a range and returns a list of objects in that range. R-tree, quad-tree and their extensions are used as the base data structure / index.

R-tree (Antonin Guttman: R-Trees: A Dynamic Index Structure for Spatial Searching, Proc. 1984 ACM SIGMOD International Conference on Management of Data, pp. 47-57. ISBN 0-89791-128-8)R-tree (Antonin Guttman: R-Trees: A Dynamic Index Structure for Spatial Searching, Proc. 1984 ACM SIGMOD International Conference on Management of Data, pp. 47-57. ISBN 0-89791-128-8) Quad-tree (Raphael Finkel and J.L. Bentley (1974年). “Quad Trees: A Data Structure for Retrieval on Composite Keys”. Acta Informatica 4 (1): 1?9. doi:10.1007/BF00288933)Quad-tree (Raphael Finkel and J.L. Bentley (1974). “Quad Trees: A Data Structure for Retrieval on Composite Keys”. Acta Informatica 4 (1): 1? 9. Doi: 10.1007 / BF00288933)

ある視点からあるオブジェクトまでの間に、他の任意のオブジェクトがある場合、そのオブジェクトは遮られていると言う。オブジェクト群と視点を指定し、遮られているオブジェクトの一覧を得る方法が知られている。オブジェクトから視点の方向に向かう半直線的な範囲に存在するオブジェクトを求めるクエリをオブジェクトごとに実行し、その範囲内に自分自身以外のオブジェクトが一つでも存在すれば、そのオブジェクトは遮られていると判断する。   When there is another arbitrary object between a certain viewpoint and a certain object, the object is said to be blocked. A method of obtaining a list of obstructed objects by specifying an object group and a viewpoint is known. A query for an object that exists in a semi-linear range from the object toward the viewpoint is executed for each object, and if there is even one object other than itself within that range, the object is blocked Judge.

この各処理はR-treeやQuad-treeに基づいて行うため、単発の検索では高性能である。しかしながら、全オブジェクトに対して行うため、検索が遅くなる問題があった。   Since each of these processes is performed based on R-tree or Quad-tree, high performance is achieved with a single search. However, since the search is performed for all objects, there is a problem that the search becomes slow.

このような多数の一様な検索は、太陽光発電(PV:Photovoltaic power generation)装置の配置を管理する3Dデータベースでは、ビルの影に入るオブジェクト(PV装置)一覧や、ある視点からの視界内に入るオブジェクト一覧などを求めるクエリが頻繁に発生する。   Such a large number of uniform searches can be done in a 3D database that manages the arrangement of PV (photovoltaic power generation) devices, a list of objects (PV devices) that fall into the shadow of the building, and a view from a certain viewpoint. Queries that require a list of objects to enter frequently occur.

一方、3D描画を行う技術は、CADやゲームなどで研究開発・活用されている。この処理はGPUなど専用ハードウェアを使うことで非常に高速に実行可能であり、このハードウェアは広く使われているため安価である。そこで視点の方向から3D描画によって描画データを生成して、描画データをもとに、遮られているオブジェクトを検索することが考えられる。しかしながら、この検索は高速であるが、その精度は高くない。   On the other hand, 3D drawing technology is being researched, developed and utilized in CAD and games. This processing can be executed at a very high speed by using dedicated hardware such as a GPU, and this hardware is widely used and is inexpensive. Therefore, it is conceivable to generate drawing data by 3D drawing from the viewpoint direction and search for an obstructed object based on the drawing data. However, this search is fast, but the accuracy is not high.

本発明の一側面は、空間におけるある視点から見て他のオブジェクトによって遮られているオブジェクトを高速に検索することを目的とする。   An object of one aspect of the present invention is to quickly search for an object obstructed by another object from a certain viewpoint in space.

本発明の一態様としてのオブジェクト検索装置は、データベースと、レンダリング部と、算出部と、オブジェクト探索部とを備える。   An object search apparatus according to an aspect of the present invention includes a database, a rendering unit, a calculation unit, and an object search unit.

前記データベースは、空間における複数のオブジェクトの配置情報を記憶する。   The database stores arrangement information of a plurality of objects in the space.

前記レンダリング部は、前記空間内に設定した視点から前記複数のオブジェクトを描画する。   The rendering unit draws the plurality of objects from a viewpoint set in the space.

前記算出部は、前記レンダリング部を用いて描画を行い、少なくとも一部の画像が他のオブジェクトの画像によって隠されるオブジェクトの個数を算出する。   The calculation unit performs drawing using the rendering unit, and calculates the number of objects in which at least some images are hidden by images of other objects.

前記オブジェクト探索部は、前記算出部により算出された個数を検索結果数の上限値として、前記空間内において前記視点から見て少なくとも一部が他のオブジェクトによって遮られているオブジェクトを検索する探索演算を前記データベースに基づき実行する。   The object search unit uses the number calculated by the calculation unit as an upper limit value of the number of search results, and searches for an object in the space that is at least partially obstructed by another object when viewed from the viewpoint Based on the database.

本実施形態にかかるオブジェクト検索装置のブロック図。The block diagram of the object search device concerning this embodiment. オンライン検索結果見積もり処理のフローチャート。The flowchart of an online search result estimation process. オブジェクト検索装置の全体のフローチャート。The flowchart of the whole object search apparatus. 実施例Aにおけるオブジェクト配置の図。The figure of the object arrangement | positioning in Example A. 実施例Aにおけるオブジェクト配置を表す木構造を示す図。The figure which shows the tree structure showing the object arrangement in execution example A. 比較回数削減探索処理のフローチャート。The flowchart of a comparison frequency reduction search process. 実施例Aにおける比較回数・キャッシュミス回数の表を示す図。The figure which shows the table of the comparison frequency / cache miss frequency in execution example A. 実施例Bにおけるオブジェクト配置を示す図。FIG. 10 is a diagram illustrating object arrangement in the embodiment B. 実施例Bにおけるオブジェクト配置を表す木構造を示す図。The figure which shows the tree structure showing the object arrangement in execution example B. キャッシュミス削減探索処理のフローチャート。The flowchart of a cache miss reduction search process. 実施例Bにおける比較回数・キャッシュミス回数の表を示す図。The figure which shows the table of the comparison frequency / cache miss frequency in execution example B.

以下、図面を参照しながら、本実施形態を詳細に説明する。   Hereinafter, this embodiment will be described in detail with reference to the drawings.

図1に、本発明の実施形態にかかる3Dデータベースのオブジェクト検索装置を示す。   FIG. 1 shows an object search apparatus for a 3D database according to an embodiment of the present invention.

オブジェクト階層構造構成部101は、空間に配置された複数のオブジェクトについてそれぞれの最小外包直方体 (Minimum Bounded Box; MBB)を計算する。計算される最小外包直方体の各辺はx軸、y軸、z軸のいずれかに平行である。そして、MBBが近接するオブジェクト同士を1かたまりとし(グループ化し)、そのかたまりのMBBを計算する。個々のオブジェクトのMBBを葉として、かたまりをノードとし、さらにかたまり同士をノードとして、バランスされた木構造で表現される階層構造を表現していく。また、オブジェクトの挿入や削除が発生した場合にも、特性を維持するように木構造を変更していく。木構造は、各ノードの親子関係、および各オブジェクトのMBBの空間における配置位置の情報を含んでいる。   The object hierarchical structure forming unit 101 calculates a minimum bounded box (MBB) for each of a plurality of objects arranged in the space. Each side of the minimum enclosing cuboid to be calculated is parallel to any of the x-axis, y-axis, and z-axis. Then, the objects close to each other are grouped (grouped), and the MBB of the group is calculated. A hierarchical structure expressed by a balanced tree structure is expressed by using MBB of each object as a leaf, a cluster as a node, and a cluster as a node. In addition, when an object is inserted or deleted, the tree structure is changed so as to maintain the characteristics. The tree structure includes information on a parent-child relationship of each node and an arrangement position of each object in the MBB space.

ここで述べた木構造の生成手法はR-tree (Antonin Guttman: R-Trees: A Dynamic Index Structure for Spatial Searching, Proc. 1984 ACM SIGMOD International Conference on Management of Data, pp. 47-57. ISBN 0-89791-128-8) や Quad-tree と同じ手法であるため、詳しくは当該文献を参照されたい。   The tree structure generation method described here is R-tree (Antonin Guttman: R-Trees: A Dynamic Index Structure for Spatial Searching, Proc. 1984 ACM SIGMOD International Conference on Management of Data, pp. 47-57. ISBN 0- 89791-128-8) and Quad-tree, so refer to the relevant document for details.

オブジェクトMBBツリー格納部102は、オブジェクト階層構造構成部101が生成した階層構造を記憶するデータベースである。なお、本実施形態では、入力されたオブジェクトのMBBおよびグループ化したオブジェクトのMBBを計算したが、入力されたオブジェクトが直方体の各辺x軸、y軸、z軸に平行の場合は、当該オブジェクトのMBBの計算処理は不要である。また本実施形態では、オブジェクトをそのMBBによって扱うが、本実施形態はこれに制限されるものではない。   The object MBB tree storage unit 102 is a database that stores the hierarchical structure generated by the object hierarchical structure forming unit 101. In this embodiment, the MBB of the input object and the MBB of the grouped object are calculated, but if the input object is parallel to each side x-axis, y-axis, and z-axis of the rectangular parallelepiped, the object No MBB calculation is required. In this embodiment, an object is handled by its MBB, but this embodiment is not limited to this.

以下に説明するレンダリング部104、検索結果数見積もり部(算出部)103、オブジェクト探索部105の処理では、オブジェクトの処理は、特段の説明が無い限り、オブジェクトのMBBにより行うものとする。   In the processing of the rendering unit 104, the search result number estimation unit (calculation unit) 103, and the object search unit 105 described below, the object processing is performed by the MBB of the object unless otherwise specified.

レンダリング部104は、オブジェクトMBBツリー格納部102から3D空間に配置されたオブジェクト一覧を読み出す。レンダリング部104は、クエリにより与えられる視点の方向から、空間における各オブジェクトの3Dレンダリング処理を行う。レンダリング処理の途中で得られる情報、またはレンダリング処理の結果(描画データ)は、検索結果数見積もり部103で利用する。当該処理の途中で得られる情報やレンダリング処理の結果を表示装置で実際に表示する必要はない。   The rendering unit 104 reads out a list of objects arranged in the 3D space from the object MBB tree storage unit 102. The rendering unit 104 performs 3D rendering processing of each object in space from the viewpoint direction given by the query. Information obtained during the rendering process or the result of the rendering process (drawing data) is used by the search result number estimation unit 103. There is no need to actually display the information obtained during the process or the result of the rendering process on the display device.

検索結果数見積もり部103は、視点を表すクエリを受け取り、レンダリング部104を用いて、クエリにより示される視点から、各オブジェクトを3Dレンダリングする。レンダリングの途中で得られる情報、またはレンダリングの処理結果を利用することで、他のオブジェクトによって遮られているオブジェクト数の上限値(検索結果数の上限値)を見積もる。   The search result number estimation unit 103 receives a query representing a viewpoint, and uses the rendering unit 104 to 3D render each object from the viewpoint indicated by the query. By using information obtained in the middle of rendering or processing results of rendering, an upper limit value of the number of objects obstructed by other objects (upper limit value of the number of search results) is estimated.

ここで、視点を表すクエリとしては、位置を表す3D座標(透視投影のカメラ位置)、または、視線方向を表す3Dベクトル(視点が無限遠にあると考える。平行投影の視線方向)、または同等の情報を持つデータ構造を用いる。ここでは視点の主体は、全方位カメラのようなものを想定する。本実施形態の用途の一例は、当該位置に点光源を置いて、影が出来てしまうオブジェクト(他のオブジェクトによって遮られるオブジェクトの)の一覧を得るものである。   Here, as the query representing the viewpoint, 3D coordinates representing the position (perspective camera position of perspective projection), 3D vector representing the direction of the line of sight (considering that the viewpoint is at infinity, the line of sight of the parallel projection), or equivalent A data structure having the following information is used. Here, the subject of the viewpoint is assumed to be an omnidirectional camera. An example of the use of this embodiment is to obtain a list of objects (objects obstructed by other objects) that cause a shadow by placing a point light source at the position.

レンダリングの処理結果を利用して、検索結果数の上限値を見積もることを、“オフライン検索結果見積もり処理”と呼ぶ。一方、レンダリング処理の途中で得られる情報を利用して検索結果数の上限値を見積もることを、“オンライン検索結果見積もり処理”と呼ぶ。どちらの処理でも、同じ結果が得られる。   Estimating the upper limit value of the number of search results using the rendering process result is called “offline search result estimation process”. On the other hand, estimating the upper limit of the number of search results using information obtained during the rendering process is called “online search result estimation process”. Both processes give the same result.

“オフライン検索結果見積もり処理”では、レンダリング結果の描画データを利用して、完全な形で描かれているオブジェクトのみを判定により抽出する。すなわち他のオブジェクトの画像によって隠されていない(他のオブジェクトの画像と重なっていない)オブジェクトをすべて特定する。特定したオブジェクトの集合は、他のオブジェクトの画像によって隠されていないオブジェクトの集合である。他のオブジェクトの画像によって隠されているオブジェクトの集合が欲しい場合は、全集合から当該集合の補集合をとることで得られる。本実施形態では後者の、他のオブジェクトの画像によって隠されているオブジェクトの集合を取得する。他のオブジェクトの画像によって隠されているオブジェクトは、3D空間で実際に他のオブジェクトによって遮られているオブジェクトの候補となり得るものである。   In the “offline search result estimation process”, the drawing data of the rendering result is used to extract only the object drawn in a complete form by determination. That is, all objects that are not hidden by the images of other objects (not overlapping the images of other objects) are specified. The specified set of objects is a set of objects that are not hidden by images of other objects. When a set of objects hidden by images of other objects is desired, it can be obtained by taking the complement of the set from all sets. In the present embodiment, the latter set of objects hidden by images of other objects is acquired. An object hidden by an image of another object can be a candidate for an object that is actually blocked by the other object in the 3D space.

ここで具体的な判定の方法としては、個々のオブジェクトを単独で独立してレンダリングし、個々のレンダリング結果の画像と、前述のすべてのオブジェクトのレンダリング結果に含まれる個々のオブジェクトの画像が同じかを判定する。同じであれば、当該オブジェクトは隠されていないオブジェクトと判定し、そうでなければ、隠されているオブジェクトと判定することができる。   Here, as a specific determination method, individual objects are rendered independently independently, and the images of the individual rendering results and the images of the individual objects included in the rendering results of all the above-mentioned objects are the same. Determine. If they are the same, the object can be determined as an object that is not hidden, and if not, it can be determined as an object that is hidden.

次に、“オンライン検索結果見積もり処理”について説明する。   Next, “online search result estimation processing” will be described.

図2に、オンライン検索結果見積もり処理の動作のフローチャートを示す。   FIG. 2 shows a flowchart of the online search result estimation process.

最初に、リストを初期化する(S201)。3D空間に配置されたオブジェクトの集合を順次描画する。この際、各オブジェクトを1つずつ順番に描画する(S202)。また、オブジェクトの描画では、ピクセルごとに以下の処理を行う(S203)。   First, the list is initialized (S201). Sequentially draws a set of objects arranged in 3D space. At this time, each object is drawn one by one in order (S202). In the drawing of the object, the following processing is performed for each pixel (S203).

すなわち、描画しようとしたピクセルにすでに他のオブジェクトが描かれていた場合(S204のYES)、今描画しようとしているオブジェクト(現在のオブジェクト)が、すでに描画されているオブジェクトより手前にあるかを判断する(S205)。手前にある場合は(S205のNO)、既にあるオブジェクトは、現在描画されているオブジェクトにより隠されていると判定し、当該既にあるオブジェクトの識別子をリストに追加し(S206)、現在のピクセルのデータで、既にあるオブジェクトを対応するピクセルを上書きする(S207)。そうでない場合(S205のYES)、すなわち、現在のオブジェクトがすでに描画されているオブジェクトより後ろにある場合は、現在のオブジェクトがすでに描画されているオブジェクトに隠されていると判定し、当該現在のオブジェクトの識別子をリストに追加し(S208)、描画をスキップする。描画しようとしたピクセルに、何も描かれていない場合は(S204のNO)、オブジェクトを描画する(S207)。   That is, if another object has already been drawn on the pixel to be drawn (YES in S204), it is determined whether the object to be drawn (current object) is in front of the already drawn object. (S205). If it is in front (NO in S205), it is determined that the existing object is hidden by the currently drawn object, and the identifier of the existing object is added to the list (S206). The pixel corresponding to the existing object is overwritten with the data (S207). If not (YES in S205), that is, if the current object is behind the already drawn object, it is determined that the current object is hidden by the already drawn object, and the current object The object identifier is added to the list (S208), and drawing is skipped. If nothing is drawn on the pixel to be drawn (NO in S204), the object is drawn (S207).

最後にリストを出力する(S209)。リストに含まれているオブジェクトの個数が、他のオブジェクトによって遮られているオブジェクトの個数の上限値の見積もり結果となる。   Finally, a list is output (S209). The number of objects included in the list is an estimation result of the upper limit value of the number of objects blocked by other objects.

ここで、“オフライン検索結果見積もり”でも“オンライン検索結果見積もり”でも、描画の解像度(ここでは、実際よりもどの程度大きく描くか、あるいはどの程度小さく描くかを意味する)に依存するため、完全な精度は得られない。解像度に応じて、実際は遮られていないのに描画では隠されていると判定されたり、実際には遮られているのに描画では隠されていないと判定されたりするが、描画の解像度を調整することで、これはどちらかに調整できる。   Here, both “offline search result estimation” and “online search result estimation” are completely dependent on the resolution of drawing (meaning how much larger or smaller than actual drawing). Accurate accuracy cannot be obtained. Depending on the resolution, it is determined that it is hidden by drawing although it is not actually blocked, or it is determined that it is actually hidden but not hidden by drawing, but the drawing resolution is adjusted. This can be adjusted to either.

本実施形態では、解像度を低くめに設定することで(オブジェクトを実際よりも大き目に描くことで)、実際の空間では他のオブジェクトに遮られていなくても、描画において他のオブジェクトの画像により隠されていると判定されることを許容する。ただし実際の空間では他のオブジェクトにより遮られているのに、描画において他のオブジェクトの画像により隠されていないと判定されることはない。このように実際よりも大きく描くことで上記の“オフライン検索結果見積もり”もしくは“オンライン検索結果見積もり”では、実際に遮られているオブジェクトを検索する際の検索結果数の上限値を得ることができる。上限値を利用した探索を行うことで、後述するように効率的な検索が可能となる。   In this embodiment, by setting the resolution lower (by drawing the object larger than the actual size), even if it is not obstructed by other objects in the actual space, Allow to be determined to be hidden. However, although it is obstructed by another object in the actual space, it is not determined that it is not hidden by the image of the other object in the drawing. As described above, the above-mentioned “offline search result estimation” or “online search result estimation” can obtain the upper limit of the number of search results when searching for an object that is actually blocked. . By performing a search using the upper limit value, an efficient search is possible as will be described later.

オブジェクト探索部105は、検索結果数見積もり部103の見積もり結果(上限値)に基づいて、あらかじめ与えられた複数の探索戦略の中から適切な探索戦略を選択する。そして、選択した探索戦略に従って、オブジェクトMBBツリー格納部102からツリーを読み出して探索を行う。   The object search unit 105 selects an appropriate search strategy from a plurality of search strategies given in advance based on the estimation result (upper limit value) of the search result number estimation unit 103. Then, according to the selected search strategy, the tree is read from the object MBB tree storage unit 102 and searched.

具体的な探索戦略は多数考えられ、特定のものに限定されない。本実施形態では、一例として、比較回数削減戦略(第2探索戦略)とキャッシュミス削減戦略(第1探索戦略)を紹介する。比較回数削減戦略は、必要に応じて再帰判定を行うことで、比較回数(判定回数)の削減を目指す探索戦略である。キャッシュミス削減戦略は、探索中にノード到達時に一括してすべての再帰判定を行うことで、オブジェクトMBBツリー格納部102からの読み込み回数(キャッシュミスの回数)の削減を目指す探索戦略である。   Many specific search strategies are conceivable and are not limited to specific ones. In this embodiment, as an example, a comparison frequency reduction strategy (second search strategy) and a cache miss reduction strategy (first search strategy) are introduced. The comparison frequency reduction strategy is a search strategy that aims to reduce the number of comparisons (number of determinations) by performing recursive determination as necessary. The cache miss reduction strategy is a search strategy aiming to reduce the number of times of reading from the object MBB tree storage unit 102 (number of cache misses) by performing all recursive determinations when a node arrives during search.

図3は、全体の動作の流れを示すフローチャートである。   FIG. 3 is a flowchart showing the overall operation flow.

検索結果数見積もり部103は、レンダリング部104を用いて、他のオブジェクトに遮られているオブジェクト数の上限値を見積もる(S101)。レンダリング部104では、オフラインおよびオンラインのうち、どちらの検索結果見積もり処理を行ってもかまわない。   The search result number estimation unit 103 uses the rendering unit 104 to estimate the upper limit of the number of objects obstructed by other objects (S101). The rendering unit 104 may perform either search result estimation processing, offline or online.

オブジェクト探索部105は、見積もり数(上限値)を閾値と比較し(S102)、上限値が閾値以下か、閾値より大きいかで、それぞれに応じた異なる探索戦略(探索戦略1、探索戦略2)を選択し、選択した探索戦略で、空間(ツリー)を探索する(S103,S104)。探索により、他のオブジェクトに実際に遮られているオブジェクトを検出する。検索結果出力部106は、当該オブジェクトの一覧を出力する(S105)。   The object search unit 105 compares the estimated number (upper limit value) with a threshold value (S102), and the search strategy (search strategy 1, search strategy 2) differs depending on whether the upper limit value is less than the threshold value or greater than the threshold value. And a space (tree) is searched with the selected search strategy (S103, S104). By searching, an object that is actually blocked by another object is detected. The search result output unit 106 outputs a list of the objects (S105).

以下、具体的な事例をもとに、実施例A,Bとして、本実施形態の動作を詳細に説明する。   Hereinafter, the operation of the present embodiment will be described in detail as Examples A and B based on specific examples.

(実施例A)
本実施例では、図4に示すようなオブジェクトの集合に対し、ある視点から見たときに、他のオブジェクトによって遮られているオブジェクトを検索したいとする。
(Example A)
In the present embodiment, it is assumed that the object set as shown in FIG. 4 is searched for an object that is blocked by another object when viewed from a certain viewpoint.

検索結果数見積もり部103では、オフライン検索結果見積もりを行うものとする。   The search result number estimation unit 103 performs offline search result estimation.

オブジェクト探索部105は、比較回数削減戦略及びキャッシュミス削減戦略のうちのいずれかを選択して実行する。具体的に、検索結果見積もり部103の見積もり結果が3以下の場合は比較回数削減戦略を、3より大きい場合は、キャッシュミス削減戦略を選択するとする。ここの3という数字はあくまで一例であり、実施の値な任意に設定できる。   The object search unit 105 selects and executes either the comparison frequency reduction strategy or the cache miss reduction strategy. Specifically, when the estimation result of the search result estimation unit 103 is 3 or less, the comparison number reduction strategy is selected, and when it is larger than 3, the cache miss reduction strategy is selected. The number 3 here is just an example, and can be set to any value.

(実施例Aにおけるオブジェクト階層構造構成部101の動作)
オブジェクト群を入力し、近いオブジェクトを階層的にグループ化することで木構造を構築する。本実施例では、図5に示す木構造が得られたものとする。木構造の葉ノードは、オブジェクトのMBB、それ以外のノードは、グループ化したオブジェクトのMBBを表すノードである。
(Operation of Object Hierarchy Configuration Unit 101 in Example A)
A tree structure is constructed by inputting an object group and hierarchically grouping close objects. In this example, it is assumed that the tree structure shown in FIG. 5 is obtained. The leaf node of the tree structure is an MBB of the object, and the other nodes are nodes representing the MBB of the grouped objects.

細かいピッチのハッチングの施された葉ノードは、クエリにマッチするオブジェクト(すなわち、他のオブジェクトによって遮られているオブジェクト)を表す葉ノードである。   A leaf node with fine pitch hatching is a leaf node that represents an object that matches the query (ie, an object that is blocked by another object).

また、粗いピッチのハッチングの施された枠は、オブジェクトMBBツリー格納部102からの読み出し単位を表す。たとえばノードaとノードbとは同時に読み出される。ノード4とノード5は同時に読み出される。説明のため、キャッシュメモリには、この読み出し単位のデータを1つのみを格納可能とし、他の読み出し単位のデータが読み出されたときは、既に存在する読み出し単位は上書きされるものとする。たとえばノード4とノード5がキャッシュに存在する状態で、ノード10とノード11が読み出されると、ノード4とノード5は上書きされるものとする。実際には、キャッシュのサイズが大きければ、他のデータを読み出しても前のデータはキャッシュに残っている可能性が高い。しかしながら、この実施例では簡単のため、同時の1つの読み出し単位分のデータしかキャッシュに乗らないという簡単なモデルで説明する。   Further, a hatched frame with a rough pitch represents a unit of reading from the object MBB tree storage unit 102. For example, node a and node b are read simultaneously. Node 4 and node 5 are read simultaneously. For the sake of explanation, it is assumed that only one read unit data can be stored in the cache memory, and when another read unit data is read, the existing read unit is overwritten. For example, when nodes 10 and 11 are read in a state where nodes 4 and 5 exist in the cache, nodes 4 and 5 are overwritten. Actually, if the size of the cache is large, there is a high possibility that the previous data remains in the cache even if other data is read. However, in this embodiment, for the sake of simplicity, a simple model in which only data for one reading unit at a time is stored in the cache will be described.

(実施例AにおけるオブジェクトMBBツリー格納部102の動作)
オブジェクトMBBツリー格納部102は、図5に示すような木構造を記憶する。
(Operation of Object MBB Tree Storage Unit 102 in Example A)
The object MBB tree storage unit 102 stores a tree structure as shown in FIG.

(実施例Aにおけるレンダリング部104の動作)
レンダリング部104は、図4に示すような画像を描画(レンダリング)して出力する。
(Operation of the rendering unit 104 in the embodiment A)
The rendering unit 104 draws (renders) and outputs an image as shown in FIG.

(実施例Aにおけるオフライン検索結果数見積もり部103の動作)
オフライン検索結果数見積もり部103は、視点を表すクエリを受け取り、レンダリング部104を用いてレンダリングを行う。これにより、図4のようなレンダリング結果(描画データ)を得る。図4では、オブジェクトfの画像のみが一部隠されており、オブジェクトf以外のオブジェクトの画像は、すべて完全に見えている。つまり、遮られているオブジェクトは高々1個であると見積もることができる。
(Operation of the offline search result number estimation unit 103 in Example A)
The offline search result number estimation unit 103 receives a query representing a viewpoint and performs rendering using the rendering unit 104. Thereby, a rendering result (drawing data) as shown in FIG. 4 is obtained. In FIG. 4, only the image of the object f is partially hidden, and all the images of the objects other than the object f are completely visible. In other words, it can be estimated that there is at most one obstructed object.

(実施例Aにおけるオブジェクト探索部105の動作)
オフライン検索結果数見積もり部103の見積もり結果(上限値)と、閾値を比較する。ここでは閾値を3とする。見積もり結果が3以下であれば、比較回数削減戦略、3より大きければキャッシュミス削減戦略を用いる。見積もり結果は1であり、これは3以下であるため、ここでは比較回数削減探索戦略を採用する。
(Operation of Object Search Unit 105 in Example A)
The estimation result (upper limit value) of the offline search result number estimation unit 103 is compared with the threshold value. Here, the threshold is 3. If the estimation result is 3 or less, the comparison number reduction strategy is used, and if it is larger than 3, the cache miss reduction strategy is used. Since the estimation result is 1, which is 3 or less, the comparison number reduction search strategy is adopted here.

図6に、比較回数削減探索処理のフローチャートを示す。   FIG. 6 shows a flowchart of the comparison number reduction search process.

探索開始時には、簡単のため、全ノードがキャッシュに存在しないとする。   For the sake of simplicity, it is assumed that all nodes do not exist in the cache at the start of the search.

オブジェクト探索部105は、まずノード1をキャッシュにロードし(S301)、ノード1がクエリを満たす可能性があるか、すなわち、ノード1のMBBが、他のオブジェクトによって遮られているオブジェクトを包含している可能性があるかどうかを、比較・判定する(S303)。なおステップS302は根ノードであるノード1については省略するものとする。ここでは、ノード1のMBBは、他のオブジェクトによって遮られているオブジェクトを含んでいると可能性があると判断される(ステップS303のYES)。ノード1のロード時には、キャッシュミスが発生し、オブジェクトMBBツリー格納部102からの読み込みが発生する。ここで、比較・判定の方法の一例を示す。   The object search unit 105 first loads the node 1 into the cache (S301), and includes an object in which the node 1 may satisfy the query, that is, the MBB of the node 1 is blocked by other objects. It is compared and determined whether or not there is a possibility (S303). Note that step S302 is omitted for node 1, which is the root node. Here, it is determined that there is a possibility that the MBB of the node 1 includes an object blocked by another object (YES in step S303). When node 1 is loaded, a cache miss occurs and reading from the object MBB tree storage unit 102 occurs. Here, an example of the comparison / determination method is shown.

一般に、オブジェクトから視点(太陽等)を結ぶ線分の間に他のオブジェクトがあるかどうかを空間探索木によって判定するという技術が既に存在する(他のオブジェクトが存在すれば、上記オブジェクトは影になると判定される)。つまり、そのノードの MBB の各頂点から太陽までを結ぶ線分の間に、他のオブジェクトが存在するかどうかを部分的に検索して判定することができる。他のオブジェクトが1つでも発見されたら、そのノードは影になる可能性があるという事で、「クエリを満たす可能性がある」と判定される。逆に1 つもオブジェクトが発見されなければ、「クエリを満たす可能性はない」と判定される。本実施例では、まず、ノード1のMBBの8個の頂点と、視点(太陽等)を結んで得られる線分のうちの少なくとも1つが、オブジェクトa〜hのいずれかに衝突すれば、ノード1は、クエリを満たす可能性がある(他のオブジェクトに遮られているオブジェクトを包含している可能性がある)と判定する。ここで述べた以外の方法を用いて比較・判定を行ってもよい。   In general, there is already a technique that uses a spatial search tree to determine whether there is another object between the line segment connecting the viewpoint (such as the sun) from the object (if there is another object, the object will become a shadow. Determined to be). In other words, it is possible to determine whether or not other objects exist between the line segments connecting each vertex of MBB of the node to the sun. If any other object is found, it is determined that the node may become a shadow, so it may be possible to satisfy the query. Conversely, if no object is found, it is determined that there is no possibility of satisfying the query. In this embodiment, first, if at least one of the line segments obtained by connecting the eight vertices of the MBB of the node 1 and the viewpoint (such as the sun) collides with any of the objects a to h, the node 1 determines that there is a possibility of satisfying the query (possibly including an object blocked by other objects). The comparison / determination may be performed using methods other than those described here.

次に、本フローを再帰的に行う再帰探索(S304)に進み、ノード1の子ノードであるノード2とノード3をキャッシュにロードする(S301)。つまり、キャッシュミスが発生し、オブジェクトMBBツリー格納部102からノード2,3の読み込みが発生する。ノード2とノード3がクエリを満たす可能性があるかどうかを比較・判定する。ここでは、比較回数削減探索のため、2つのノードの両方を同時に比較・判定するのではなく、これらのうち任意に選択した片方のみ、比較・判定のみを行う(S302、S303)。ここでは、ノード3が選ばれるとする。ここでは、ノード3は、クエリを満たす可能性があると判定される(S303のYES)。ノード2については、この時点では、比較・判定を行わず、比較・判定を行っていないという情報のみを記憶しておく。   Next, the flow proceeds to a recursive search (S304) in which this flow is recursively, and the nodes 2 and 3 that are child nodes of the node 1 are loaded into the cache (S301). That is, a cache miss occurs, and reading of nodes 2 and 3 from the object MBB tree storage unit 102 occurs. Compare / determine whether node 2 and node 3 may satisfy the query. Here, for the comparison frequency reduction search, both of the two nodes are not compared / determined at the same time, but only one of them arbitrarily selected is compared / determined (S302, S303). Here, it is assumed that node 3 is selected. Here, it is determined that the node 3 may satisfy the query (YES in S303). For node 2, at this time point, only the information that comparison / determination is not performed and comparison / determination is not performed is stored.

次に、再帰探索(S304)に進み、ノード6とノード7をキャッシュにロードする(S301)。つまり、キャッシュミスが発生し、ノード6,7がオブジェクトMBBツリー格納部102から読み込まれる。ここでは、ノード6が選ばれる。ここでは、ノード6は、クエリを満たす可能性があると判定される(S302、S303のYES)。ノード7については、この時点では、比較・判定を行わず、比較・判定を行っていないという情報のみを記憶しておく。   Next, the process proceeds to a recursive search (S304), and the nodes 6 and 7 are loaded into the cache (S301). That is, a cache miss occurs, and the nodes 6 and 7 are read from the object MBB tree storage unit 102. Here, node 6 is selected. Here, it is determined that the node 6 may satisfy the query (YES in S302 and S303). As for the node 7, at this time point, only information that comparison / determination is not performed and comparison / determination is not performed is stored.

次に、再帰探索(S304)に進み、ノード12とノード13を、キャッシュにロードする(S301)つまり、キャッシュミスが発生し、ノード12,13がオブジェクトMBBツリー格納部102から読み込まれる。ここでは、ノード12が選ばれたとする。ノード12は葉ノードである。ノード12のオブジェクトfが、他のオブジェクトによって遮られているかを判定する。つまり、オブジェクトfのMBBの各頂点と、視点(太陽等)とを結ぶ線分上に他のオブジェクトが存在するか判定される。ここではオブジェクトeが存在すると判定される。つまり、オブジェクトfはオブジェクトeによって遮られていると判定される。ここで、見積もり結果の値(上限値)は1である。1個の遮られたオブジェクトが発見されたので、これ以上遮られたオブジェクトが見つかることはないとわかる。よって探索は終了する。なお、もし、ノード12より先にノード13が選択されたときは、ノード13がクエリを満たさないと判定され、次に兄弟ノードであるノード12が選択され、上記のようにクエリを満たすと判定され、探索が終了する。   Next, the process proceeds to recursive search (S304), and the nodes 12 and 13 are loaded into the cache (S301). That is, a cache miss occurs, and the nodes 12 and 13 are read from the object MBB tree storage unit 102. Here, it is assumed that the node 12 is selected. Node 12 is a leaf node. It is determined whether the object f of the node 12 is blocked by another object. That is, it is determined whether another object exists on a line segment connecting each vertex of the MBB of the object f and the viewpoint (sun etc.). Here, it is determined that the object e exists. That is, it is determined that the object f is blocked by the object e. Here, the value (upper limit value) of the estimation result is 1. Since one occluded object has been found, it can be seen that no more occluded objects can be found. Thus, the search ends. If node 13 is selected before node 12, it is determined that node 13 does not satisfy the query, then sibling node 12 is selected, and it is determined that the query is satisfied as described above. And the search ends.

(実施例Aの効果)
図7に示すように、本実施例の比較回数削減探索では、比較回数は4回、キャッシュミスは4回であった。
(Effect of Example A)
As shown in FIG. 7, in the comparison number reduction search of this example, the number of comparisons was 4, and the number of cache misses was 4.

もし仮に、比較回数削減探索ではなく、キャッシュミス削減探索を採用していた場合を考えると、ノード1、ノード2、ノード3、ノード6、ノード7、ノード12、ノード13と、合計7回の比較が行われ、キャッシュミスの回数は同じ4回となる(図7参照)。キャッシュミスの回数が同じであれば、比較回数が少ないほうが効率的である。このように本実施例は、少ない比較回数で探索を終えることができる。なお、キャッシュミス削減探索の動作は後述する。   If we consider a cache miss reduction search instead of a comparison count reduction search, node 1, node 2, node 3, node 6, node 7, node 12, and node 13, a total of 7 times A comparison is made and the number of cache misses is the same four times (see FIG. 7). If the number of cache misses is the same, it is more efficient to have a smaller number of comparisons. Thus, the present embodiment can finish the search with a small number of comparisons. The operation of the cache miss reduction search will be described later.

もっとも、これは、ノードの非決定的な選択(ノード2とノード3の選択など)において、すべて最適な選択が可能であった場合の評価であるため、実際には比較回数は4回より多くなる可能性がある。しかしそれでもキャッシュミス削減探索と同じ7回が上限であり、キャッシュミス削減探索では常に7回の比較が行われるので、ほぼ常に効率的な選択をすることができる。   However, this is an evaluation when all optimal selections are possible in nondeterministic selection of nodes (such as selection of node 2 and node 3), so the number of comparisons is actually more than 4 times. there is a possibility. However, the upper limit is 7 times as in the cache miss reduction search, and the cache miss reduction search always performs 7 comparisons, so that an efficient selection can be made almost always.

(実施例B)
本実施例では、図8に示すようなオブジェクトの集合に対し、他のオブジェクトによって遮られているオブジェクトを検索したとする。
(Example B)
In the present embodiment, it is assumed that an object obstructed by another object is searched for the set of objects as shown in FIG.

検索結果数見積もり部103では、オンライン検索結果見積もりを行うものとする。   The search result number estimation unit 103 performs online search result estimation.

オブジェクト探索部105では、比較回数削減戦略及びキャッシュミス削減戦略のうちのいずれかを選択して実行する。具体的に、検索結果見積もり部103の見積もり結果が3以下の場合は比較回数削減戦略を、3より大きいの場合は、キャッシュミス削減戦略を選択するとする。   The object search unit 105 selects and executes either the comparison frequency reduction strategy or the cache miss reduction strategy. Specifically, when the estimation result of the search result estimation unit 103 is 3 or less, the comparison frequency reduction strategy is selected, and when it is larger than 3, the cache miss reduction strategy is selected.

(実施例Bにおけるオブジェクト階層構造構成部101の動作)
オブジェクト群を入力し、近いオブジェクトを階層的にグループ化することで木構造を構築する。木構造の葉ノードはオブジェクトのMBB、それ以外のノードはグループ化したオブジェクトのMBBを表すノードである。本実施例では、図9に示す木構造が得られたものとする。細かいピッチのハッチングが施された葉ノードは、クエリにマッチするオブジェクトを表す葉ノードである。
(Operation of Object Hierarchy Configuration Unit 101 in Example B)
A tree structure is constructed by inputting an object group and hierarchically grouping close objects. The leaf node of the tree structure is the MBB of the object, and the other nodes represent the MBB of the grouped objects. In this example, it is assumed that the tree structure shown in FIG. 9 is obtained. A leaf node to which hatching with fine pitch is applied is a leaf node representing an object matching the query.

また、粗いピッチのハッチングの施された枠は、オブジェクトMBBツリー格納部102からの読み出し単位を表す。実施例Aと同様、キャッシュメモリには、この読み出し単位のデータを1つのみを格納可能という簡単なモデルで説明する。   Further, a hatched frame with a rough pitch represents a unit of reading from the object MBB tree storage unit 102. As in the case of the embodiment A, the cache memory will be described with a simple model in which only one piece of read unit data can be stored.

(実施例BにおけるオブジェクトMBBツリー格納部102の動作)
オブジェクトMBBツリー格納部102は、図9に示すような木構造を記憶する。
(Operation of Object MBB Tree Storage Unit 102 in Example B)
The object MBB tree storage unit 102 stores a tree structure as shown in FIG.

(実施例Bにおけるレンダリング部104およびオンライン検索結果数見積もり部103の動作)
オンライン検索結果数見積もり部103は、視点を表すクエリを受け取り、レンダリング部104により描画(レンダリング)を行う。
(Operations of the rendering unit 104 and the online search result number estimation unit 103 in the embodiment B)
The online search result number estimation unit 103 receives a query representing a viewpoint, and the rendering unit 104 performs rendering (rendering).

レンダリング部104は、図2に示した動作フローに従って、全オブジェクトを順次描画していく。ここでは、オブジェクトaからhをこの順に描画したとする。最終的な描画結果は図8のようになる。   The rendering unit 104 sequentially draws all the objects according to the operation flow shown in FIG. Here, it is assumed that objects a to h are drawn in this order. The final drawing result is as shown in FIG.

まず、他のオブジェクトの画像によって隠されているオブジェクトの識別子を保存するためのリストを空として初期化する(S201)。   First, a list for storing identifiers of objects hidden by images of other objects is initialized as empty (S201).

空の背景に対してオブジェクトaを描画する。描画領域に他のオブジェクトは存在しないので、そのままオブジェクトaを描画する(S204のNO、S207)。   Draw object a against the sky background. Since no other object exists in the drawing area, the object a is drawn as it is (NO in S204, S207).

同様にオブジェクトbも描画する(S204のNO、S207)。   Similarly, the object b is drawn (NO in S204, S207).

次にオブジェクトcを描画するが、これを描画しようとした一部のピクセルに、オブジェクトbが描画済みである。そして、現在描画しようとしているオブジェクトcの方が手前にある。よって描画済のオブジェクトbの識別子をリストに追加する(S204のNO、S206、S207)。   Next, the object c is drawn, and the object b is already drawn on some pixels for which the object c is to be drawn. The object c that is currently being drawn is in the foreground. Therefore, the identifier of the drawn object b is added to the list (NO in S204, S206, S207).

次にオブジェクトd、eを描画する。共に他にオブジェクトが描かれていない領域に描画しようとするため、そのまま描画する(S204のNO、S207)。   Next, the objects d and e are drawn. Since both are to be drawn in an area where no other object is drawn, the drawing is performed as it is (NO in S204, S207).

次にオブジェクトfを描画するが、これを描画しようとした一部のピクセルに、オブジェクトeが描画済みである。そして、すでに描画されているeの方が手前にある。よって現在描画しようとしているオブジェクトeをリストに追加する(S204のYES、S205のYES、S208)。   Next, the object f is drawn, and the object e has been drawn on some pixels for which the object f is to be drawn. And e already drawn is in the foreground. Therefore, the object e to be drawn is added to the list (YES in S204, YES in S205, S208).

同様に、オブジェクトg、hも、他のオブジェクトが手前にあることがわかる。よって現在描画しようとしているオブジェクトg,hをリストに追加する(S204のYES、S205のYES、S208)。   Similarly, it can be seen that the objects g and h have other objects in front. Therefore, the objects g and h that are currently drawn are added to the list (YES in S204, YES in S205, and S208).

以上を終えると、リストを出力する(S209)。リストの長さは4である。よって見積り数(上限値)は4である。   When the above is completed, a list is output (S209). The length of the list is 4. Therefore, the estimated number (upper limit) is 4.

(実施例Bにおけるオブジェクト探索部105の動作)
オフライン検索結果数見積もりの結果が3以下ではないため、ここではキャッシュミス回数削減探索を採用する。
(Operation of Object Search Unit 105 in Example B)
Since the result of estimating the number of offline search results is not 3 or less, here, the search for reducing the number of cache misses is adopted.

図10にキャッシュミス削減探索処理のフローチャートを示す。   FIG. 10 shows a flowchart of the cache miss reduction search process.

探索開始時には、簡単のため、全ノードがキャッシュに存在しないという前提とする。   At the start of the search, for the sake of simplicity, it is assumed that all nodes do not exist in the cache.

比較回数削減探索処理では、まずノード1をキャッシュする(S401)。つまり、キャッシュミスが発生し、ノード1のデータをオブジェクトMBBツリー格納部102からCPUに読み込む。判定結果を格納する配列を初期化する(S402)。ステップS403は、根ノードであるノード1についてはスキップする。ノード1がクエリを満たす可能性があるかどうかを比較・判定する(S404)。ここでは可能性があり(再帰すべき)と判定され、判定結果を上記配列に保存する(S404)。ステップS405は根ノードであるノード1についてはスキップする。ステップS406では、ノード1について再帰すべきとの判定結果が上記配列に記録されているため、本フローを再帰する再帰探索(S407)へ進む。   In the comparison frequency reduction search process, the node 1 is first cached (S401). That is, a cache miss occurs and the data of node 1 is read from the object MBB tree storage unit 102 to the CPU. An array for storing the determination result is initialized (S402). Step S403 skips for node 1, which is the root node. It is compared and determined whether or not there is a possibility that the node 1 satisfies the query (S404). Here, it is determined that there is a possibility (should be recursive), and the determination result is stored in the array (S404). Step S405 skips for node 1, which is the root node. In step S406, since the determination result that node 1 should be recursed is recorded in the array, the process proceeds to a recursive search (S407) that recurs this flow.

次に、ノード1の子ノードであるノード2とノード3をキャッシュにロードし、ノード2,3に対する配列を初期化する(S401,S402)。つまり、キャッシュミスが発生し、オブジェクトMBBツリー格納部102からの読み込みが発生する。ノード2,3がクエリを満たす可能性があるかどうかを比較・判定する(S403、S404)。前述した比較回数削減探索では、片方のノードについてのみ比較・判定だけ行うが、本キャッシュミス回数削減探索では、両方の比較・判定を行う。ノード2,3ともクエリを満たす可能性がありと判定され、判定結果を配列に格納する(S404)。ステップS406では、ノード2,3とも再帰すべきとの判定結果が記録されているため、いずれか一方のノードを選択し、再帰探索する。ここでは、ノード2を選択し、ノード2について再帰探索を行う(つまり、ノード2の方から木を降りるとする)(S405、S406、S407)。   Next, node 2 and node 3 which are child nodes of node 1 are loaded into the cache, and the arrays for nodes 2 and 3 are initialized (S401, S402). That is, a cache miss occurs and reading from the object MBB tree storage unit 102 occurs. It is compared and determined whether or not the nodes 2 and 3 may satisfy the query (S403, S404). In the comparison frequency reduction search described above, only comparison / determination is performed for only one of the nodes. In this cache miss frequency reduction search, both comparisons / determinations are performed. It is determined that there is a possibility that both the nodes 2 and 3 satisfy the query, and the determination result is stored in the array (S404). In step S406, since the determination result that both nodes 2 and 3 should be recursed is recorded, either one of the nodes is selected and a recursive search is performed. Here, node 2 is selected, and a recursive search is performed for node 2 (that is, the tree descends from node 2) (S405, S406, S407).

次に、ノード4とノード5についても、ノード2,3と同様の処理を行う(S401、S402、S403、S404、S405、S406)。この場合も、キャッシュミスが発生し、オブジェクトMBBツリー格納部102から読み込みが発生する。ノード4,5とも再帰すべきとの判定結果が、ノード4,5に対する配列に記録される。ここではノード4を選択し、再帰探索する。   Next, processing similar to that of nodes 2 and 3 is performed for nodes 4 and 5 (S401, S402, S403, S404, S405, and S406). Also in this case, a cache miss occurs, and reading from the object MBB tree storage unit 102 occurs. The determination result that nodes 4 and 5 should be recursed is recorded in the array for nodes 4 and 5. Here, node 4 is selected and a recursive search is performed.

次に、ノード4の子ノードであるノード8とノード9をキャッシュにロードし、ノード8,9に対する配列を初期化する(S401,S402)。つまり、キャッシュミスが発生し、オブジェクトMBBツリー格納部102からの読み込みが発生する。ノード8,9がクエリを満たす可能性があるかどうかを比較・判定する(S403、S404)。ノード8とノード9は葉ノードである。ノード9がクエリを満たし、これによりオブジェクトbが発見される。ノード9はクエリを満たさないと判定される。ノード8、9はいずれも葉ノードであるため、再帰すべきでないとの判定結果が配列に記録される。これで葉ノードまで探索が完了したが、まだ見積もり数(上限値)に至っていない。このため、探索を続行しなければならない。このため、ノード4とノード5に戻る(ステップS406のNO)。   Next, node 8 and node 9 which are child nodes of node 4 are loaded into the cache, and an array for nodes 8 and 9 is initialized (S401, S402). That is, a cache miss occurs and reading from the object MBB tree storage unit 102 occurs. It is compared and determined whether or not the nodes 8 and 9 may satisfy the query (S403, S404). Node 8 and node 9 are leaf nodes. Node 9 satisfies the query, which finds object b. Node 9 is determined not to satisfy the query. Since both nodes 8 and 9 are leaf nodes, a determination result indicating that they should not be recurred is recorded in the array. This completes the search up to the leaf node, but the estimated number (upper limit) has not yet been reached. For this reason, the search must continue. Therefore, the process returns to node 4 and node 5 (NO in step S406).

ノード4,5では、先とは別の子ノードを選択する (つまりノード5の方から木を降りる)。この時、比較回数削減探索であったら、この時にノード5から降りるべきか(再帰すべきか)どうかを判定するため、キャッシュミスが発生して、再度、オブジェクトMBBツリー格納部102からノード4,5を読み出す必要がある。これに対し、本実施例のキャッシュミス回数削減探索では、すでにノード5について再帰すべきかは判定済み(再帰すべきという判定)なので、キャッシュへのアクセスは行われない。したがって、キャッシュミス(オブジェクトMBBツリー格納部102からの読み出し)は発生しない。これにより、比較回数削減探索に比べてキャッシュミスの回数が減る。ここでは、ノード5から木を降りる(S407)。   Nodes 4 and 5 select a different child node (that is, descend the tree from node 5). At this time, if the comparison number reduction search is performed, in order to determine whether or not the node 5 should be retired (recursion should be performed) at this time, a cache miss occurs and the object MBB tree storage unit 102 again receives the node 4, 5 must be read. On the other hand, in the cache miss frequency reduction search according to the present embodiment, whether or not the node 5 should be recursed has already been determined (determination that the recursion should be performed). Therefore, a cache miss (reading from the object MBB tree storage unit 102) does not occur. As a result, the number of cache misses is reduced as compared with the comparison number reduction search. Here, the tree descends from node 5 (S407).

次に、ノード5の子ノードであるノード10とノード11についても、ノード8、9と同様の処理を行う(S401〜S405のS406のNO)。このとき、キャッシュミスが発生し、ノード10,11の読み込みが行われる。ノード10、11はいずれも葉ノードであるため、再帰すべきでないとの判定結果が、配列に記録される。ノード10とノード11は葉ノードであるが、いずれのノードもクエリを満たさない。   Next, processing similar to that of the nodes 8 and 9 is performed for the nodes 10 and 11 that are the child nodes of the node 5 (NO in S406 of S401 to S405). At this time, a cache miss occurs and the nodes 10 and 11 are read. Since both the nodes 10 and 11 are leaf nodes, the determination result that should not be recursive is recorded in the array. Node 10 and node 11 are leaf nodes, but neither node satisfies the query.

次に、ノード4とノード5に戻るが、これ以上降りるべき子ノードはないので、さらにノード2とノード3に戻る。ノード3については、ノード2,3に対する配列に、再帰すべきとの判定結果が記録されており、今度はノード3を選択する(ノード3から木を降りる)。   Next, the process returns to the node 4 and the node 5, but since there are no further child nodes to descend, the process further returns to the node 2 and the node 3. For node 3, the determination result that recursion should be recorded in the array for nodes 2 and 3, this time node 3 is selected (down the tree from node 3).

次に、ノード3の子ノードであるノード6とノード7についても、ノード4,5と同様の処理を行う(S401〜S405のS406のYES)。このとき、キャッシュミスが発生し、オブジェクトMBBツリー格納部102からの読み込みが発生する。ノード6,7に対する配列には、いずれも再帰すべきとの判定結果が記録される。ここでは、ノード6の方から木を降りるとする(S407)。   Next, processing similar to that of nodes 4 and 5 is also performed for nodes 6 and 7 that are child nodes of node 3 (YES in S406 of S401 to S405). At this time, a cache miss occurs, and reading from the object MBB tree storage unit 102 occurs. In the arrays for nodes 6 and 7, a determination result indicating that both should be recursed is recorded. Here, it is assumed that the tree descends from the node 6 (S407).

次に、ノード12とノード13について、ノード8,9と同様の処理を行う(S401〜S405、S406のNO)。キャッシュミスが発生し、ノード12,13の読み込みが行われる。ノード12、13はいずれも葉ノードであるため、再帰すべきでないとの判定結果が、配列に記録される。ノード12とノード13は葉ノードである。ノード13がクエリを満たすので、オブジェクトfが発見される。なお、ノード12はクエリを満たさない。ノード6とノード7に戻り、ノード7の方から木を降りる(S407)。   Next, processing similar to that of the nodes 8 and 9 is performed for the nodes 12 and 13 (NO in S401 to S405 and S406). A cache miss occurs and the nodes 12 and 13 are read. Since both the nodes 12 and 13 are leaf nodes, the determination result that should not be recursed is recorded in the array. Nodes 12 and 13 are leaf nodes. Since node 13 satisfies the query, object f is found. Note that the node 12 does not satisfy the query. Returning to the nodes 6 and 7, the tree descends from the node 7 (S407).

次に、ノード7の子ノードであるノード14とノード15について、ノード12,13と同様の処理を行う(S401〜S405、S406のNO)。キャッシュミスが発生し、ノード14,15の読み込みが行われる。ノード14とノード15は葉ノードである。共にクエリを満たすので、オブジェクトgとhが発見される。これで見積もり数(上限値)と同じ数が発見されたので探索を終了する。   Next, processing similar to that of the nodes 12 and 13 is performed for the nodes 14 and 15 which are child nodes of the node 7 (NO in S401 to S405 and S406). A cache miss occurs and the nodes 14 and 15 are read. Nodes 14 and 15 are leaf nodes. Since both satisfy the query, objects g and h are found. Since the same number as the estimated number (upper limit value) has been found, the search is terminated.

(実施例Bの効果)
本実施例では、図11に示すように、比較回数は15回、キャッシュミスは8回であった。
(Effect of Example B)
In this example, as shown in FIG. 11, the number of comparisons was 15 and the number of cache misses was 8.

もし仮に、キャッシュミス削減探索ではなく、比較回数削減探索を採用していた場合を考えると、上位のノードに戻るたびにキャッシュミスが発生する(前述したように、この実施例では簡単のため、同時の1つの読み出し単位(兄弟ノード群)しかキャッシュに乗らないという簡単なモデルで説明している)ので、合計15回の比較が行われ、キャッシュミスの回数は11回となる(図11参照)。比較回数が同じであれば、キャッシュミスの回数が少ないほうが効率的である。   If a case where a search for reducing the number of comparisons is adopted instead of a cache miss reduction search is considered, a cache miss occurs every time the upper node is returned (as described above, for simplicity, in this embodiment, (Since it is explained in the simple model that only one read unit (sibling node group) is in the cache at the same time), a total of 15 comparisons are made and the number of cache misses is 11 (see Figure 11) ). If the number of comparisons is the same, it is more efficient that the number of cache misses is smaller.

このように本実施例は、少ないキャッシュミス(読み出し回数)で探索を終えられる。   In this way, in this embodiment, the search can be completed with a small number of cache misses (number of readings).

(変形例)
上記実施形態では、レンダリング部を用いて、他のオブジェクトの画像によって隠されているオブジェクト数を算出し、当該オブジェクト数を上限値として、探索を行うことで、他のオブジェクトによって遮られているオブジェクトを検出した。別の方法として、以下に示す方法を用いても良い。検索結果数見積もり部(算出部)では、レンダリング部を用いて、少なくとも一部の画像の他のオブジェクトの画像によって隠されているオブジェクトを識別する。オブジェクト探索部では、当該識別されたオブジェクトについてのみ、当該オブジェクトが他のオブジェクトによって遮られているかを検査する。識別されるオブジェクトの個数が少ない場合などは、この方法によっても効率的な探索が可能となる。図4および図5の例では、検索結果数見積もり部が、他のオブジェクトeの画像によって一部の画像が隠されているとして、オブジェクトfを識別する。そして、オブジェクト探索部が、オブジェクトfが空間において他のオブジェクトによって実際に遮られているかを判定する。ここでは、オブジェクトfはオブジェクトeによって遮られていると判定される。
(Modification)
In the above embodiment, an object that is obstructed by other objects by calculating the number of objects hidden by the image of other objects using the rendering unit, and performing a search using the number of objects as the upper limit. Was detected. As another method, the following method may be used. The search result number estimation unit (calculation unit) uses the rendering unit to identify an object hidden by an image of another object of at least a part of the image. The object search unit inspects only for the identified object whether the object is blocked by another object. When the number of objects to be identified is small, an efficient search can be performed also by this method. In the example of FIGS. 4 and 5, the search result number estimation unit identifies the object f on the assumption that some images are hidden by the images of the other objects e. Then, the object search unit determines whether the object f is actually blocked by other objects in the space. Here, it is determined that the object f is blocked by the object e.

以上、本実施形態によれば、他のオブジェクトによって遮られているオブジェクトを効率よく検索することができる。たとえば、PV(PV:Photovoltaic power generation)装置やビルをオブジェクトとし、ビル等の建物の陰になっているPV装置を検索できる。これにより、物陰になるかどうかを考慮したPV配置の検討が可能となる。また、高速な3Dレンダリングが可能になる。機械の部品配置や建物の設計等、CAD一般への応用も可能である。   As described above, according to the present embodiment, it is possible to efficiently search for objects that are blocked by other objects. For example, a PV (Photovoltaic power generation) device or a building can be used as an object, and a PV device behind a building such as a building can be searched. As a result, it is possible to examine the PV arrangement in consideration of whether it is a shadow. In addition, high-speed 3D rendering becomes possible. It can also be applied to CAD in general, such as machine component placement and building design.

なお、以上に説明した本実施形態におけるオブジェクト検索装置は、例えば、汎用のコンピュータ装置を基本ハードウェアとして用いることで実現することが可能である。すなわち、オブジェクト検索装置の各処理部は、上記のコンピュータ装置に搭載されたプロセッサにプログラムを実行させることにより実現することができる。このとき、オブジェクト検索装置は、上記のプログラムをコンピュータ装置にあらかじめインストールすることで実現してもよいし、CD-ROMなどの記憶媒体に記憶して、あるいはネットワークを介して上記のプログラムを配布して、このプログラムをコンピュータ装置に適宜インストールすることで実現してもよい。また、オブジェクト検索装置内の格納部102は、装置内もしくは外付けのメモリ装置およびハードディスク、あるいは、CD-R, CD-RW, DVD-RAM, DVD-R 等の記録媒体によって構成されてもよい。   In addition, the object search apparatus in this embodiment demonstrated above is realizable by using a general purpose computer apparatus as basic hardware, for example. That is, each processing unit of the object search device can be realized by causing a processor mounted on the computer device to execute a program. At this time, the object search device may be realized by installing the above program in a computer device in advance, or may be stored in a storage medium such as a CD-ROM or distributed through the network. Thus, this program may be realized by appropriately installing it in a computer device. The storage unit 102 in the object search device may be configured by an internal or external memory device and a hard disk, or a recording medium such as a CD-R, CD-RW, DVD-RAM, or DVD-R. .

Claims (8)

空間における複数のオブジェクトの配置情報を記憶するデータベースと、
前記空間内に設定した視点から前記複数のオブジェクトを描画するレンダリング部と、 前記レンダリング部を用いて描画を行い、少なくとも一部の画像が他のオブジェクトの画像によって隠されるオブジェクトの個数を算出する算出部と、
前記算出部により算出された個数を検索結果数の上限値として、前記空間内において前記視点から見て少なくとも一部が他のオブジェクトによって遮られているオブジェクトを検索する探索演算を前記データベースに基づき実行するオブジェクト探索部と、
を備えたオブジェクト検索装置。
A database for storing arrangement information of a plurality of objects in space;
A rendering unit that draws the plurality of objects from a viewpoint set in the space, and a calculation that performs rendering using the rendering unit and calculates the number of objects in which at least some images are hidden by images of other objects And
Based on the database, a search operation is performed based on the database, using the number calculated by the calculation unit as an upper limit value of the number of search results, and searching for an object in the space that is at least partially obstructed by another object when viewed from the viewpoint. An object search unit to perform,
An object search device comprising:
前記オブジェクト探索部は、前記上限値の個数のオブジェクトが検索された場合は、前記探索演算を終了する
請求項1に記載のオブジェクト検索装置。
2. The object search device according to claim 1, wherein the object search unit ends the search calculation when the number of objects of the upper limit value is searched.
前記オブジェクト探索部は、前記上限値に基づき複数の探索戦略の中から探索戦略を選択し、選択した探索戦略にしたがって探索演算を実行する
請求項1または2に記載のオブジェクト検索装置。
3. The object search device according to claim 1, wherein the object search unit selects a search strategy from a plurality of search strategies based on the upper limit value, and executes a search operation according to the selected search strategy.
前記算出部は、前記レンダリング部を用いて、
前記複数のオブジェクトのすべてを描画した第1描画データを生成し、
前記複数のオブジェクトの個々の1つを独立して描画した第2描画データをそれぞれ生成し、
前記第1描画データに示される個々のオブジェクトの画像と、前記個々のオブジェクトに対応する前記第2描画データの画像が一致しないとき、前記個々のオブジェクトの画像は他のオブジェクトの画像によって隠されていると決定する
請求項1に記載のオブジェクト検索装置。
The calculation unit uses the rendering unit,
Generating first drawing data in which all of the plurality of objects are drawn;
Generating second drawing data each independently drawing one of the plurality of objects,
When an image of an individual object indicated in the first drawing data does not match an image of the second drawing data corresponding to the individual object, the image of the individual object is hidden by an image of another object. The object search device according to claim 1, wherein the object search device is determined to be.
前記算出部は、前記レンダリング部を用いて、
前記複数のオブジェクトをそれぞれ順番にピクセル毎に描画し、描こうとするピクセルに、既に別のオブジェクトが描かれているときは、描いているオブジェクトと前記別のオブジェクトの前後関係を判定することにより、前記描いているオブジェクトと前記別のオブジェクトのどちらが隠されるかを決定する
請求項1に記載のオブジェクト検索装置。
The calculation unit uses the rendering unit,
The plurality of objects are drawn in order for each pixel, and when another object is already drawn on the pixel to be drawn, by determining the context of the drawn object and the other object, 2. The object search device according to claim 1, wherein it is determined which of the drawn object and the another object is hidden.
前記記憶部は、各葉ノードに前記オブジェクトのうちの異なる1つをそれぞれ割り当て、親ノードに前記親ノードの各子ノードのオブジェクトを包含する外包体を割り当てた階層オブジェクト構造を記憶し、
前記オブジェクト探索部は、第1探索戦略として、
(A)前記親ノードの各子ノードのそれぞれに対応する外包体内に他のオブジェクトによって遮られているオブジェクトが含まれる可能性があるかの判定を行い、
(B)存在する可能性があると判定された子ノードについて前記(A)と同様の判定を行うことを繰り返し、
(C)到達した葉ノードについて、当該葉ノードに対応するオブジェクトが他のオブジェクトによって遮られているかを判定する、
請求項1ないし5のいずれか一項に記載のオブジェクト検索装置。
The storage unit assigns a different one of the objects to each leaf node, and stores a hierarchical object structure in which an envelope containing an object of each child node of the parent node is assigned to a parent node,
The object search unit, as the first search strategy,
(A) determining whether there is a possibility that an object obstructed by another object is included in an outer package corresponding to each of the child nodes of the parent node;
(B) Repeating the same determination as in (A) above for child nodes that are determined to exist,
(C) For the arrived leaf node, determine whether the object corresponding to the leaf node is blocked by another object,
6. The object search device according to any one of claims 1 to 5.
前記記憶部は、各葉ノードに前記オブジェクトのうちの異なる1つを割り当て、親ノードに各子ノードのオブジェクトを包含する外包体を割り当てた階層オブジェクト構造を記憶し、
前記オブジェクト探索部は、第2探索戦略として、
(A)前記親ノードの各子ノードのうちの一方の子ノードを選択し、
(B)選択したノードに対応する外包体内に、他のオブジェクトによって遮られているオブジェクトが含まれる可能性があるかの判定を行い、
(C)含まれる可能性がないと判定したときは、前記各子ノードのうち他方のノードを選択し、選択したノードについて前記(B)の判定を行い、
(D)前記(B)または(C)で含まれる可能性があると判定したとき、当該選択したノードの子ノードを対象に、前記(A)以降の処理を再帰的に行い、到達した葉ノードについて、当該葉ノードのオブジェクトが他のオブジェクトによって遮られているかを判定する、
請求項1ないし4のいずれか一項に記載のオブジェクト検索装置。
The storage unit assigns a different one of the objects to each leaf node, and stores a hierarchical object structure in which an envelope containing an object of each child node is assigned to a parent node,
The object search unit as a second search strategy,
(A) Select one of the child nodes of the parent node,
(B) Judge whether there is a possibility that an object obstructed by other objects is included in the outer envelope corresponding to the selected node.
(C) When it is determined that there is no possibility of being included, the other node is selected from the child nodes, the determination of (B) is performed for the selected node,
(D) When it is determined that there is a possibility of being included in (B) or (C), the processing after (A) is recursively performed on the child node of the selected node, and the arrived leaf For a node, determine if the leaf node object is blocked by another object,
5. The object search device according to any one of claims 1 to 4.
空間における複数のオブジェクトの配置情報を記憶するデータベースにアクセスするステップと、
前記空間内に設定した視点から前記複数のオブジェクトを描画するレンダリングステップと、
前記レンダリングステップによる描画に基づき、少なくとも一部の画像が他のオブジェクトの画像によって隠されるオブジェクトの個数を算出する算出ステップと、
前記算出ステップにより算出された個数を検索結果数の上限値として、前記空間内において前記視点から見て少なくとも一部が他のオブジェクトによって遮られているオブジェクトを検索する探索演算を前記データベースに基づき実行するオブジェクト探索ステップと、
を備えたオブジェクト検索方法。
Accessing a database storing arrangement information of a plurality of objects in space;
A rendering step of drawing the plurality of objects from a viewpoint set in the space;
A calculation step of calculating the number of objects in which at least a part of the image is hidden by an image of another object based on the rendering by the rendering step;
Based on the database, a search operation for searching for an object that is at least partially obstructed by another object as viewed from the viewpoint in the space is performed using the number calculated in the calculating step as an upper limit value of the number of search results. Object search step to perform,
Object search method comprising:
JP2012206049A 2012-09-19 2012-09-19 Object search apparatus and method Expired - Fee Related JP5781045B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012206049A JP5781045B2 (en) 2012-09-19 2012-09-19 Object search apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012206049A JP5781045B2 (en) 2012-09-19 2012-09-19 Object search apparatus and method

Publications (2)

Publication Number Publication Date
JP2014059839A JP2014059839A (en) 2014-04-03
JP5781045B2 true JP5781045B2 (en) 2015-09-16

Family

ID=50616230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012206049A Expired - Fee Related JP5781045B2 (en) 2012-09-19 2012-09-19 Object search apparatus and method

Country Status (1)

Country Link
JP (1) JP5781045B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6220323B2 (en) 2014-09-05 2017-10-25 株式会社東芝 Object search device and search method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6300965B1 (en) * 1998-02-17 2001-10-09 Sun Microsystems, Inc. Visible-object determination for interactive visualization

Also Published As

Publication number Publication date
JP2014059839A (en) 2014-04-03

Similar Documents

Publication Publication Date Title
CN102663801B (en) Method for improving three-dimensional model rendering performance
TWI546770B (en) Fully parallel in-place construction of 3d acceleration structures in a graphics processing unit
US6512995B2 (en) Shape analysis, difference detection, and search for three-dimensional models
US10685067B2 (en) Data visualization system
US20060098009A1 (en) Method and apparatus for ray and range queries using wide object isolation techniques
US20030227455A1 (en) Grid-based loose octree for spatial partitioning
CN109656798B (en) Vertex reordering-based big data processing capability test method for supercomputer
CN106649882B (en) Spatial data management middleware applied to telecommunication field and implementation method thereof
CN104699946B (en) A kind of management method and device of scene of game
JP2011090351A (en) Retrieval data management device
US9996391B2 (en) Parallel computer system, method of controlling parallel computer system, and recording medium
US11860846B2 (en) Methods, systems and apparatus to improve spatial-temporal data management
KR100903777B1 (en) Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system
JP2023536621A (en) Image grouping method and apparatus for three-dimensional reconstruction, electronic device, and computer-readable storage medium
CN114485611B (en) Three-dimensional space shortest path planning method and device based on Beidou grid codes
Yu et al. CAD model simplification for assembly field
JP5781045B2 (en) Object search apparatus and method
Gu et al. Ray specialized contraction on bounding volume hierarchies
Mateo et al. Hierarchical, Dense and Dynamic 3D Reconstruction Based on VDB Data Structure for Robotic Manipulation Tasks
Yin et al. Fast BVH construction and refit for ray tracing of dynamic scenes
JP5597664B2 (en) Object search apparatus and method
CN111881327A (en) Big data processing capacity testing method based on vertex reordering and priority caching
Ganovelli et al. OCME: out-of-core mesh editing made practical
CN116701438B (en) Data association analysis method, device, electronic equipment and computer storage medium
Eisemann et al. Geometry presorting for implicit object space partitioning

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150310

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150714

LAPS Cancellation because of no payment of annual fees